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

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

Issue 974993002: [Presentation API] Added the DefaultPresentationStart event and parsing of the default presentation… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Replaced the unused forward declaration with the used one 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
Index: Source/modules/presentation/DefaultPresentationStartEvent.h
diff --git a/Source/modules/presentation/DefaultPresentationStartEvent.h b/Source/modules/presentation/DefaultPresentationStartEvent.h
new file mode 100644
index 0000000000000000000000000000000000000000..3cbddd7e26339475c99e699a865a98a88703ddb9
--- /dev/null
+++ b/Source/modules/presentation/DefaultPresentationStartEvent.h
@@ -0,0 +1,52 @@
+// 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 DefaultPresentationStartEvent_h
+#define DefaultPresentationStartEvent_h
+
+#include "modules/EventModules.h"
+#include "modules/presentation/DefaultPresentationStartEventInit.h"
mlamouri (slow - plz ping) 2015/03/06 22:43:41 This can probably be a forward declaration.
whywhat 2015/03/10 13:00:44 Done.
+#include "modules/presentation/PresentationSession.h"
+#include "platform/heap/Handle.h"
+
+namespace blink {
+
+// Presentation API event to be fired when a presentation has been triggered
+// by the embedder for the default presentation URL.
+// See https://code.google.com/p/chromium/issues/detail?id=459001 for details.
mlamouri (slow - plz ping) 2015/03/06 22:43:41 I don't think you should point to bugs unless it's
Peter Beverloo 2015/03/09 19:05:28 +1, we should not point to bugs.
whywhat 2015/03/10 13:00:44 I believe there should be at least some pointer on
+class DefaultPresentationStartEvent final : public Event {
+ DEFINE_WRAPPERTYPEINFO();
+public:
+ virtual ~DefaultPresentationStartEvent();
+
+ static PassRefPtrWillBeRawPtr<DefaultPresentationStartEvent> create()
+ {
+ return adoptRefWillBeNoop(new DefaultPresentationStartEvent);
+ }
+ static PassRefPtrWillBeRawPtr<DefaultPresentationStartEvent> create(const AtomicString& eventType, PresentationSession* session)
+ {
+ return adoptRefWillBeNoop(new DefaultPresentationStartEvent(eventType, session));
+ }
+ static PassRefPtrWillBeRawPtr<DefaultPresentationStartEvent> create(const AtomicString& eventType, const DefaultPresentationStartEventInit& initializer)
+ {
+ return adoptRefWillBeNoop(new DefaultPresentationStartEvent(eventType, initializer));
+ }
+
+ PresentationSession* session() { return m_session.get(); }
+
+ virtual const AtomicString& interfaceName() const override;
+
+private:
+ DefaultPresentationStartEvent();
+ DefaultPresentationStartEvent(const AtomicString& eventType, PresentationSession*);
+ DefaultPresentationStartEvent(const AtomicString& eventType, const DefaultPresentationStartEventInit& initializer);
+
+ Persistent<PresentationSession> m_session;
+};
+
+DEFINE_TYPE_CASTS(DefaultPresentationStartEvent, Event, event, event->interfaceName() == EventNames::DefaultPresentationStartEvent, event.interfaceName() == EventNames::DefaultPresentationStartEvent);
+
+} // namespace blink
+
+#endif // DefaultPresentationStartEvent_h

Powered by Google App Engine
This is Rietveld 408576698