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 "bindings/core/v8/ScriptState.h" | 10 #include "bindings/core/v8/ScriptState.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 class MODULES_EXPORT RemotePlayback final | 28 class MODULES_EXPORT RemotePlayback final |
29 : public EventTargetWithInlineData, | 29 : public EventTargetWithInlineData, |
30 public ActiveScriptWrappable, | 30 public ActiveScriptWrappable, |
31 WTF_NON_EXPORTED_BASE(private WebRemotePlaybackClient) { | 31 WTF_NON_EXPORTED_BASE(private WebRemotePlaybackClient) { |
32 DEFINE_WRAPPERTYPEINFO(); | 32 DEFINE_WRAPPERTYPEINFO(); |
33 USING_GARBAGE_COLLECTED_MIXIN(RemotePlayback); | 33 USING_GARBAGE_COLLECTED_MIXIN(RemotePlayback); |
34 | 34 |
35 public: | 35 public: |
36 static RemotePlayback* create(ScriptState*, HTMLMediaElement&); | 36 static RemotePlayback* create(ScriptState*, HTMLMediaElement&); |
37 | 37 |
| 38 // Notifies this object that disableRemotePlayback attribute was set on the |
| 39 // corresponding media element. |
| 40 void remotePlaybackDisabled(); |
| 41 |
38 // EventTarget implementation. | 42 // EventTarget implementation. |
39 const WTF::AtomicString& interfaceName() const override; | 43 const WTF::AtomicString& interfaceName() const override; |
40 ExecutionContext* getExecutionContext() const override; | 44 ExecutionContext* getExecutionContext() const override; |
41 | 45 |
42 // Starts notifying the page about the changes to the remote playback devices | 46 // Starts notifying the page about the changes to the remote playback devices |
43 // availability via the provided callback. May start the monitoring of remote | 47 // availability via the provided callback. May start the monitoring of remote |
44 // playback devices if it isn't running yet. | 48 // playback devices if it isn't running yet. |
45 ScriptPromise watchAvailability(RemotePlaybackAvailabilityCallback*); | 49 ScriptPromise watchAvailability(RemotePlaybackAvailabilityCallback*); |
46 | 50 |
47 // Cancels updating the page via the callback specified by its id. | 51 // Cancels updating the page via the callback specified by its id. |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 bool m_availability; | 96 bool m_availability; |
93 HeapHashMap<int, Member<RemotePlaybackAvailabilityCallback>> | 97 HeapHashMap<int, Member<RemotePlaybackAvailabilityCallback>> |
94 m_availabilityCallbacks; | 98 m_availabilityCallbacks; |
95 Member<HTMLMediaElement> m_mediaElement; | 99 Member<HTMLMediaElement> m_mediaElement; |
96 Member<ScriptPromiseResolver> m_promptPromiseResolver; | 100 Member<ScriptPromiseResolver> m_promptPromiseResolver; |
97 }; | 101 }; |
98 | 102 |
99 } // namespace blink | 103 } // namespace blink |
100 | 104 |
101 #endif // RemotePlayback_h | 105 #endif // RemotePlayback_h |
OLD | NEW |