| 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 #include "modules/remoteplayback/RemotePlayback.h" | 5 #include "modules/remoteplayback/RemotePlayback.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ScriptPromiseResolver.h" | 7 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| 8 #include "bindings/modules/v8/RemotePlaybackAvailabilityCallback.h" | 8 #include "bindings/modules/v8/RemotePlaybackAvailabilityCallback.h" |
| 9 #include "core/HTMLNames.h" | 9 #include "core/HTMLNames.h" |
| 10 #include "core/dom/DOMException.h" | 10 #include "core/dom/DOMException.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 } | 39 } |
| 40 | 40 |
| 41 } // anonymous namespace | 41 } // anonymous namespace |
| 42 | 42 |
| 43 // static | 43 // static |
| 44 RemotePlayback* RemotePlayback::create(HTMLMediaElement& element) { | 44 RemotePlayback* RemotePlayback::create(HTMLMediaElement& element) { |
| 45 return new RemotePlayback(element); | 45 return new RemotePlayback(element); |
| 46 } | 46 } |
| 47 | 47 |
| 48 RemotePlayback::RemotePlayback(HTMLMediaElement& element) | 48 RemotePlayback::RemotePlayback(HTMLMediaElement& element) |
| 49 : ActiveScriptWrappable(this), | 49 : ActiveScriptWrappable(), |
| 50 m_state(element.isPlayingRemotely() | 50 m_state(element.isPlayingRemotely() |
| 51 ? WebRemotePlaybackState::Connected | 51 ? WebRemotePlaybackState::Connected |
| 52 : WebRemotePlaybackState::Disconnected), | 52 : WebRemotePlaybackState::Disconnected), |
| 53 m_availability(WebRemotePlaybackAvailability::Unknown), | 53 m_availability(WebRemotePlaybackAvailability::Unknown), |
| 54 m_mediaElement(&element) {} | 54 m_mediaElement(&element) {} |
| 55 | 55 |
| 56 const AtomicString& RemotePlayback::interfaceName() const { | 56 const AtomicString& RemotePlayback::interfaceName() const { |
| 57 return EventTargetNames::RemotePlayback; | 57 return EventTargetNames::RemotePlayback; |
| 58 } | 58 } |
| 59 | 59 |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 } | 307 } |
| 308 | 308 |
| 309 DEFINE_TRACE_WRAPPERS(RemotePlayback) { | 309 DEFINE_TRACE_WRAPPERS(RemotePlayback) { |
| 310 for (auto callback : m_availabilityCallbacks.values()) { | 310 for (auto callback : m_availabilityCallbacks.values()) { |
| 311 visitor->traceWrappers(callback); | 311 visitor->traceWrappers(callback); |
| 312 } | 312 } |
| 313 EventTargetWithInlineData::traceWrappers(visitor); | 313 EventTargetWithInlineData::traceWrappers(visitor); |
| 314 } | 314 } |
| 315 | 315 |
| 316 } // namespace blink | 316 } // namespace blink |
| OLD | NEW |