Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Side by Side Diff: third_party/WebKit/Source/web/AudioOutputDeviceClientImpl.cpp

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include <memory>
12 11
13 namespace blink { 12 namespace blink {
14 13
15 AudioOutputDeviceClientImpl* AudioOutputDeviceClientImpl::create() 14 AudioOutputDeviceClientImpl* AudioOutputDeviceClientImpl::create()
16 { 15 {
17 return new AudioOutputDeviceClientImpl(); 16 return new AudioOutputDeviceClientImpl();
18 } 17 }
19 18
20 AudioOutputDeviceClientImpl::AudioOutputDeviceClientImpl() 19 AudioOutputDeviceClientImpl::AudioOutputDeviceClientImpl()
21 { 20 {
22 } 21 }
23 22
24 AudioOutputDeviceClientImpl::~AudioOutputDeviceClientImpl() 23 AudioOutputDeviceClientImpl::~AudioOutputDeviceClientImpl()
25 { 24 {
26 } 25 }
27 26
28 void AudioOutputDeviceClientImpl::checkIfAudioSinkExistsAndIsAuthorized(Executio nContext* context, const WebString& sinkId, std::unique_ptr<WebSetSinkIdCallback s> callbacks) 27 void AudioOutputDeviceClientImpl::checkIfAudioSinkExistsAndIsAuthorized(Executio nContext* context, const WebString& sinkId, PassOwnPtr<WebSetSinkIdCallbacks> ca llbacks)
29 { 28 {
30 DCHECK(context); 29 DCHECK(context);
31 DCHECK(context->isDocument()); 30 DCHECK(context->isDocument());
32 Document* document = toDocument(context); 31 Document* document = toDocument(context);
33 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(document->frame() ); 32 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(document->frame() );
34 webFrame->client()->checkIfAudioSinkExistsAndIsAuthorized(sinkId, WebSecurit yOrigin(context->getSecurityOrigin()), callbacks.release()); 33 webFrame->client()->checkIfAudioSinkExistsAndIsAuthorized(sinkId, WebSecurit yOrigin(context->getSecurityOrigin()), callbacks.leakPtr());
35 } 34 }
36 35
37 } // namespace blink 36 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/AudioOutputDeviceClientImpl.h ('k') | third_party/WebKit/Source/web/ChromeClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698