OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 PresentationReceiver_h | 5 #ifndef PresentationReceiver_h |
6 #define PresentationReceiver_h | 6 #define PresentationReceiver_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" |
11 #include "platform/heap/Handle.h" | 11 #include "platform/heap/Handle.h" |
12 #include "platform/heap/Heap.h" | 12 #include "platform/heap/Heap.h" |
13 | 13 |
14 namespace blink { | 14 namespace blink { |
15 | 15 |
16 // Implements the PresentationReceiver interface from the Presentation API from | 16 // Implements the PresentationReceiver interface from the Presentation API from |
17 // which websites can implement the receiving side of a presentation session. | 17 // which websites can implement the receiving side of a presentation session. |
18 class PresentationReceiver final | 18 class PresentationReceiver final |
19 : public RefCountedGarbageCollectedEventTargetWithInlineData<PresentationRec
eiver> | 19 : public RefCountedGarbageCollectedEventTargetWithInlineData<PresentationRec
eiver> |
20 , DOMWindowProperty { | 20 , DOMWindowProperty { |
21 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(PresentationReceiver); | 21 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(PresentationReceiver); |
22 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PresentationReceiver); | 22 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PresentationReceiver); |
23 DEFINE_WRAPPERTYPEINFO(); | 23 DEFINE_WRAPPERTYPEINFO(); |
24 public: | 24 public: |
25 PresentationReceiver(LocalFrame*); | 25 PresentationReceiver(LocalFrame*); |
26 ~PresentationReceiver() = default; | 26 ~PresentationReceiver() = default; |
27 | 27 |
28 // EventTarget implementation. | 28 // EventTarget implementation. |
29 const AtomicString& interfaceName() const override; | 29 const AtomicString& interfaceName() const override; |
30 ExecutionContext* executionContext() const override; | 30 ExecutionContext* getExecutionContext() const override; |
31 | 31 |
32 ScriptPromise getConnection(ScriptState*); | 32 ScriptPromise getConnection(ScriptState*); |
33 ScriptPromise getConnections(ScriptState*); | 33 ScriptPromise getConnections(ScriptState*); |
34 | 34 |
35 DEFINE_ATTRIBUTE_EVENT_LISTENER(connectionavailable); | 35 DEFINE_ATTRIBUTE_EVENT_LISTENER(connectionavailable); |
36 | 36 |
37 DECLARE_VIRTUAL_TRACE(); | 37 DECLARE_VIRTUAL_TRACE(); |
38 }; | 38 }; |
39 | 39 |
40 } // namespace blink | 40 } // namespace blink |
41 | 41 |
42 #endif // PresentationReceiver_h | 42 #endif // PresentationReceiver_h |
OLD | NEW |