Bumping gaia.json for 4 gaia revision(s) a=gaia-bump
[gecko.git] / dom / workers / Performance.h
blobd83f148860631eb8e26947edafce9ac04076f199
1 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef mozilla_dom_workers_performance_h__
7 #define mozilla_dom_workers_performance_h__
9 #include "nsWrapperCache.h"
10 #include "js/TypeDecls.h"
11 #include "Workers.h"
12 #include "nsISupportsImpl.h"
13 #include "nsCycleCollectionParticipant.h"
15 BEGIN_WORKERS_NAMESPACE
17 class WorkerPrivate;
19 class Performance MOZ_FINAL : public nsWrapperCache
21 public:
22 NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(Performance)
23 NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(Performance)
25 explicit Performance(WorkerPrivate* aWorkerPrivate);
27 private:
28 ~Performance();
30 WorkerPrivate* mWorkerPrivate;
32 public:
33 virtual JSObject*
34 WrapObject(JSContext* aCx) MOZ_OVERRIDE;
36 nsISupports*
37 GetParentObject() const
39 // There's only one global on a worker, so we don't need to specify.
40 return nullptr;
43 // WebIDL (public APIs)
44 double Now() const;
47 END_WORKERS_NAMESPACE
49 #endif // mozilla_dom_workers_performance_h__