Bug 1472338: part 2) Change `clipboard.readText()` to read from the clipboard asynchr...
[gecko.git] / dom / performance / PerformanceServerTiming.h
blob90a4b64dbdbd0a4be4c139aaa419b298679e08d0
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_PerformanceServerTiming_h
8 #define mozilla_dom_PerformanceServerTiming_h
10 #include "mozilla/Attributes.h"
11 #include "nsCOMPtr.h"
12 #include "nsDOMNavigationTiming.h"
13 #include "nsWrapperCache.h"
14 #include "nsString.h"
16 class nsIServerTiming;
17 class nsISupports;
19 namespace mozilla {
20 namespace dom {
22 class PerformanceServerTiming final : public nsISupports,
23 public nsWrapperCache {
24 public:
25 PerformanceServerTiming(nsISupports* aParent, nsIServerTiming* aServerTiming)
26 : mParent(aParent), mServerTiming(aServerTiming) {
27 MOZ_ASSERT(mServerTiming);
30 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
31 NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(PerformanceServerTiming)
33 JSObject* WrapObject(JSContext* aCx,
34 JS::Handle<JSObject*> aGivenProto) override;
36 nsISupports* GetParentObject() const { return mParent; }
38 void GetName(nsAString& aName) const;
40 DOMHighResTimeStamp Duration() const;
42 void GetDescription(nsAString& aDescription) const;
44 private:
45 ~PerformanceServerTiming() = default;
47 nsCOMPtr<nsISupports> mParent;
48 nsCOMPtr<nsIServerTiming> mServerTiming;
51 } // namespace dom
52 } // namespace mozilla
54 #endif // mozilla_dom_PerformanceServerTiming_h