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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 9433006: Remove GetAudioManager and GetMediaStreamManager from ResourceContext. The reason is the content mo… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync to head Created 8 years, 10 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 | Annotate | Revision Log
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 // 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 #if defined(OS_WIN) 10 #if defined(OS_WIN)
(...skipping 23 matching lines...) Expand all
34 #include "base/rand_util.h" 34 #include "base/rand_util.h"
35 #include "base/stl_util.h" 35 #include "base/stl_util.h"
36 #include "base/string_util.h" 36 #include "base/string_util.h"
37 #include "base/sys_info.h" 37 #include "base/sys_info.h"
38 #include "base/threading/thread.h" 38 #include "base/threading/thread.h"
39 #include "base/threading/thread_restrictions.h" 39 #include "base/threading/thread_restrictions.h"
40 #include "base/tracked_objects.h" 40 #include "base/tracked_objects.h"
41 #include "content/browser/appcache/appcache_dispatcher_host.h" 41 #include "content/browser/appcache/appcache_dispatcher_host.h"
42 #include "content/browser/appcache/chrome_appcache_service.h" 42 #include "content/browser/appcache/chrome_appcache_service.h"
43 #include "content/browser/browser_main.h" 43 #include "content/browser/browser_main.h"
44 #include "content/browser/browser_main_loop.h"
44 #include "content/browser/child_process_security_policy_impl.h" 45 #include "content/browser/child_process_security_policy_impl.h"
45 #include "content/browser/chrome_blob_storage_context.h" 46 #include "content/browser/chrome_blob_storage_context.h"
46 #include "content/browser/device_orientation/message_filter.h" 47 #include "content/browser/device_orientation/message_filter.h"
47 #include "content/browser/download/mhtml_generation_manager.h" 48 #include "content/browser/download/mhtml_generation_manager.h"
48 #include "content/browser/file_system/file_system_dispatcher_host.h" 49 #include "content/browser/file_system/file_system_dispatcher_host.h"
49 #include "content/browser/geolocation/geolocation_dispatcher_host.h" 50 #include "content/browser/geolocation/geolocation_dispatcher_host.h"
50 #include "content/browser/gpu/gpu_data_manager_impl.h" 51 #include "content/browser/gpu/gpu_data_manager_impl.h"
51 #include "content/browser/gpu/gpu_process_host.h" 52 #include "content/browser/gpu/gpu_process_host.h"
52 #include "content/browser/in_process_webkit/dom_storage_message_filter.h" 53 #include "content/browser/in_process_webkit/dom_storage_message_filter.h"
53 #include "content/browser/in_process_webkit/indexed_db_dispatcher_host.h" 54 #include "content/browser/in_process_webkit/indexed_db_dispatcher_host.h"
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 channel_->AddFilter(render_message_filter); 456 channel_->AddFilter(render_message_filter);
456 content::BrowserContext* browser_context = GetBrowserContext(); 457 content::BrowserContext* browser_context = GetBrowserContext();
457 content::ResourceContext* resource_context = 458 content::ResourceContext* resource_context =
458 browser_context->GetResourceContext(); 459 browser_context->GetResourceContext();
459 460
460 ResourceMessageFilter* resource_message_filter = new ResourceMessageFilter( 461 ResourceMessageFilter* resource_message_filter = new ResourceMessageFilter(
461 GetID(), content::PROCESS_TYPE_RENDERER, resource_context, 462 GetID(), content::PROCESS_TYPE_RENDERER, resource_context,
462 new RendererURLRequestContextSelector(browser_context, GetID())); 463 new RendererURLRequestContextSelector(browser_context, GetID()));
463 464
464 channel_->AddFilter(resource_message_filter); 465 channel_->AddFilter(resource_message_filter);
465 channel_->AddFilter(new AudioInputRendererHost(resource_context)); 466 channel_->AddFilter(new AudioInputRendererHost(
466 channel_->AddFilter(new AudioRendererHost(resource_context)); 467 resource_context,
467 channel_->AddFilter(new VideoCaptureHost(resource_context)); 468 content::BrowserMainLoop::GetAudioManager()));
tommi (sloooow) - chröme 2012/02/23 07:50:59 nit: cache this in a local variable on the stack i
jam 2012/02/23 08:05:09 Done.
469 channel_->AddFilter(new AudioRendererHost(
470 resource_context, content::BrowserMainLoop::GetAudioManager()));
471 channel_->AddFilter(new VideoCaptureHost(
472 resource_context, content::BrowserMainLoop::GetAudioManager()));
468 channel_->AddFilter(new AppCacheDispatcherHost( 473 channel_->AddFilter(new AppCacheDispatcherHost(
469 static_cast<ChromeAppCacheService*>( 474 static_cast<ChromeAppCacheService*>(
470 BrowserContext::GetAppCacheService(browser_context)), 475 BrowserContext::GetAppCacheService(browser_context)),
471 GetID())); 476 GetID()));
472 channel_->AddFilter(new ClipboardMessageFilter()); 477 channel_->AddFilter(new ClipboardMessageFilter());
473 channel_->AddFilter(new DOMStorageMessageFilter(GetID(), 478 channel_->AddFilter(new DOMStorageMessageFilter(GetID(),
474 BrowserContext::GetWebKitContext(browser_context))); 479 BrowserContext::GetWebKitContext(browser_context)));
475 channel_->AddFilter(new IndexedDBDispatcherHost(GetID(), 480 channel_->AddFilter(new IndexedDBDispatcherHost(GetID(),
476 BrowserContext::GetWebKitContext(browser_context))); 481 BrowserContext::GetWebKitContext(browser_context)));
477 channel_->AddFilter(GeolocationDispatcherHost::New( 482 channel_->AddFilter(GeolocationDispatcherHost::New(
478 GetID(), browser_context->GetGeolocationPermissionContext())); 483 GetID(), browser_context->GetGeolocationPermissionContext()));
479 channel_->AddFilter(new GpuMessageFilter(GetID(), widget_helper_.get())); 484 channel_->AddFilter(new GpuMessageFilter(GetID(), widget_helper_.get()));
480 channel_->AddFilter(new media_stream::MediaStreamDispatcherHost( 485 channel_->AddFilter(new media_stream::MediaStreamDispatcherHost(
481 resource_context, GetID())); 486 resource_context, GetID(),
487 content::BrowserMainLoop::GetAudioManager()));
482 channel_->AddFilter(new PepperFileMessageFilter(GetID(), browser_context)); 488 channel_->AddFilter(new PepperFileMessageFilter(GetID(), browser_context));
483 channel_->AddFilter(new PepperMessageFilter(PepperMessageFilter::RENDERER, 489 channel_->AddFilter(new PepperMessageFilter(PepperMessageFilter::RENDERER,
484 GetID(), resource_context)); 490 GetID(), resource_context));
485 #if defined(ENABLE_INPUT_SPEECH) 491 #if defined(ENABLE_INPUT_SPEECH)
486 channel_->AddFilter(new speech_input::SpeechInputDispatcherHost( 492 channel_->AddFilter(new speech_input::SpeechInputDispatcherHost(
487 GetID(), browser_context->GetRequestContext(), 493 GetID(), browser_context->GetRequestContext(),
488 browser_context->GetSpeechInputPreferences(), resource_context)); 494 browser_context->GetSpeechInputPreferences(),
495 content::BrowserMainLoop::GetAudioManager()));
489 #endif 496 #endif
490 channel_->AddFilter(new FileSystemDispatcherHost( 497 channel_->AddFilter(new FileSystemDispatcherHost(
491 browser_context->GetRequestContext(), 498 browser_context->GetRequestContext(),
492 BrowserContext::GetFileSystemContext(browser_context))); 499 BrowserContext::GetFileSystemContext(browser_context)));
493 channel_->AddFilter(new device_orientation::MessageFilter()); 500 channel_->AddFilter(new device_orientation::MessageFilter());
494 channel_->AddFilter(new BlobMessageFilter(GetID(), 501 channel_->AddFilter(new BlobMessageFilter(GetID(),
495 ChromeBlobStorageContext::GetFor(browser_context))); 502 ChromeBlobStorageContext::GetFor(browser_context)));
496 channel_->AddFilter(new FileUtilitiesMessageFilter(GetID())); 503 channel_->AddFilter(new FileUtilitiesMessageFilter(GetID()));
497 channel_->AddFilter(new MimeRegistryMessageFilter()); 504 channel_->AddFilter(new MimeRegistryMessageFilter());
498 channel_->AddFilter(new DatabaseMessageFilter( 505 channel_->AddFilter(new DatabaseMessageFilter(
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after
1310 // Only honor the request if appropriate persmissions are granted. 1317 // Only honor the request if appropriate persmissions are granted.
1311 if (ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile(GetID(), 1318 if (ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile(GetID(),
1312 path)) 1319 path))
1313 content::GetContentClient()->browser()->OpenItem(path); 1320 content::GetContentClient()->browser()->OpenItem(path);
1314 } 1321 }
1315 1322
1316 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) { 1323 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) {
1317 content::GetContentClient()->browser()->GetMHTMLGenerationManager()-> 1324 content::GetContentClient()->browser()->GetMHTMLGenerationManager()->
1318 MHTMLGenerated(job_id, data_size); 1325 MHTMLGenerated(job_id, data_size);
1319 } 1326 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698