Line data Source code
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 0 : virtual DOMHighResTimeStamp StartTime() const override
26 : {
27 0 : return mStartTime;
28 : }
29 :
30 : protected:
31 : virtual ~PerformanceMark();
32 : DOMHighResTimeStamp mStartTime;
33 : };
34 :
35 : } // namespace dom
36 : } // namespace mozilla
37 :
38 : #endif /* mozilla_dom_performancemark_h___ */
|