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

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: Made navigator.presentation an event target for onavailablechange (no implementation yet). 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..8011e0142c078f04aef0015a9d6605e62561f1f1
--- /dev/null
+++ b/Source/modules/presentation/NavigatorPresentation.h
@@ -0,0 +1,41 @@
+// 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 blink {
+
+class Navigator;
+class Presentation;
Peter Beverloo 2014/07/25 18:01:18 nit: You include Presentation.h, so no need to for
whywhat 2014/08/19 18:07:35 Removed the header. Prefer to forward declare.
+
+class NavigatorPresentation FINAL
+ : public GarbageCollectedFinalized<NavigatorPresentation>
Peter Beverloo 2014/07/25 18:01:18 mmm. It looks like every other module defining a p
whywhat 2014/08/19 18:07:35 Done.
+ , public WillBeHeapSupplement<Navigator>
+ , public DOMWindowProperty {
Peter Beverloo 2014/07/25 18:01:17 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(NavigatorPre
whywhat 2014/08/19 18:07:35 Done.
+public:
+ virtual ~NavigatorPresentation();
+
+ static NavigatorPresentation& from(Navigator&);
+ static Presentation& presentation(Navigator&);
+
+ void trace(Visitor*) OVERRIDE;
Peter Beverloo 2014/07/25 18:01:18 This should be virtual. The method will in fact be
whywhat 2014/08/19 18:07:35 Done.
+
+private:
+ static const char* supplementName();
+
+ NavigatorPresentation(LocalFrame*);
Peter Beverloo 2014/07/25 18:01:17 Constructors with only one argument should be mark
whywhat 2014/08/19 18:07:34 Done.
+
+ Presentation& presentation();
+
+ PersistentWillBeMember<Presentation> m_presentation;
Peter Beverloo 2014/07/25 18:01:17 s/PersistentWillBeMember/Member/?
whywhat 2014/08/19 18:07:34 Nah, let's go for consistency.
+};
+
+} // namespace blink
+
+#endif // NavigatorPresentation_h

Powered by Google App Engine
This is Rietveld 408576698