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 #include <algorithm> | 10 #include <algorithm> |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 #include "content/browser/gpu/gpu_data_manager.h" | 45 #include "content/browser/gpu/gpu_data_manager.h" |
46 #include "content/browser/gpu/gpu_process_host.h" | 46 #include "content/browser/gpu/gpu_process_host.h" |
47 #include "content/browser/in_process_webkit/dom_storage_message_filter.h" | 47 #include "content/browser/in_process_webkit/dom_storage_message_filter.h" |
48 #include "content/browser/in_process_webkit/indexed_db_dispatcher_host.h" | 48 #include "content/browser/in_process_webkit/indexed_db_dispatcher_host.h" |
49 #include "content/browser/mime_registry_message_filter.h" | 49 #include "content/browser/mime_registry_message_filter.h" |
50 #include "content/browser/plugin_service.h" | 50 #include "content/browser/plugin_service.h" |
51 #include "content/browser/renderer_host/blob_message_filter.h" | 51 #include "content/browser/renderer_host/blob_message_filter.h" |
52 #include "content/browser/renderer_host/clipboard_message_filter.h" | 52 #include "content/browser/renderer_host/clipboard_message_filter.h" |
53 #include "content/browser/renderer_host/database_message_filter.h" | 53 #include "content/browser/renderer_host/database_message_filter.h" |
54 #include "content/browser/renderer_host/file_utilities_message_filter.h" | 54 #include "content/browser/renderer_host/file_utilities_message_filter.h" |
| 55 #include "content/browser/renderer_host/gamepad_browser_message_filter.h" |
55 #include "content/browser/renderer_host/gpu_message_filter.h" | 56 #include "content/browser/renderer_host/gpu_message_filter.h" |
56 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" | 57 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" |
57 #include "content/browser/renderer_host/media/audio_renderer_host.h" | 58 #include "content/browser/renderer_host/media/audio_renderer_host.h" |
58 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h" | 59 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h" |
59 #include "content/browser/renderer_host/media/video_capture_host.h" | 60 #include "content/browser/renderer_host/media/video_capture_host.h" |
60 #include "content/browser/renderer_host/p2p/socket_dispatcher_host.h" | 61 #include "content/browser/renderer_host/p2p/socket_dispatcher_host.h" |
61 #include "content/browser/renderer_host/pepper_file_message_filter.h" | 62 #include "content/browser/renderer_host/pepper_file_message_filter.h" |
62 #include "content/browser/renderer_host/pepper_message_filter.h" | 63 #include "content/browser/renderer_host/pepper_message_filter.h" |
63 #include "content/browser/renderer_host/quota_dispatcher_host.h" | 64 #include "content/browser/renderer_host/quota_dispatcher_host.h" |
64 #include "content/browser/renderer_host/render_message_filter.h" | 65 #include "content/browser/renderer_host/render_message_filter.h" |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 channel_->AddFilter(new content::P2PSocketDispatcherHost( | 526 channel_->AddFilter(new content::P2PSocketDispatcherHost( |
526 &GetBrowserContext()->GetResourceContext())); | 527 &GetBrowserContext()->GetResourceContext())); |
527 #endif | 528 #endif |
528 | 529 |
529 channel_->AddFilter(new TraceMessageFilter()); | 530 channel_->AddFilter(new TraceMessageFilter()); |
530 channel_->AddFilter(new ResolveProxyMsgHelper( | 531 channel_->AddFilter(new ResolveProxyMsgHelper( |
531 GetBrowserContext()->GetRequestContextForRenderProcess(GetID()))); | 532 GetBrowserContext()->GetRequestContextForRenderProcess(GetID()))); |
532 channel_->AddFilter(new QuotaDispatcherHost( | 533 channel_->AddFilter(new QuotaDispatcherHost( |
533 GetID(), GetBrowserContext()->GetQuotaManager(), | 534 GetID(), GetBrowserContext()->GetQuotaManager(), |
534 content::GetContentClient()->browser()->CreateQuotaPermissionContext())); | 535 content::GetContentClient()->browser()->CreateQuotaPermissionContext())); |
| 536 channel_->AddFilter(new GamepadBrowserMessageFilter); |
535 } | 537 } |
536 | 538 |
537 int RenderProcessHostImpl::GetNextRoutingID() { | 539 int RenderProcessHostImpl::GetNextRoutingID() { |
538 return widget_helper_->GetNextRoutingID(); | 540 return widget_helper_->GetNextRoutingID(); |
539 } | 541 } |
540 | 542 |
541 void RenderProcessHostImpl::UpdateAndSendMaxPageID(int32 page_id) { | 543 void RenderProcessHostImpl::UpdateAndSendMaxPageID(int32 page_id) { |
542 if (page_id > max_page_id_) | 544 if (page_id > max_page_id_) |
543 Send(new ViewMsg_SetNextPageID(page_id + 1)); | 545 Send(new ViewMsg_SetNextPageID(page_id + 1)); |
544 UpdateMaxPageID(page_id); | 546 UpdateMaxPageID(page_id); |
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1304 void RenderProcessHostImpl::OnRevealFolderInOS(const FilePath& path) { | 1306 void RenderProcessHostImpl::OnRevealFolderInOS(const FilePath& path) { |
1305 // Only honor the request if appropriate persmissions are granted. | 1307 // Only honor the request if appropriate persmissions are granted. |
1306 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(GetID(), path)) | 1308 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(GetID(), path)) |
1307 content::GetContentClient()->browser()->OpenItem(path); | 1309 content::GetContentClient()->browser()->OpenItem(path); |
1308 } | 1310 } |
1309 | 1311 |
1310 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) { | 1312 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) { |
1311 content::GetContentClient()->browser()->GetMHTMLGenerationManager()-> | 1313 content::GetContentClient()->browser()->GetMHTMLGenerationManager()-> |
1312 MHTMLGenerated(job_id, data_size); | 1314 MHTMLGenerated(job_id, data_size); |
1313 } | 1315 } |
OLD | NEW |