Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser_render_process_host.h" | 8 #include "content/browser/renderer_host/browser_render_process_host.h" |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 352 ResourceMessageFilter* resource_message_filter = new ResourceMessageFilter( | 352 ResourceMessageFilter* resource_message_filter = new ResourceMessageFilter( |
| 353 id(), ChildProcessInfo::RENDER_PROCESS, | 353 id(), ChildProcessInfo::RENDER_PROCESS, |
| 354 &browser_context()->GetResourceContext(), | 354 &browser_context()->GetResourceContext(), |
| 355 new RendererURLRequestContextSelector(browser_context(), id()), | 355 new RendererURLRequestContextSelector(browser_context(), id()), |
| 356 content::GetContentClient()->browser()->GetResourceDispatcherHost()); | 356 content::GetContentClient()->browser()->GetResourceDispatcherHost()); |
| 357 | 357 |
| 358 channel_->AddFilter(resource_message_filter); | 358 channel_->AddFilter(resource_message_filter); |
| 359 channel_->AddFilter(new AudioInputRendererHost()); | 359 channel_->AddFilter(new AudioInputRendererHost()); |
| 360 channel_->AddFilter( | 360 channel_->AddFilter( |
| 361 new AudioRendererHost(&browser_context()->GetResourceContext())); | 361 new AudioRendererHost(&browser_context()->GetResourceContext())); |
| 362 channel_->AddFilter(new VideoCaptureHost()); | 362 channel_->AddFilter( |
| 363 new VideoCaptureHost(&browser_context()->GetResourceContext())); | |
|
wjia(left Chromium)
2011/08/17 21:13:54
do you need content::ResourceContext or just media
mflodman_chromium_OOO
2011/08/19 11:07:09
Done.
| |
| 363 channel_->AddFilter( | 364 channel_->AddFilter( |
| 364 new AppCacheDispatcherHost(&browser_context()->GetResourceContext(), | 365 new AppCacheDispatcherHost(&browser_context()->GetResourceContext(), |
| 365 id())); | 366 id())); |
| 366 channel_->AddFilter(new ClipboardMessageFilter()); | 367 channel_->AddFilter(new ClipboardMessageFilter()); |
| 367 channel_->AddFilter( | 368 channel_->AddFilter( |
| 368 new DOMStorageMessageFilter(id(), browser_context()->GetWebKitContext())); | 369 new DOMStorageMessageFilter(id(), browser_context()->GetWebKitContext())); |
| 369 channel_->AddFilter( | 370 channel_->AddFilter( |
| 370 new IndexedDBDispatcherHost(id(), browser_context()->GetWebKitContext())); | 371 new IndexedDBDispatcherHost(id(), browser_context()->GetWebKitContext())); |
| 371 channel_->AddFilter( | 372 channel_->AddFilter( |
| 372 GeolocationDispatcherHost::New( | 373 GeolocationDispatcherHost::New( |
| 373 id(), browser_context()->GetGeolocationPermissionContext())); | 374 id(), browser_context()->GetGeolocationPermissionContext())); |
| 374 channel_->AddFilter(new GpuMessageFilter(id(), widget_helper_.get())); | 375 channel_->AddFilter(new GpuMessageFilter(id(), widget_helper_.get())); |
| 375 channel_->AddFilter(new media_stream::MediaStreamDispatcherHost(id())); | 376 channel_->AddFilter(new media_stream::MediaStreamDispatcherHost( |
| 377 &browser_context()->GetResourceContext(), id())); | |
|
wjia(left Chromium)
2011/08/17 21:13:54
ditto.
mflodman_chromium_OOO
2011/08/19 11:07:09
Done.
| |
| 376 channel_->AddFilter(new PepperFileMessageFilter(id(), browser_context())); | 378 channel_->AddFilter(new PepperFileMessageFilter(id(), browser_context())); |
| 377 channel_->AddFilter( | 379 channel_->AddFilter( |
| 378 new PepperMessageFilter(&browser_context()->GetResourceContext())); | 380 new PepperMessageFilter(&browser_context()->GetResourceContext())); |
| 379 channel_->AddFilter(new speech_input::SpeechInputDispatcherHost(id())); | 381 channel_->AddFilter(new speech_input::SpeechInputDispatcherHost(id())); |
| 380 channel_->AddFilter( | 382 channel_->AddFilter( |
| 381 new FileSystemDispatcherHost(&browser_context()->GetResourceContext())); | 383 new FileSystemDispatcherHost(&browser_context()->GetResourceContext())); |
| 382 channel_->AddFilter(new device_orientation::MessageFilter()); | 384 channel_->AddFilter(new device_orientation::MessageFilter()); |
| 383 channel_->AddFilter( | 385 channel_->AddFilter( |
| 384 new BlobMessageFilter(id(), browser_context()->GetBlobStorageContext())); | 386 new BlobMessageFilter(id(), browser_context()->GetBlobStorageContext())); |
| 385 channel_->AddFilter(new FileUtilitiesMessageFilter(id())); | 387 channel_->AddFilter(new FileUtilitiesMessageFilter(id())); |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 920 void BrowserRenderProcessHost::OnRevealFolderInOS(const FilePath& path) { | 922 void BrowserRenderProcessHost::OnRevealFolderInOS(const FilePath& path) { |
| 921 // Only honor the request if appropriate persmissions are granted. | 923 // Only honor the request if appropriate persmissions are granted. |
| 922 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(id(), path)) | 924 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(id(), path)) |
| 923 content::GetContentClient()->browser()->RevealFolderInOS(path); | 925 content::GetContentClient()->browser()->RevealFolderInOS(path); |
| 924 } | 926 } |
| 925 | 927 |
| 926 void BrowserRenderProcessHost::OnSavedPageAsMHTML(int job_id, bool success) { | 928 void BrowserRenderProcessHost::OnSavedPageAsMHTML(int job_id, bool success) { |
| 927 content::GetContentClient()->browser()->GetMHTMLGenerationManager()-> | 929 content::GetContentClient()->browser()->GetMHTMLGenerationManager()-> |
| 928 MHTMLGenerated(job_id, success); | 930 MHTMLGenerated(job_id, success); |
| 929 } | 931 } |
| OLD | NEW |