OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 RemotePlayback_h | 5 #ifndef RemotePlayback_h |
6 #define RemotePlayback_h | 6 #define RemotePlayback_h |
7 | 7 |
8 #include "bindings/core/v8/ActiveScriptWrappable.h" | 8 #include "bindings/core/v8/ActiveScriptWrappable.h" |
9 #include "bindings/core/v8/ScriptPromise.h" | 9 #include "bindings/core/v8/ScriptPromise.h" |
10 #include "core/events/EventTarget.h" | 10 #include "core/events/EventTarget.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 | 33 |
34 // EventTarget implementation. | 34 // EventTarget implementation. |
35 const WTF::AtomicString& interfaceName() const override; | 35 const WTF::AtomicString& interfaceName() const override; |
36 ExecutionContext* getExecutionContext() const override; | 36 ExecutionContext* getExecutionContext() const override; |
37 | 37 |
38 ScriptPromise getAvailability(ScriptState*); | 38 ScriptPromise getAvailability(ScriptState*); |
39 ScriptPromise connect(ScriptState*); | 39 ScriptPromise connect(ScriptState*); |
40 | 40 |
41 String state() const; | 41 String state() const; |
42 | 42 |
43 // ActiveScriptWrappable implementation. | 43 // ScriptWrappable implementation. |
44 bool hasPendingActivity() const final; | 44 bool hasPendingActivity() const final; |
45 | 45 |
46 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); | 46 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); |
47 | 47 |
48 DECLARE_VIRTUAL_TRACE(); | 48 DECLARE_VIRTUAL_TRACE(); |
49 | 49 |
50 private: | 50 private: |
51 explicit RemotePlayback(HTMLMediaElement&); | 51 explicit RemotePlayback(HTMLMediaElement&); |
52 | 52 |
53 void stateChanged(WebRemotePlaybackState) override; | 53 void stateChanged(WebRemotePlaybackState) override; |
54 void availabilityChanged(bool available) override; | 54 void availabilityChanged(bool available) override; |
55 void connectCancelled() override; | 55 void connectCancelled() override; |
56 | 56 |
57 WebRemotePlaybackState m_state; | 57 WebRemotePlaybackState m_state; |
58 bool m_availability; | 58 bool m_availability; |
59 HeapVector<Member<RemotePlaybackAvailability>> m_availabilityObjects; | 59 HeapVector<Member<RemotePlaybackAvailability>> m_availabilityObjects; |
60 Member<HTMLMediaElement> m_mediaElement; | 60 Member<HTMLMediaElement> m_mediaElement; |
61 HeapVector<Member<ScriptPromiseResolver>> m_connectPromiseResolvers; | 61 HeapVector<Member<ScriptPromiseResolver>> m_connectPromiseResolvers; |
62 }; | 62 }; |
63 | 63 |
64 } // namespace blink | 64 } // namespace blink |
65 | 65 |
66 #endif // RemotePlayback_h | 66 #endif // RemotePlayback_h |
OLD | NEW |