| 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 "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
| 9 #include "core/events/Event.h" | 9 #include "core/events/Event.h" |
| 10 #include "core/html/HTMLMediaElement.h" | 10 #include "core/html/HTMLMediaElement.h" |
| 11 #include "modules/EventTargetModules.h" | 11 #include "modules/EventTargetModules.h" |
| 12 #include "modules/remoteplayback/RemotePlaybackAvailability.h" | 12 #include "modules/remoteplayback/RemotePlaybackAvailability.h" |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 const AtomicString& remotePlaybackStateToString(WebRemotePlaybackState state) | 18 const AtomicString& remotePlaybackStateToString(WebRemotePlaybackState state) |
| 19 { | 19 { |
| 20 DEFINE_STATIC_LOCAL(const AtomicString, connectedValue, ("connected", Atomic
String::ConstructFromLiteral)); | 20 DEFINE_STATIC_LOCAL(const AtomicString, connectedValue, ("connected")); |
| 21 DEFINE_STATIC_LOCAL(const AtomicString, disconnectedValue, ("disconnected",
AtomicString::ConstructFromLiteral)); | 21 DEFINE_STATIC_LOCAL(const AtomicString, disconnectedValue, ("disconnected"))
; |
| 22 | 22 |
| 23 switch (state) { | 23 switch (state) { |
| 24 case WebRemotePlaybackState::Connected: | 24 case WebRemotePlaybackState::Connected: |
| 25 return connectedValue; | 25 return connectedValue; |
| 26 case WebRemotePlaybackState::Disconnected: | 26 case WebRemotePlaybackState::Disconnected: |
| 27 return disconnectedValue; | 27 return disconnectedValue; |
| 28 } | 28 } |
| 29 | 29 |
| 30 ASSERT_NOT_REACHED(); | 30 ASSERT_NOT_REACHED(); |
| 31 return disconnectedValue; | 31 return disconnectedValue; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 } | 107 } |
| 108 | 108 |
| 109 DEFINE_TRACE(RemotePlayback) | 109 DEFINE_TRACE(RemotePlayback) |
| 110 { | 110 { |
| 111 visitor->trace(m_availabilityObjects); | 111 visitor->trace(m_availabilityObjects); |
| 112 RefCountedGarbageCollectedEventTargetWithInlineData<RemotePlayback>::trace(v
isitor); | 112 RefCountedGarbageCollectedEventTargetWithInlineData<RemotePlayback>::trace(v
isitor); |
| 113 DOMWindowProperty::trace(visitor); | 113 DOMWindowProperty::trace(visitor); |
| 114 } | 114 } |
| 115 | 115 |
| 116 } // namespace blink | 116 } // namespace blink |
| OLD | NEW |