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/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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 #include "content/browser/child_process_security_policy.h" | 44 #include "content/browser/child_process_security_policy.h" |
45 #include "content/browser/device_orientation/message_filter.h" | 45 #include "content/browser/device_orientation/message_filter.h" |
46 #include "content/browser/download/mhtml_generation_manager.h" | 46 #include "content/browser/download/mhtml_generation_manager.h" |
47 #include "content/browser/file_system/file_system_dispatcher_host.h" | 47 #include "content/browser/file_system/file_system_dispatcher_host.h" |
48 #include "content/browser/geolocation/geolocation_dispatcher_host.h" | 48 #include "content/browser/geolocation/geolocation_dispatcher_host.h" |
49 #include "content/browser/gpu/gpu_data_manager.h" | 49 #include "content/browser/gpu/gpu_data_manager.h" |
50 #include "content/browser/gpu/gpu_process_host.h" | 50 #include "content/browser/gpu/gpu_process_host.h" |
51 #include "content/browser/in_process_webkit/dom_storage_message_filter.h" | 51 #include "content/browser/in_process_webkit/dom_storage_message_filter.h" |
52 #include "content/browser/in_process_webkit/indexed_db_dispatcher_host.h" | 52 #include "content/browser/in_process_webkit/indexed_db_dispatcher_host.h" |
53 #include "content/browser/mime_registry_message_filter.h" | 53 #include "content/browser/mime_registry_message_filter.h" |
54 #include "content/browser/plugin_service.h" | 54 #include "content/browser/plugin_service_impl.h" |
55 #include "content/browser/profiler_message_filter.h" | 55 #include "content/browser/profiler_message_filter.h" |
56 #include "content/browser/renderer_host/blob_message_filter.h" | 56 #include "content/browser/renderer_host/blob_message_filter.h" |
57 #include "content/browser/renderer_host/clipboard_message_filter.h" | 57 #include "content/browser/renderer_host/clipboard_message_filter.h" |
58 #include "content/browser/renderer_host/database_message_filter.h" | 58 #include "content/browser/renderer_host/database_message_filter.h" |
59 #include "content/browser/renderer_host/file_utilities_message_filter.h" | 59 #include "content/browser/renderer_host/file_utilities_message_filter.h" |
60 #include "content/browser/renderer_host/gamepad_browser_message_filter.h" | 60 #include "content/browser/renderer_host/gamepad_browser_message_filter.h" |
61 #include "content/browser/renderer_host/gpu_message_filter.h" | 61 #include "content/browser/renderer_host/gpu_message_filter.h" |
62 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" | 62 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" |
63 #include "content/browser/renderer_host/media/audio_renderer_host.h" | 63 #include "content/browser/renderer_host/media/audio_renderer_host.h" |
64 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h" | 64 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h" |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 } | 438 } |
439 | 439 |
440 is_initialized_ = true; | 440 is_initialized_ = true; |
441 return true; | 441 return true; |
442 } | 442 } |
443 | 443 |
444 void RenderProcessHostImpl::CreateMessageFilters() { | 444 void RenderProcessHostImpl::CreateMessageFilters() { |
445 scoped_refptr<RenderMessageFilter> render_message_filter( | 445 scoped_refptr<RenderMessageFilter> render_message_filter( |
446 new RenderMessageFilter( | 446 new RenderMessageFilter( |
447 GetID(), | 447 GetID(), |
448 PluginService::GetInstance(), | 448 PluginServiceImpl::GetInstance(), |
449 GetBrowserContext(), | 449 GetBrowserContext(), |
450 GetBrowserContext()->GetRequestContextForRenderProcess(GetID()), | 450 GetBrowserContext()->GetRequestContextForRenderProcess(GetID()), |
451 widget_helper_)); | 451 widget_helper_)); |
452 channel_->AddFilter(render_message_filter); | 452 channel_->AddFilter(render_message_filter); |
453 content::BrowserContext* browser_context = GetBrowserContext(); | 453 content::BrowserContext* browser_context = GetBrowserContext(); |
454 const content::ResourceContext* resource_context = | 454 const content::ResourceContext* resource_context = |
455 &browser_context->GetResourceContext(); | 455 &browser_context->GetResourceContext(); |
456 | 456 |
457 ResourceMessageFilter* resource_message_filter = new ResourceMessageFilter( | 457 ResourceMessageFilter* resource_message_filter = new ResourceMessageFilter( |
458 GetID(), content::PROCESS_TYPE_RENDERER, | 458 GetID(), content::PROCESS_TYPE_RENDERER, |
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1303 void RenderProcessHostImpl::OnRevealFolderInOS(const FilePath& path) { | 1303 void RenderProcessHostImpl::OnRevealFolderInOS(const FilePath& path) { |
1304 // Only honor the request if appropriate persmissions are granted. | 1304 // Only honor the request if appropriate persmissions are granted. |
1305 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(GetID(), path)) | 1305 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(GetID(), path)) |
1306 content::GetContentClient()->browser()->OpenItem(path); | 1306 content::GetContentClient()->browser()->OpenItem(path); |
1307 } | 1307 } |
1308 | 1308 |
1309 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) { | 1309 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) { |
1310 content::GetContentClient()->browser()->GetMHTMLGenerationManager()-> | 1310 content::GetContentClient()->browser()->GetMHTMLGenerationManager()-> |
1311 MHTMLGenerated(job_id, data_size); | 1311 MHTMLGenerated(job_id, data_size); |
1312 } | 1312 } |
OLD | NEW |