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 #include "config.h" | 5 #include "config.h" |
6 #include "modules/audio_output_devices/SetSinkIdCallbacks.h" | 6 #include "modules/audio_output_devices/SetSinkIdCallbacks.h" |
7 | 7 |
8 #include "bindings/core/v8/ScriptPromiseResolver.h" | 8 #include "bindings/core/v8/ScriptPromiseResolver.h" |
9 #include "modules/audio_output_devices/HTMLMediaElementAudioOutputDevice.h" | 9 #include "modules/audio_output_devices/HTMLMediaElementAudioOutputDevice.h" |
10 #include "platform/Logging.h" | 10 #include "platform/Logging.h" |
11 #include "public/platform/WebSetSinkIdError.h" | 11 #include "public/platform/WebSetSinkIdError.h" |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 | 14 |
15 SetSinkIdCallbacks::SetSinkIdCallbacks(PassRefPtrWillBeRawPtr<ScriptPromiseResol
ver> resolver, HTMLMediaElement& element, const String& sinkId) | 15 SetSinkIdCallbacks::SetSinkIdCallbacks(ScriptPromiseResolver* resolver, HTMLMedi
aElement& element, const String& sinkId) |
16 : m_resolver(resolver) | 16 : m_resolver(resolver) |
17 , m_element(element) | 17 , m_element(element) |
18 , m_sinkId(sinkId) | 18 , m_sinkId(sinkId) |
19 { | 19 { |
20 ASSERT(m_resolver); | 20 ASSERT(m_resolver); |
21 WTF_LOG(Media, __FUNCTION__); | 21 WTF_LOG(Media, __FUNCTION__); |
22 } | 22 } |
23 | 23 |
24 SetSinkIdCallbacks::~SetSinkIdCallbacks() | 24 SetSinkIdCallbacks::~SetSinkIdCallbacks() |
25 { | 25 { |
(...skipping 29 matching lines...) Expand all Loading... |
55 break; | 55 break; |
56 case WebSetSinkIdError::ErrorTypeAbort: | 56 case WebSetSinkIdError::ErrorTypeAbort: |
57 m_resolver->reject(DOMException::create(AbortError, error->message)); | 57 m_resolver->reject(DOMException::create(AbortError, error->message)); |
58 break; | 58 break; |
59 default: | 59 default: |
60 ASSERT_NOT_REACHED(); | 60 ASSERT_NOT_REACHED(); |
61 } | 61 } |
62 } | 62 } |
63 | 63 |
64 } // namespace blink | 64 } // namespace blink |
OLD | NEW |