Chromium Code Reviews| 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 "bindings/core/v8/ScriptWrappable.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 EventTargetWithInlineData | 19 : public GarbageCollected<PresentationReceiver> |
| 20 , DOMWindowProperty { | 20 , public ScriptWrappable |
| 21 , public DOMWindowProperty { | |
| 21 USING_GARBAGE_COLLECTED_MIXIN(PresentationReceiver); | 22 USING_GARBAGE_COLLECTED_MIXIN(PresentationReceiver); |
| 22 DEFINE_WRAPPERTYPEINFO(); | 23 DEFINE_WRAPPERTYPEINFO(); |
| 23 public: | 24 public: |
| 24 PresentationReceiver(LocalFrame*); | 25 PresentationReceiver(LocalFrame*); |
|
haraken
2016/08/23 00:03:48
Add explicit.
| |
| 25 ~PresentationReceiver() = default; | 26 ~PresentationReceiver() = default; |
| 26 | 27 |
| 27 // EventTarget implementation. | 28 ScriptPromise connectionList(ScriptState*); |
| 28 const AtomicString& interfaceName() const override; | |
| 29 ExecutionContext* getExecutionContext() const override; | |
| 30 | |
| 31 ScriptPromise getConnection(ScriptState*); | |
| 32 ScriptPromise getConnections(ScriptState*); | |
| 33 | |
| 34 DEFINE_ATTRIBUTE_EVENT_LISTENER(connectionavailable); | |
| 35 | 29 |
| 36 DECLARE_VIRTUAL_TRACE(); | 30 DECLARE_VIRTUAL_TRACE(); |
| 37 }; | 31 }; |
| 38 | 32 |
| 39 } // namespace blink | 33 } // namespace blink |
| 40 | 34 |
| 41 #endif // PresentationReceiver_h | 35 #endif // PresentationReceiver_h |
| OLD | NEW |