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

Unified Diff: Source/modules/presentation/Presentation.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: Changed Presentation to be ContextLifecycleObserver Created 6 years, 4 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/Presentation.h
diff --git a/Source/modules/presentation/Presentation.h b/Source/modules/presentation/Presentation.h
new file mode 100644
index 0000000000000000000000000000000000000000..1d29f15a13ba0b7d938bbbf7668920557e7db1f5
--- /dev/null
+++ b/Source/modules/presentation/Presentation.h
@@ -0,0 +1,39 @@
+// 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 Presentation_h
+#define Presentation_h
+
+#include "bindings/core/v8/ScriptWrappable.h"
+#include "core/dom/ContextLifecycleObserver.h"
+#include "core/events/EventTarget.h"
+
+namespace blink {
+
+class Presentation FINAL
+ : public GarbageCollectedFinalized<Presentation>
+ , public EventTargetWithInlineData
+ , ContextLifecycleObserver {
+ DEFINE_EVENT_TARGET_REFCOUNTING(EventTargetWithInlineData);
Mads Ager (chromium) 2014/08/20 07:27:36 Looking at this again, this doesn't look right. Yo
whywhat 2014/08/20 16:40:42 Done.
+public:
+ static Presentation* create(ExecutionContext*);
+ virtual ~Presentation();
+
+ // EventTarget implementation.
+ virtual const WTF::AtomicString& interfaceName() const OVERRIDE;
eseidel 2014/08/19 18:20:58 No WTF is needed.
whywhat 2014/08/20 16:40:42 Done.
+ virtual ExecutionContext* executionContext() const OVERRIDE;
+
+ virtual void trace(Visitor*) OVERRIDE;
+
+ bool displayAvailable() const;
+
+ DEFINE_ATTRIBUTE_EVENT_LISTENER(availablechange);
+
+private:
+ explicit Presentation(ExecutionContext*);
+};
+
+} // namespace blink
+
+#endif // Presentation_h

Powered by Google App Engine
This is Rietveld 408576698