Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: Source/core/timing/DOMWindowPerformance.h

Issue 910983005: Decouple performance() from LocalDOMWindow (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase + feedback Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/frame/Window.idl ('k') | Source/core/timing/DOMWindowPerformance.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/timing/DOMWindowPerformance.h
diff --git a/Source/core/timing/DOMWindowPerformance.h b/Source/core/timing/DOMWindowPerformance.h
new file mode 100644
index 0000000000000000000000000000000000000000..10f440afca94f53ae7f06bf5cf4bdc83706739dc
--- /dev/null
+++ b/Source/core/timing/DOMWindowPerformance.h
@@ -0,0 +1,38 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef DOMWindowPerformance_h
+#define DOMWindowPerformance_h
+
+#include "core/frame/DOMWindowProperty.h"
+#include "platform/Supplementable.h"
+#include "platform/heap/Handle.h"
+
+namespace blink {
+
+class DOMWindow;
+class Performance;
+
+class DOMWindowPerformance final : public NoBaseWillBeGarbageCollected<DOMWindowPerformance>, public WillBeHeapSupplement<LocalDOMWindow>, public DOMWindowProperty {
+ WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DOMWindowPerformance);
+ DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(DOMWindowPerformance);
+public:
+ static DOMWindowPerformance& from(LocalDOMWindow&);
+ static Performance* performance(DOMWindow&);
+
+ void trace(Visitor*);
+
+private:
+ explicit DOMWindowPerformance(LocalDOMWindow&);
+ static const char* supplementName();
+
+ Performance* performance();
+
+ LocalDOMWindow& m_window;
+ RefPtrWillBeMember<Performance> m_performance;
+};
+
+} // namespace blink
+
+#endif // DOMWindowPerformance_h
« no previous file with comments | « Source/core/frame/Window.idl ('k') | Source/core/timing/DOMWindowPerformance.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698