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 "web/AudioOutputDeviceClientImpl.h" | 5 #include "modules/audio_output_devices/AudioOutputDeviceClientImpl.h" |
| 6 |
| 7 #include <memory> |
6 | 8 |
7 #include "core/dom/Document.h" | 9 #include "core/dom/Document.h" |
8 #include "core/dom/ExecutionContext.h" | 10 #include "core/dom/ExecutionContext.h" |
| 11 #include "core/frame/WebLocalFrameBase.h" |
9 #include "public/web/WebFrameClient.h" | 12 #include "public/web/WebFrameClient.h" |
10 #include "web/WebLocalFrameImpl.h" | |
11 #include <memory> | |
12 | 13 |
13 namespace blink { | 14 namespace blink { |
14 | 15 |
15 AudioOutputDeviceClientImpl::AudioOutputDeviceClientImpl(LocalFrame& frame) | 16 AudioOutputDeviceClientImpl::AudioOutputDeviceClientImpl(LocalFrame& frame) |
16 : AudioOutputDeviceClient(frame) {} | 17 : AudioOutputDeviceClient(frame) {} |
17 | 18 |
18 AudioOutputDeviceClientImpl::~AudioOutputDeviceClientImpl() {} | 19 AudioOutputDeviceClientImpl::~AudioOutputDeviceClientImpl() {} |
19 | 20 |
20 void AudioOutputDeviceClientImpl::CheckIfAudioSinkExistsAndIsAuthorized( | 21 void AudioOutputDeviceClientImpl::CheckIfAudioSinkExistsAndIsAuthorized( |
21 ExecutionContext* context, | 22 ExecutionContext* context, |
22 const WebString& sink_id, | 23 const WebString& sink_id, |
23 std::unique_ptr<WebSetSinkIdCallbacks> callbacks) { | 24 std::unique_ptr<WebSetSinkIdCallbacks> callbacks) { |
24 DCHECK(context); | 25 DCHECK(context); |
25 DCHECK(context->IsDocument()); | 26 DCHECK(context->IsDocument()); |
26 Document* document = ToDocument(context); | 27 Document* document = ToDocument(context); |
27 WebLocalFrameImpl* web_frame = | 28 WebLocalFrameBase* web_frame = |
28 WebLocalFrameImpl::FromFrame(document->GetFrame()); | 29 WebLocalFrameBase::FromFrame(document->GetFrame()); |
29 web_frame->Client()->CheckIfAudioSinkExistsAndIsAuthorized( | 30 web_frame->Client()->CheckIfAudioSinkExistsAndIsAuthorized( |
30 sink_id, WebSecurityOrigin(context->GetSecurityOrigin()), | 31 sink_id, WebSecurityOrigin(context->GetSecurityOrigin()), |
31 callbacks.release()); | 32 callbacks.release()); |
32 } | 33 } |
33 | 34 |
34 } // namespace blink | 35 } // namespace blink |
OLD | NEW |