OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef DefaultPresentationStartEvent_h | |
6 #define DefaultPresentationStartEvent_h | |
7 | |
8 #include "modules/EventModules.h" | |
9 #include "modules/presentation/DefaultPresentationStartEventInit.h" | |
10 #include "modules/presentation/PresentationSession.h" | |
11 #include "platform/heap/Handle.h" | |
12 | |
13 namespace blink { | |
14 | |
15 // DefaultPresentationStartEvent object definition corresponding to the event | |
16 // IDL from the Presentation API, | |
17 // see https://code.google.com/p/chromium/issues/detail?id=459001 for details. | |
Peter Beverloo
2015/03/03 21:19:24
I don't think this comment is useful at all. Inste
whywhat
2015/03/05 18:41:46
Done.
| |
18 class DefaultPresentationStartEvent final : public Event { | |
mark a. foltz
2015/03/05 19:44:11
Why "DefaultPresentationStart?" The purpose of th
whywhat
2015/03/05 20:46:02
Yes, I think using session is more consistent. How
| |
19 DEFINE_WRAPPERTYPEINFO(); | |
20 public: | |
21 virtual ~DefaultPresentationStartEvent(); | |
22 | |
23 static PassRefPtrWillBeRawPtr<DefaultPresentationStartEvent> create() | |
24 { | |
25 return adoptRefWillBeNoop(new DefaultPresentationStartEvent); | |
26 } | |
27 static PassRefPtrWillBeRawPtr<DefaultPresentationStartEvent> create(const At omicString& eventType, PresentationSession* session) | |
28 { | |
29 return adoptRefWillBeNoop(new DefaultPresentationStartEvent(eventType, s ession)); | |
30 } | |
31 static PassRefPtrWillBeRawPtr<DefaultPresentationStartEvent> create(const At omicString& eventType, const DefaultPresentationStartEventInit& initializer) | |
32 { | |
33 return adoptRefWillBeNoop(new DefaultPresentationStartEvent(eventType, i nitializer)); | |
34 } | |
35 | |
36 PresentationSession& session() { return *m_session; } | |
Peter Beverloo
2015/03/03 21:19:24
You probably want to gracefully handle m_session b
whywhat
2015/03/05 18:41:46
Done.
| |
37 | |
38 virtual const AtomicString& interfaceName() const override; | |
39 | |
40 private: | |
41 DefaultPresentationStartEvent(); | |
42 DefaultPresentationStartEvent(const AtomicString& eventType, PresentationSes sion*); | |
43 DefaultPresentationStartEvent(const AtomicString& eventType, const DefaultPr esentationStartEventInit& initializer); | |
44 | |
45 Persistent<PresentationSession> m_session; | |
46 }; | |
47 | |
48 DEFINE_TYPE_CASTS(DefaultPresentationStartEvent, Event, event, event->interfaceN ame() == EventNames::DefaultPresentationStartEvent, event.interfaceName() == Eve ntNames::DefaultPresentationStartEvent); | |
49 | |
50 } // namespace blink | |
51 | |
52 #endif // DefaultPresentationStartEvent_h | |
OLD | NEW |