| 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" | 8 #include "bindings/core/v8/ScriptPromise.h" |
| 9 #include "core/events/EventTarget.h" | 9 #include "core/events/EventTarget.h" |
| 10 #include "core/frame/DOMWindowProperty.h" | 10 #include "core/frame/DOMWindowProperty.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // Implements the main entry point of the Presentation API corresponding to the
Presentation.idl | 27 // Implements the main entry point of the Presentation API corresponding to the
Presentation.idl |
| 28 // See https://w3c.github.io/presentation-api/#navigatorpresentation for details
. | 28 // See https://w3c.github.io/presentation-api/#navigatorpresentation for details
. |
| 29 class Presentation final | 29 class Presentation final |
| 30 : public RefCountedGarbageCollectedEventTargetWithInlineData<Presentation> | 30 : public RefCountedGarbageCollectedEventTargetWithInlineData<Presentation> |
| 31 , public DOMWindowProperty { | 31 , public DOMWindowProperty { |
| 32 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(Presentation); | 32 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(Presentation); |
| 33 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Presentation); | 33 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Presentation); |
| 34 DEFINE_WRAPPERTYPEINFO(); | 34 DEFINE_WRAPPERTYPEINFO(); |
| 35 public: | 35 public: |
| 36 static Presentation* create(LocalFrame*); | 36 static Presentation* create(LocalFrame*); |
| 37 virtual ~Presentation(); | 37 ~Presentation() override; |
| 38 | 38 |
| 39 // EventTarget implementation. | 39 // EventTarget implementation. |
| 40 virtual const AtomicString& interfaceName() const override; | 40 const AtomicString& interfaceName() const override; |
| 41 virtual ExecutionContext* executionContext() const override; | 41 ExecutionContext* executionContext() const override; |
| 42 | 42 |
| 43 DECLARE_VIRTUAL_TRACE(); | 43 DECLARE_VIRTUAL_TRACE(); |
| 44 | 44 |
| 45 PresentationSession* session() const; | 45 PresentationSession* session() const; |
| 46 | 46 |
| 47 ScriptPromise startSession(ScriptState*, const String& presentationUrl); | 47 ScriptPromise startSession(ScriptState*, const String& presentationUrl); |
| 48 ScriptPromise joinSession(ScriptState*, const String& presentationUrl, const
String& presentationId); | 48 ScriptPromise joinSession(ScriptState*, const String& presentationUrl, const
String& presentationId); |
| 49 ScriptPromise getAvailability(ScriptState*, const String& presentationUrl); | 49 ScriptPromise getAvailability(ScriptState*, const String& presentationUrl); |
| 50 | 50 |
| 51 DEFINE_ATTRIBUTE_EVENT_LISTENER(defaultsessionstart); | 51 DEFINE_ATTRIBUTE_EVENT_LISTENER(defaultsessionstart); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 72 // The session object provided to the presentation page. Not supported. | 72 // The session object provided to the presentation page. Not supported. |
| 73 Member<PresentationSession> m_session; | 73 Member<PresentationSession> m_session; |
| 74 | 74 |
| 75 // The sessions opened for this frame. | 75 // The sessions opened for this frame. |
| 76 HeapHashSet<Member<PresentationSession>> m_openSessions; | 76 HeapHashSet<Member<PresentationSession>> m_openSessions; |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 } // namespace blink | 79 } // namespace blink |
| 80 | 80 |
| 81 #endif // Presentation_h | 81 #endif // Presentation_h |
| OLD | NEW |