/src/mozilla-central/dom/performance/PerformanceMark.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 | | /* vim: set ts=8 sts=2 et sw=2 tw=80: */ |
3 | | /* This Source Code Form is subject to the terms of the Mozilla Public |
4 | | * License, v. 2.0. If a copy of the MPL was not distributed with this |
5 | | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
6 | | |
7 | | #ifndef mozilla_dom_performancemark_h___ |
8 | | #define mozilla_dom_performancemark_h___ |
9 | | |
10 | | #include "mozilla/dom/PerformanceEntry.h" |
11 | | |
12 | | namespace mozilla { |
13 | | namespace dom { |
14 | | |
15 | | // http://www.w3.org/TR/user-timing/#performancemark |
16 | | class PerformanceMark final : public PerformanceEntry |
17 | | { |
18 | | public: |
19 | | PerformanceMark(nsISupports* aParent, |
20 | | const nsAString& aName, |
21 | | DOMHighResTimeStamp aStartTime); |
22 | | |
23 | | virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override; |
24 | | |
25 | | virtual DOMHighResTimeStamp StartTime() const override |
26 | 0 | { |
27 | 0 | return mStartTime; |
28 | 0 | } |
29 | | |
30 | | size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override; |
31 | | |
32 | | protected: |
33 | | virtual ~PerformanceMark(); |
34 | | DOMHighResTimeStamp mStartTime; |
35 | | }; |
36 | | |
37 | | } // namespace dom |
38 | | } // namespace mozilla |
39 | | |
40 | | #endif /* mozilla_dom_performancemark_h___ */ |