Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef Presentation_h | 5 #ifndef Presentation_h |
| 6 #define Presentation_h | 6 #define Presentation_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptPromise.h" | |
| 9 #include "bindings/core/v8/ScriptState.h" | |
|
Peter Beverloo
2014/10/29 20:51:19
You can forward declare this.
whywhat
2014/10/29 22:09:26
Done.
| |
| 8 #include "core/dom/ContextLifecycleObserver.h" | 10 #include "core/dom/ContextLifecycleObserver.h" |
| 9 #include "core/events/EventTarget.h" | 11 #include "core/events/EventTarget.h" |
| 12 #include "modules/presentation/PresentationSession.h" | |
| 10 | 13 |
| 11 namespace blink { | 14 namespace blink { |
| 12 | 15 |
| 13 class Presentation final | 16 class Presentation final |
| 14 : public RefCountedGarbageCollectedWillBeGarbageCollectedFinalized<Presentat ion> | 17 : public RefCountedGarbageCollectedWillBeGarbageCollectedFinalized<Presentat ion> |
| 15 , public EventTargetWithInlineData | 18 , public EventTargetWithInlineData |
| 16 , public ContextLifecycleObserver { | 19 , public ContextLifecycleObserver { |
| 17 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<P resentation>); | 20 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<P resentation>); |
| 18 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Presentation); | 21 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Presentation); |
| 19 DEFINE_WRAPPERTYPEINFO(); | 22 DEFINE_WRAPPERTYPEINFO(); |
| 20 public: | 23 public: |
| 21 static Presentation* create(ExecutionContext*); | 24 static Presentation* create(ExecutionContext*); |
| 22 virtual ~Presentation(); | 25 virtual ~Presentation(); |
| 23 | 26 |
| 24 // EventTarget implementation. | 27 // EventTarget implementation. |
| 25 virtual const AtomicString& interfaceName() const override; | 28 virtual const AtomicString& interfaceName() const override; |
| 26 virtual ExecutionContext* executionContext() const override; | 29 virtual ExecutionContext* executionContext() const override; |
| 27 | 30 |
| 28 virtual void trace(Visitor*) override; | 31 virtual void trace(Visitor*) override; |
| 29 | 32 |
| 33 PresentationSession* session() const; | |
| 34 | |
| 35 ScriptPromise startSession(ScriptState*, const String& senderId, const Strin g& presentationId); | |
| 36 ScriptPromise joinSession(ScriptState*, const String& senderId, const String & presentationId); | |
| 37 | |
| 30 DEFINE_ATTRIBUTE_EVENT_LISTENER(availablechange); | 38 DEFINE_ATTRIBUTE_EVENT_LISTENER(availablechange); |
| 31 | 39 |
| 32 private: | 40 private: |
| 33 explicit Presentation(ExecutionContext*); | 41 explicit Presentation(ExecutionContext*); |
| 42 | |
| 43 PersistentWillBeMember<PresentationSession> m_session; | |
|
Peter Beverloo
2014/10/29 20:51:19
This should be a Member<>.
whywhat
2014/10/29 22:09:27
Done.
| |
| 34 }; | 44 }; |
| 35 | 45 |
| 36 } // namespace blink | 46 } // namespace blink |
| 37 | 47 |
| 38 #endif // Presentation_h | 48 #endif // Presentation_h |
| OLD | NEW |