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

Unified Diff: Source/modules/presentation/NavigatorPresentation.h

Issue 408663002: Add the Presentation API module and a single event target (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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
Index: Source/modules/presentation/NavigatorPresentation.h
diff --git a/Source/modules/presentation/NavigatorPresentation.h b/Source/modules/presentation/NavigatorPresentation.h
new file mode 100644
index 0000000000000000000000000000000000000000..09761004794b236c8cb7da48a836eb1d8a2c5cf7
--- /dev/null
+++ b/Source/modules/presentation/NavigatorPresentation.h
@@ -0,0 +1,42 @@
+// Copyright 2014 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 NavigatorPresentation_h
+#define NavigatorPresentation_h
+
+#include "core/frame/DOMWindowProperty.h"
+#include "modules/presentation/Presentation.h"
+#include "platform/Supplementable.h"
+
+namespace WebCore {
Peter Beverloo 2014/07/19 10:16:12 nit: s/WebCore/blink/ Elsewhere too, we switched
whywhat 2014/07/23 00:39:25 Done.
+
+class Navigator;
+class Presentation;
+
+class NavigatorPresentation FINAL
+ : public NoBaseWillBeGarbageCollectedFinalized<NavigatorPresentation>
Peter Beverloo 2014/07/19 10:16:12 No need to use the Oilpan transitional types, you
whywhat 2014/07/23 00:39:26 It seems like I have to use WillBeHeapSupplement w
+ , public WillBeHeapSupplement<Navigator>
+ , public DOMWindowProperty {
+ WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(NavigatorPresentation);
+public:
+ virtual ~NavigatorPresentation();
+
+ static NavigatorPresentation& from(Navigator&);
+ static Presentation* presentation(Navigator&);
+
+ Presentation* presentation() const;
Peter Beverloo 2014/07/19 10:16:12 You could also make this private since there are n
Peter Beverloo 2014/07/19 10:16:12 nit: This shouldn't be |const| since it can modify
whywhat 2014/07/23 00:39:25 Done.
whywhat 2014/07/23 00:39:26 Done.
+
+ void trace(Visitor*);
Peter Beverloo 2014/07/19 10:16:12 virtual void trace(Visitor*) OVERRIDE;
whywhat 2014/07/23 00:39:25 Done.
+
+private:
+ static const char* supplementName();
+
+ NavigatorPresentation(LocalFrame*);
+
+ mutable PersistentWillBeMember<Presentation> m_presentation;
+};
+
+} // namespace WebCore
+
+#endif // Presentation_h
Peter Beverloo 2014/07/19 10:16:12 nit: NavigatorPresentation_h
whywhat 2014/07/23 00:39:26 Done.

Powered by Google App Engine
This is Rietveld 408576698