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

Side by Side Diff: content/renderer/media/renderer_webaudiodevice_impl.cc

Issue 2850593002: Revert of [blink] Unique pointers in Platform.h (Closed)
Patch Set: Created 3 years, 7 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/renderer/media/renderer_webaudiodevice_impl.h" 5 #include "content/renderer/media/renderer_webaudiodevice_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 int session_id, 97 int session_id,
98 const std::string& device_id, 98 const std::string& device_id,
99 const url::Origin& security_origin) { 99 const url::Origin& security_origin) {
100 return AudioDeviceFactory::GetOutputDeviceInfo(frame_id, session_id, 100 return AudioDeviceFactory::GetOutputDeviceInfo(frame_id, session_id,
101 device_id, security_origin) 101 device_id, security_origin)
102 .output_params(); 102 .output_params();
103 } 103 }
104 104
105 } // namespace 105 } // namespace
106 106
107 std::unique_ptr<RendererWebAudioDeviceImpl> RendererWebAudioDeviceImpl::Create( 107 RendererWebAudioDeviceImpl* RendererWebAudioDeviceImpl::Create(
108 media::ChannelLayout layout, 108 media::ChannelLayout layout,
109 int channels, 109 int channels,
110 const blink::WebAudioLatencyHint& latency_hint, 110 const blink::WebAudioLatencyHint& latency_hint,
111 WebAudioDevice::RenderCallback* callback, 111 WebAudioDevice::RenderCallback* callback,
112 int session_id, 112 int session_id,
113 const url::Origin& security_origin) { 113 const url::Origin& security_origin) {
114 return std::unique_ptr<RendererWebAudioDeviceImpl>( 114 return new RendererWebAudioDeviceImpl(layout, channels, latency_hint,
115 new RendererWebAudioDeviceImpl(layout, channels, latency_hint, callback, 115 callback, session_id, security_origin,
116 session_id, security_origin, 116 base::Bind(&GetOutputDeviceParameters),
117 base::Bind(&GetOutputDeviceParameters), 117 base::Bind(&FrameIdFromCurrentContext));
118 base::Bind(&FrameIdFromCurrentContext)));
119 } 118 }
120 119
121 RendererWebAudioDeviceImpl::RendererWebAudioDeviceImpl( 120 RendererWebAudioDeviceImpl::RendererWebAudioDeviceImpl(
122 media::ChannelLayout layout, 121 media::ChannelLayout layout,
123 int channels, 122 int channels,
124 const blink::WebAudioLatencyHint& latency_hint, 123 const blink::WebAudioLatencyHint& latency_hint,
125 WebAudioDevice::RenderCallback* callback, 124 WebAudioDevice::RenderCallback* callback,
126 int session_id, 125 int session_id,
127 const url::Origin& security_origin, 126 const url::Origin& security_origin,
128 const OutputDeviceParamsCallback& device_params_cb, 127 const OutputDeviceParamsCallback& device_params_cb,
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 const scoped_refptr<base::SingleThreadTaskRunner>& 240 const scoped_refptr<base::SingleThreadTaskRunner>&
242 RendererWebAudioDeviceImpl::GetMediaTaskRunner() { 241 RendererWebAudioDeviceImpl::GetMediaTaskRunner() {
243 if (!media_task_runner_) { 242 if (!media_task_runner_) {
244 media_task_runner_ = 243 media_task_runner_ =
245 RenderThreadImpl::current()->GetMediaThreadTaskRunner(); 244 RenderThreadImpl::current()->GetMediaThreadTaskRunner();
246 } 245 }
247 return media_task_runner_; 246 return media_task_runner_;
248 } 247 }
249 248
250 } // namespace content 249 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698