Bug 1472338: part 2) Change `clipboard.readText()` to read from the clipboard asynchr...
[gecko.git] / dom / performance / PerformanceMeasure.h
blob59fd3e1d8b9fd25dba7e9d7abb9946e8b714e4f7
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/. */
7 #ifndef mozilla_dom_performancemeasure_h___
8 #define mozilla_dom_performancemeasure_h___
10 #include "mozilla/dom/PerformanceEntry.h"
12 namespace mozilla {
13 namespace dom {
15 // http://www.w3.org/TR/user-timing/#performancemeasure
16 class PerformanceMeasure final : public PerformanceEntry {
17 public:
18 PerformanceMeasure(nsISupports* aParent, const nsAString& aName,
19 DOMHighResTimeStamp aStartTime,
20 DOMHighResTimeStamp aEndTime);
22 virtual JSObject* WrapObject(JSContext* aCx,
23 JS::Handle<JSObject*> aGivenProto) override;
25 virtual DOMHighResTimeStamp StartTime() const override { return mStartTime; }
27 virtual DOMHighResTimeStamp Duration() const override { return mDuration; }
29 size_t SizeOfIncludingThis(
30 mozilla::MallocSizeOf aMallocSizeOf) const override;
32 protected:
33 virtual ~PerformanceMeasure();
34 DOMHighResTimeStamp mStartTime;
35 DOMHighResTimeStamp mDuration;
38 } // namespace dom
39 } // namespace mozilla
41 #endif /* mozilla_dom_performancemeasure_h___ */