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 "chrome/browser/renderer_host/browser_render_process_host.h" | 8 #include "chrome/browser/renderer_host/browser_render_process_host.h" |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
71 #include "content/browser/in_process_webkit/dom_storage_message_filter.h" | 71 #include "content/browser/in_process_webkit/dom_storage_message_filter.h" |
72 #include "content/browser/in_process_webkit/indexed_db_dispatcher_host.h" | 72 #include "content/browser/in_process_webkit/indexed_db_dispatcher_host.h" |
73 #include "content/browser/file_system/file_system_dispatcher_host.h" | 73 #include "content/browser/file_system/file_system_dispatcher_host.h" |
74 #include "content/browser/mime_registry_message_filter.h" | 74 #include "content/browser/mime_registry_message_filter.h" |
75 #include "content/browser/plugin_service.h" | 75 #include "content/browser/plugin_service.h" |
76 #include "content/browser/renderer_host/audio_renderer_host.h" | 76 #include "content/browser/renderer_host/audio_renderer_host.h" |
77 #include "content/browser/renderer_host/blob_message_filter.h" | 77 #include "content/browser/renderer_host/blob_message_filter.h" |
78 #include "content/browser/renderer_host/database_message_filter.h" | 78 #include "content/browser/renderer_host/database_message_filter.h" |
79 #include "content/browser/renderer_host/file_utilities_message_filter.h" | 79 #include "content/browser/renderer_host/file_utilities_message_filter.h" |
80 #include "content/browser/renderer_host/gpu_message_filter.h" | 80 #include "content/browser/renderer_host/gpu_message_filter.h" |
81 #include "content/browser/renderer_host/p2p_sockets_host.h" | |
81 #include "content/browser/renderer_host/pepper_file_message_filter.h" | 82 #include "content/browser/renderer_host/pepper_file_message_filter.h" |
82 #include "content/browser/renderer_host/pepper_message_filter.h" | 83 #include "content/browser/renderer_host/pepper_message_filter.h" |
83 #include "content/browser/renderer_host/render_message_filter.h" | 84 #include "content/browser/renderer_host/render_message_filter.h" |
84 #include "content/browser/renderer_host/render_view_host.h" | 85 #include "content/browser/renderer_host/render_view_host.h" |
85 #include "content/browser/renderer_host/render_view_host_delegate.h" | 86 #include "content/browser/renderer_host/render_view_host_delegate.h" |
86 #include "content/browser/renderer_host/render_widget_helper.h" | 87 #include "content/browser/renderer_host/render_widget_helper.h" |
87 #include "content/browser/renderer_host/render_widget_host.h" | 88 #include "content/browser/renderer_host/render_widget_host.h" |
88 #include "content/browser/renderer_host/resource_message_filter.h" | 89 #include "content/browser/renderer_host/resource_message_filter.h" |
89 #include "content/browser/renderer_host/socket_stream_dispatcher_host.h" | 90 #include "content/browser/renderer_host/socket_stream_dispatcher_host.h" |
90 #include "content/browser/speech/speech_input_dispatcher_host.h" | 91 #include "content/browser/speech/speech_input_dispatcher_host.h" |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
478 url_request_context_override); | 479 url_request_context_override); |
479 channel_->AddFilter(socket_stream_dispatcher_host); | 480 channel_->AddFilter(socket_stream_dispatcher_host); |
480 | 481 |
481 channel_->AddFilter(new SpellCheckMessageFilter()); | 482 channel_->AddFilter(new SpellCheckMessageFilter()); |
482 channel_->AddFilter(new WorkerMessageFilter( | 483 channel_->AddFilter(new WorkerMessageFilter( |
483 id(), | 484 id(), |
484 profile()->GetRequestContext(), | 485 profile()->GetRequestContext(), |
485 g_browser_process->resource_dispatcher_host(), | 486 g_browser_process->resource_dispatcher_host(), |
486 NewCallbackWithReturnValue( | 487 NewCallbackWithReturnValue( |
487 widget_helper_.get(), &RenderWidgetHelper::GetNextRoutingID))); | 488 widget_helper_.get(), &RenderWidgetHelper::GetNextRoutingID))); |
489 | |
490 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableP2PApi)) { | |
jam
2011/03/01 19:35:54
nit: this file doesn't use brace brackets for sing
Sergey Ulanov
2011/03/01 22:34:17
Done.
| |
491 channel_->AddFilter(new P2PSocketsHost()); | |
492 } | |
488 } | 493 } |
489 | 494 |
490 int BrowserRenderProcessHost::GetNextRoutingID() { | 495 int BrowserRenderProcessHost::GetNextRoutingID() { |
491 return widget_helper_->GetNextRoutingID(); | 496 return widget_helper_->GetNextRoutingID(); |
492 } | 497 } |
493 | 498 |
494 void BrowserRenderProcessHost::CancelResourceRequests(int render_widget_id) { | 499 void BrowserRenderProcessHost::CancelResourceRequests(int render_widget_id) { |
495 widget_helper_->CancelResourceRequests(render_widget_id); | 500 widget_helper_->CancelResourceRequests(render_widget_id); |
496 } | 501 } |
497 | 502 |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
679 switches::kEnableAcceleratedDecoding, | 684 switches::kEnableAcceleratedDecoding, |
680 switches::kEnableBenchmarking, | 685 switches::kEnableBenchmarking, |
681 switches::kEnableClickToPlay, | 686 switches::kEnableClickToPlay, |
682 switches::kEnableCrxlessWebApps, | 687 switches::kEnableCrxlessWebApps, |
683 switches::kEnableDCHECK, | 688 switches::kEnableDCHECK, |
684 switches::kEnableExperimentalExtensionApis, | 689 switches::kEnableExperimentalExtensionApis, |
685 switches::kEnableInBrowserThumbnailing, | 690 switches::kEnableInBrowserThumbnailing, |
686 switches::kEnableLogging, | 691 switches::kEnableLogging, |
687 switches::kEnableNaCl, | 692 switches::kEnableNaCl, |
688 switches::kEnableOpenMax, | 693 switches::kEnableOpenMax, |
694 switches::kEnableP2PApi, | |
689 switches::kEnablePepperTesting, | 695 switches::kEnablePepperTesting, |
690 switches::kEnablePrintPreview, | 696 switches::kEnablePrintPreview, |
691 switches::kEnableRemoting, | 697 switches::kEnableRemoting, |
692 switches::kEnableResourceContentSettings, | 698 switches::kEnableResourceContentSettings, |
693 #if defined(OS_MACOSX) | 699 #if defined(OS_MACOSX) |
694 // Allow this to be set when invoking the browser and relayed along. | 700 // Allow this to be set when invoking the browser and relayed along. |
695 switches::kEnableSandboxLogging, | 701 switches::kEnableSandboxLogging, |
696 #endif | 702 #endif |
697 switches::kEnableSearchProviderApiV2, | 703 switches::kEnableSearchProviderApiV2, |
698 switches::kEnableSeccompSandbox, | 704 switches::kEnableSeccompSandbox, |
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1282 IPC::PlatformFileForTransit file; | 1288 IPC::PlatformFileForTransit file; |
1283 #if defined(OS_POSIX) | 1289 #if defined(OS_POSIX) |
1284 file = base::FileDescriptor(model_file, false); | 1290 file = base::FileDescriptor(model_file, false); |
1285 #elif defined(OS_WIN) | 1291 #elif defined(OS_WIN) |
1286 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0, | 1292 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0, |
1287 false, DUPLICATE_SAME_ACCESS); | 1293 false, DUPLICATE_SAME_ACCESS); |
1288 #endif | 1294 #endif |
1289 Send(new ViewMsg_SetPhishingModel(file)); | 1295 Send(new ViewMsg_SetPhishingModel(file)); |
1290 } | 1296 } |
1291 } | 1297 } |
OLD | NEW |