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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 #include "webkit/fileapi/sandbox_mount_point_provider.h" | 107 #include "webkit/fileapi/sandbox_mount_point_provider.h" |
108 #include "webkit/glue/resource_type.h" | 108 #include "webkit/glue/resource_type.h" |
109 #include "webkit/plugins/plugin_switches.h" | 109 #include "webkit/plugins/plugin_switches.h" |
110 | 110 |
111 #if defined(OS_WIN) | 111 #if defined(OS_WIN) |
112 #include "base/synchronization/waitable_event.h" | 112 #include "base/synchronization/waitable_event.h" |
113 #include "content/common/font_cache_dispatcher_win.h" | 113 #include "content/common/font_cache_dispatcher_win.h" |
114 #endif | 114 #endif |
115 | 115 |
116 #if defined(ENABLE_INPUT_SPEECH) | 116 #if defined(ENABLE_INPUT_SPEECH) |
117 #include "content/browser/speech/speech_input_dispatcher_host.h" | 117 #include "content/browser/speech/input_tag_speech_dispatcher_host.h" |
118 #endif | 118 #endif |
119 | 119 |
120 #include "third_party/skia/include/core/SkBitmap.h" | 120 #include "third_party/skia/include/core/SkBitmap.h" |
121 | 121 |
122 using content::BrowserContext; | 122 using content::BrowserContext; |
123 using content::BrowserMessageFilter; | 123 using content::BrowserMessageFilter; |
124 using content::BrowserThread; | 124 using content::BrowserThread; |
125 using content::ChildProcessHost; | 125 using content::ChildProcessHost; |
126 using content::ChildProcessHostImpl; | 126 using content::ChildProcessHostImpl; |
127 using content::UserMetricsAction; | 127 using content::UserMetricsAction; |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 GetID(), browser_context->GetGeolocationPermissionContext())); | 486 GetID(), browser_context->GetGeolocationPermissionContext())); |
487 channel_->AddFilter(new GpuMessageFilter(GetID(), widget_helper_.get())); | 487 channel_->AddFilter(new GpuMessageFilter(GetID(), widget_helper_.get())); |
488 #if defined(ENABLE_WEBRTC) | 488 #if defined(ENABLE_WEBRTC) |
489 channel_->AddFilter(new media_stream::MediaStreamDispatcherHost( | 489 channel_->AddFilter(new media_stream::MediaStreamDispatcherHost( |
490 resource_context, GetID(), content::BrowserMainLoop::GetAudioManager())); | 490 resource_context, GetID(), content::BrowserMainLoop::GetAudioManager())); |
491 #endif | 491 #endif |
492 channel_->AddFilter(new PepperFileMessageFilter(GetID(), browser_context)); | 492 channel_->AddFilter(new PepperFileMessageFilter(GetID(), browser_context)); |
493 channel_->AddFilter(new PepperMessageFilter(PepperMessageFilter::RENDERER, | 493 channel_->AddFilter(new PepperMessageFilter(PepperMessageFilter::RENDERER, |
494 GetID(), resource_context)); | 494 GetID(), resource_context)); |
495 #if defined(ENABLE_INPUT_SPEECH) | 495 #if defined(ENABLE_INPUT_SPEECH) |
496 channel_->AddFilter(new speech_input::SpeechInputDispatcherHost( | 496 channel_->AddFilter(new speech::InputTagSpeechDispatcherHost( |
497 GetID(), browser_context->GetRequestContext(), | 497 GetID(), browser_context->GetRequestContext(), |
498 browser_context->GetSpeechInputPreferences(), | 498 browser_context->GetSpeechRecognitionPreferences(), |
499 content::BrowserMainLoop::GetAudioManager())); | 499 content::BrowserMainLoop::GetAudioManager())); |
500 #endif | 500 #endif |
501 channel_->AddFilter(new FileAPIMessageFilter( | 501 channel_->AddFilter(new FileAPIMessageFilter( |
502 GetID(), | 502 GetID(), |
503 browser_context->GetRequestContext(), | 503 browser_context->GetRequestContext(), |
504 BrowserContext::GetFileSystemContext(browser_context), | 504 BrowserContext::GetFileSystemContext(browser_context), |
505 ChromeBlobStorageContext::GetFor(browser_context))); | 505 ChromeBlobStorageContext::GetFor(browser_context))); |
506 channel_->AddFilter(new device_orientation::MessageFilter()); | 506 channel_->AddFilter(new device_orientation::MessageFilter()); |
507 channel_->AddFilter(new FileUtilitiesMessageFilter(GetID())); | 507 channel_->AddFilter(new FileUtilitiesMessageFilter(GetID())); |
508 channel_->AddFilter(new MimeRegistryMessageFilter()); | 508 channel_->AddFilter(new MimeRegistryMessageFilter()); |
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1319 void RenderProcessHostImpl::OnRevealFolderInOS(const FilePath& path) { | 1319 void RenderProcessHostImpl::OnRevealFolderInOS(const FilePath& path) { |
1320 // Only honor the request if appropriate persmissions are granted. | 1320 // Only honor the request if appropriate persmissions are granted. |
1321 if (ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile(GetID(), | 1321 if (ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile(GetID(), |
1322 path)) | 1322 path)) |
1323 content::GetContentClient()->browser()->OpenItem(path); | 1323 content::GetContentClient()->browser()->OpenItem(path); |
1324 } | 1324 } |
1325 | 1325 |
1326 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) { | 1326 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) { |
1327 MHTMLGenerationManager::GetInstance()->MHTMLGenerated(job_id, data_size); | 1327 MHTMLGenerationManager::GetInstance()->MHTMLGenerated(job_id, data_size); |
1328 } | 1328 } |
OLD | NEW |