OLD | NEW |
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 // Represents the browser side of the browser <--> renderer communication | 5 // Represents the browser side of the browser <--> renderer communication |
6 // channel. There will be one RenderProcessHost per renderer process. | 6 // channel. There will be one RenderProcessHost per renderer process. |
7 | 7 |
8 #include "content/browser/renderer_host/render_process_host_impl.h" | 8 #include "content/browser/renderer_host/render_process_host_impl.h" |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 void CacheShaderInfo(int32 id, base::FilePath path) { | 206 void CacheShaderInfo(int32 id, base::FilePath path) { |
207 ShaderCacheFactory::GetInstance()->SetCacheInfo(id, path); | 207 ShaderCacheFactory::GetInstance()->SetCacheInfo(id, path); |
208 } | 208 } |
209 | 209 |
210 void RemoveShaderInfo(int32 id) { | 210 void RemoveShaderInfo(int32 id) { |
211 ShaderCacheFactory::GetInstance()->RemoveCacheInfo(id); | 211 ShaderCacheFactory::GetInstance()->RemoveCacheInfo(id); |
212 } | 212 } |
213 | 213 |
214 scoped_ptr<IPC::Message> SendAudioHardwareConfig() { | 214 scoped_ptr<IPC::Message> SendAudioHardwareConfig() { |
215 media::AudioManager* am = media::AudioManager::Get(); | 215 media::AudioManager* am = media::AudioManager::Get(); |
216 DCHECK(am->GetTaskRunner()->BelongsToCurrentThread()); | 216 DCHECK(am->GetWorkerTaskRunner()->BelongsToCurrentThread()); |
217 return make_scoped_ptr(new ViewMsg_SetAudioHardwareConfig( | 217 return make_scoped_ptr(new ViewMsg_SetAudioHardwareConfig( |
218 am->GetDefaultOutputStreamParameters(), | 218 am->GetDefaultOutputStreamParameters(), |
219 am->GetInputStreamParameters(media::AudioManagerBase::kDefaultDeviceId))); | 219 am->GetInputStreamParameters(media::AudioManagerBase::kDefaultDeviceId))); |
220 } | 220 } |
221 | 221 |
222 net::URLRequestContext* GetRequestContext( | 222 net::URLRequestContext* GetRequestContext( |
223 scoped_refptr<net::URLRequestContextGetter> request_context, | 223 scoped_refptr<net::URLRequestContextGetter> request_context, |
224 scoped_refptr<net::URLRequestContextGetter> media_request_context, | 224 scoped_refptr<net::URLRequestContextGetter> media_request_context, |
225 ResourceType resource_type) { | 225 ResourceType resource_type) { |
226 // If the request has resource type of RESOURCE_TYPE_MEDIA, we use a request | 226 // If the request has resource type of RESOURCE_TYPE_MEDIA, we use a request |
(...skipping 2104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2331 tracked_objects::ScopedTracker tracking_profile6( | 2331 tracked_objects::ScopedTracker tracking_profile6( |
2332 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 2332 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
2333 "465841 " | 2333 "465841 " |
2334 "RenderProcessHostImpl::OnProcessLaunched::SendQueuedMessages")); | 2334 "RenderProcessHostImpl::OnProcessLaunched::SendQueuedMessages")); |
2335 while (!queued_messages_.empty()) { | 2335 while (!queued_messages_.empty()) { |
2336 Send(queued_messages_.front()); | 2336 Send(queued_messages_.front()); |
2337 queued_messages_.pop(); | 2337 queued_messages_.pop(); |
2338 } | 2338 } |
2339 | 2339 |
2340 base::PostTaskAndReplyWithResult( | 2340 base::PostTaskAndReplyWithResult( |
2341 media::AudioManager::Get()->GetTaskRunner().get(), FROM_HERE, | 2341 media::AudioManager::Get()->GetWorkerTaskRunner().get(), FROM_HERE, |
2342 base::Bind(&SendAudioHardwareConfig), | 2342 base::Bind(&SendAudioHardwareConfig), |
2343 base::Bind(base::IgnoreResult(&RenderProcessHostImpl::SendHelper), | 2343 base::Bind(base::IgnoreResult(&RenderProcessHostImpl::SendHelper), |
2344 weak_factory_.GetWeakPtr())); | 2344 weak_factory_.GetWeakPtr())); |
2345 | 2345 |
2346 #if defined(ENABLE_WEBRTC) | 2346 #if defined(ENABLE_WEBRTC) |
2347 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/465841 | 2347 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/465841 |
2348 // is fixed. | 2348 // is fixed. |
2349 tracked_objects::ScopedTracker tracking_profile7( | 2349 tracked_objects::ScopedTracker tracking_profile7( |
2350 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 2350 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
2351 "465841 RenderProcessHostImpl::OnProcessLaunched::EnableAec")); | 2351 "465841 RenderProcessHostImpl::OnProcessLaunched::EnableAec")); |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2489 if (worker_ref_count_ == 0) | 2489 if (worker_ref_count_ == 0) |
2490 Cleanup(); | 2490 Cleanup(); |
2491 } | 2491 } |
2492 | 2492 |
2493 void RenderProcessHostImpl::GetAudioOutputControllers( | 2493 void RenderProcessHostImpl::GetAudioOutputControllers( |
2494 const GetAudioOutputControllersCallback& callback) const { | 2494 const GetAudioOutputControllersCallback& callback) const { |
2495 audio_renderer_host()->GetOutputControllers(callback); | 2495 audio_renderer_host()->GetOutputControllers(callback); |
2496 } | 2496 } |
2497 | 2497 |
2498 } // namespace content | 2498 } // namespace content |
OLD | NEW |