| 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 "web/AudioOutputDeviceClientImpl.h" |
| 6 | 6 |
| 7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
| 8 #include "core/dom/ExecutionContext.h" | 8 #include "core/dom/ExecutionContext.h" |
| 9 #include "public/web/WebFrameClient.h" | 9 #include "public/web/WebFrameClient.h" |
| 10 #include "web/WebLocalFrameImpl.h" | 10 #include "web/WebLocalFrameImpl.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 RawPtr<AudioOutputDeviceClientImpl> AudioOutputDeviceClientImpl::create() | 14 AudioOutputDeviceClientImpl* AudioOutputDeviceClientImpl::create() |
| 15 { | 15 { |
| 16 return new AudioOutputDeviceClientImpl(); | 16 return new AudioOutputDeviceClientImpl(); |
| 17 } | 17 } |
| 18 | 18 |
| 19 AudioOutputDeviceClientImpl::AudioOutputDeviceClientImpl() | 19 AudioOutputDeviceClientImpl::AudioOutputDeviceClientImpl() |
| 20 { | 20 { |
| 21 } | 21 } |
| 22 | 22 |
| 23 AudioOutputDeviceClientImpl::~AudioOutputDeviceClientImpl() | 23 AudioOutputDeviceClientImpl::~AudioOutputDeviceClientImpl() |
| 24 { | 24 { |
| 25 } | 25 } |
| 26 | 26 |
| 27 void AudioOutputDeviceClientImpl::checkIfAudioSinkExistsAndIsAuthorized(Executio
nContext* context, const WebString& sinkId, PassOwnPtr<WebSetSinkIdCallbacks> ca
llbacks) | 27 void AudioOutputDeviceClientImpl::checkIfAudioSinkExistsAndIsAuthorized(Executio
nContext* context, const WebString& sinkId, PassOwnPtr<WebSetSinkIdCallbacks> ca
llbacks) |
| 28 { | 28 { |
| 29 DCHECK(context); | 29 DCHECK(context); |
| 30 DCHECK(context->isDocument()); | 30 DCHECK(context->isDocument()); |
| 31 Document* document = toDocument(context); | 31 Document* document = toDocument(context); |
| 32 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(document->frame()
); | 32 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(document->frame()
); |
| 33 webFrame->client()->checkIfAudioSinkExistsAndIsAuthorized(sinkId, WebSecurit
yOrigin(context->getSecurityOrigin()), callbacks.leakPtr()); | 33 webFrame->client()->checkIfAudioSinkExistsAndIsAuthorized(sinkId, WebSecurit
yOrigin(context->getSecurityOrigin()), callbacks.leakPtr()); |
| 34 } | 34 } |
| 35 | 35 |
| 36 } // namespace blink | 36 } // namespace blink |
| OLD | NEW |