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

Unified Diff: Source/modules/presentation/DefaultSessionStartEvent.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: Fixed last reviewers wishes Created 5 years, 9 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/modules/modules.gypi ('k') | Source/modules/presentation/DefaultSessionStartEvent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/presentation/DefaultSessionStartEvent.h
diff --git a/Source/modules/presentation/DefaultSessionStartEvent.h b/Source/modules/presentation/DefaultSessionStartEvent.h
new file mode 100644
index 0000000000000000000000000000000000000000..61f3d82a184ef0a530a6d1aaac41c9ed146d067e
--- /dev/null
+++ b/Source/modules/presentation/DefaultSessionStartEvent.h
@@ -0,0 +1,53 @@
+// 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 DefaultSessionStartEvent_h
+#define DefaultSessionStartEvent_h
+
+#include "modules/EventModules.h"
+#include "modules/presentation/PresentationSession.h"
+#include "platform/heap/Handle.h"
+
+namespace blink {
+
+class DefaultSessionStartEventInit;
+
+// Presentation API event to be fired when a presentation has been triggered
+// by the embedder using the default presentation URL and id.
+// See https://code.google.com/p/chromium/issues/detail?id=459001 for details.
+class DefaultSessionStartEvent final : public Event {
+ DEFINE_WRAPPERTYPEINFO();
+public:
+ virtual ~DefaultSessionStartEvent();
+
+ static PassRefPtrWillBeRawPtr<DefaultSessionStartEvent> create()
+ {
+ return adoptRefWillBeNoop(new DefaultSessionStartEvent);
+ }
+ static PassRefPtrWillBeRawPtr<DefaultSessionStartEvent> create(const AtomicString& eventType, PresentationSession* session)
+ {
+ return adoptRefWillBeNoop(new DefaultSessionStartEvent(eventType, session));
+ }
+ static PassRefPtrWillBeRawPtr<DefaultSessionStartEvent> create(const AtomicString& eventType, const DefaultSessionStartEventInit& initializer)
+ {
+ return adoptRefWillBeNoop(new DefaultSessionStartEvent(eventType, initializer));
+ }
+
+ PresentationSession* session() { return m_session.get(); }
+
+ virtual const AtomicString& interfaceName() const override;
+
+private:
+ DefaultSessionStartEvent();
+ DefaultSessionStartEvent(const AtomicString& eventType, PresentationSession*);
+ DefaultSessionStartEvent(const AtomicString& eventType, const DefaultSessionStartEventInit& initializer);
+
+ Persistent<PresentationSession> m_session;
+};
+
+DEFINE_TYPE_CASTS(DefaultSessionStartEvent, Event, event, event->interfaceName() == EventNames::DefaultSessionStartEvent, event.interfaceName() == EventNames::DefaultSessionStartEvent);
+
+} // namespace blink
+
+#endif // DefaultSessionStartEvent_h
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/presentation/DefaultSessionStartEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698