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 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
(...skipping 25 matching lines...) Expand all Loading... |
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/browser_main_loop.h" |
45 #include "content/browser/child_process_security_policy_impl.h" | 45 #include "content/browser/child_process_security_policy_impl.h" |
46 #include "content/browser/chrome_blob_storage_context.h" | |
47 #include "content/browser/device_orientation/message_filter.h" | 46 #include "content/browser/device_orientation/message_filter.h" |
48 #include "content/browser/download/mhtml_generation_manager.h" | 47 #include "content/browser/download/mhtml_generation_manager.h" |
49 #include "content/browser/file_system/file_and_blob_message_filter.h" | 48 #include "content/browser/fileapi/chrome_blob_storage_context.h" |
| 49 #include "content/browser/fileapi/fileapi_message_filter.h" |
50 #include "content/browser/geolocation/geolocation_dispatcher_host.h" | 50 #include "content/browser/geolocation/geolocation_dispatcher_host.h" |
51 #include "content/browser/gpu/gpu_data_manager_impl.h" | 51 #include "content/browser/gpu/gpu_data_manager_impl.h" |
52 #include "content/browser/gpu/gpu_process_host.h" | 52 #include "content/browser/gpu/gpu_process_host.h" |
53 #include "content/browser/in_process_webkit/dom_storage_context_impl.h" | 53 #include "content/browser/in_process_webkit/dom_storage_context_impl.h" |
54 #include "content/browser/in_process_webkit/dom_storage_message_filter.h" | 54 #include "content/browser/in_process_webkit/dom_storage_message_filter.h" |
| 55 #include "content/browser/in_process_webkit/indexed_db_context_impl.h" |
55 #include "content/browser/in_process_webkit/indexed_db_dispatcher_host.h" | 56 #include "content/browser/in_process_webkit/indexed_db_dispatcher_host.h" |
56 #include "content/browser/in_process_webkit/indexed_db_context_impl.h" | |
57 #include "content/browser/mime_registry_message_filter.h" | 57 #include "content/browser/mime_registry_message_filter.h" |
58 #include "content/browser/plugin_service_impl.h" | 58 #include "content/browser/plugin_service_impl.h" |
59 #include "content/browser/profiler_message_filter.h" | 59 #include "content/browser/profiler_message_filter.h" |
60 #include "content/browser/renderer_host/clipboard_message_filter.h" | 60 #include "content/browser/renderer_host/clipboard_message_filter.h" |
61 #include "content/browser/renderer_host/database_message_filter.h" | 61 #include "content/browser/renderer_host/database_message_filter.h" |
62 #include "content/browser/renderer_host/file_utilities_message_filter.h" | 62 #include "content/browser/renderer_host/file_utilities_message_filter.h" |
63 #include "content/browser/renderer_host/gamepad_browser_message_filter.h" | 63 #include "content/browser/renderer_host/gamepad_browser_message_filter.h" |
64 #include "content/browser/renderer_host/gpu_message_filter.h" | 64 #include "content/browser/renderer_host/gpu_message_filter.h" |
65 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" | 65 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" |
66 #include "content/browser/renderer_host/media/audio_renderer_host.h" | 66 #include "content/browser/renderer_host/media/audio_renderer_host.h" |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 #endif | 492 #endif |
493 channel_->AddFilter(new PepperFileMessageFilter(GetID(), browser_context)); | 493 channel_->AddFilter(new PepperFileMessageFilter(GetID(), browser_context)); |
494 channel_->AddFilter(new PepperMessageFilter(PepperMessageFilter::RENDERER, | 494 channel_->AddFilter(new PepperMessageFilter(PepperMessageFilter::RENDERER, |
495 GetID(), resource_context)); | 495 GetID(), resource_context)); |
496 #if defined(ENABLE_INPUT_SPEECH) | 496 #if defined(ENABLE_INPUT_SPEECH) |
497 channel_->AddFilter(new speech_input::SpeechInputDispatcherHost( | 497 channel_->AddFilter(new speech_input::SpeechInputDispatcherHost( |
498 GetID(), browser_context->GetRequestContext(), | 498 GetID(), browser_context->GetRequestContext(), |
499 browser_context->GetSpeechInputPreferences(), | 499 browser_context->GetSpeechInputPreferences(), |
500 content::BrowserMainLoop::GetAudioManager())); | 500 content::BrowserMainLoop::GetAudioManager())); |
501 #endif | 501 #endif |
502 channel_->AddFilter(new FileAndBlobMessageFilter( | 502 channel_->AddFilter(new FileAPIMessageFilter( |
503 GetID(), | 503 GetID(), |
504 browser_context->GetRequestContext(), | 504 browser_context->GetRequestContext(), |
505 BrowserContext::GetFileSystemContext(browser_context), | 505 BrowserContext::GetFileSystemContext(browser_context), |
506 ChromeBlobStorageContext::GetFor(browser_context))); | 506 ChromeBlobStorageContext::GetFor(browser_context))); |
507 channel_->AddFilter(new device_orientation::MessageFilter()); | 507 channel_->AddFilter(new device_orientation::MessageFilter()); |
508 channel_->AddFilter(new FileUtilitiesMessageFilter(GetID())); | 508 channel_->AddFilter(new FileUtilitiesMessageFilter(GetID())); |
509 channel_->AddFilter(new MimeRegistryMessageFilter()); | 509 channel_->AddFilter(new MimeRegistryMessageFilter()); |
510 channel_->AddFilter(new DatabaseMessageFilter( | 510 channel_->AddFilter(new DatabaseMessageFilter( |
511 BrowserContext::GetDatabaseTracker(browser_context))); | 511 BrowserContext::GetDatabaseTracker(browser_context))); |
512 #if defined(OS_MACOSX) | 512 #if defined(OS_MACOSX) |
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1324 // Only honor the request if appropriate persmissions are granted. | 1324 // Only honor the request if appropriate persmissions are granted. |
1325 if (ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile(GetID(), | 1325 if (ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile(GetID(), |
1326 path)) | 1326 path)) |
1327 content::GetContentClient()->browser()->OpenItem(path); | 1327 content::GetContentClient()->browser()->OpenItem(path); |
1328 } | 1328 } |
1329 | 1329 |
1330 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) { | 1330 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) { |
1331 content::GetContentClient()->browser()->GetMHTMLGenerationManager()-> | 1331 content::GetContentClient()->browser()->GetMHTMLGenerationManager()-> |
1332 MHTMLGenerated(job_id, data_size); | 1332 MHTMLGenerated(job_id, data_size); |
1333 } | 1333 } |
OLD | NEW |