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/browser_render_process_host.h" | 8 #include "content/browser/renderer_host/browser_render_process_host.h" |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 | 494 |
495 channel_->AddFilter( | 495 channel_->AddFilter( |
496 new WorkerMessageFilter( | 496 new WorkerMessageFilter( |
497 id(), | 497 id(), |
498 profile()->GetRequestContext(), | 498 profile()->GetRequestContext(), |
499 &profile()->GetResourceContext(), | 499 &profile()->GetResourceContext(), |
500 g_browser_process->resource_dispatcher_host(), | 500 g_browser_process->resource_dispatcher_host(), |
501 NewCallbackWithReturnValue( | 501 NewCallbackWithReturnValue( |
502 widget_helper_.get(), &RenderWidgetHelper::GetNextRoutingID))); | 502 widget_helper_.get(), &RenderWidgetHelper::GetNextRoutingID))); |
503 | 503 |
| 504 #if defined(ENABLE_P2P_APIS) |
504 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableP2PApi)) | 505 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableP2PApi)) |
505 channel_->AddFilter(new P2PSocketDispatcherHost()); | 506 channel_->AddFilter(new P2PSocketDispatcherHost()); |
| 507 #endif |
506 | 508 |
507 channel_->AddFilter(new TraceMessageFilter()); | 509 channel_->AddFilter(new TraceMessageFilter()); |
508 channel_->AddFilter(new ResolveProxyMsgHelper(NULL)); | 510 channel_->AddFilter(new ResolveProxyMsgHelper(NULL)); |
509 channel_->AddFilter(new QuotaDispatcherHost()); | 511 channel_->AddFilter(new QuotaDispatcherHost()); |
510 } | 512 } |
511 | 513 |
512 int BrowserRenderProcessHost::GetNextRoutingID() { | 514 int BrowserRenderProcessHost::GetNextRoutingID() { |
513 return widget_helper_->GetNextRoutingID(); | 515 return widget_helper_->GetNextRoutingID(); |
514 } | 516 } |
515 | 517 |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 switches::kEnableAdaptive, | 707 switches::kEnableAdaptive, |
706 switches::kEnableBenchmarking, | 708 switches::kEnableBenchmarking, |
707 switches::kEnableClickToPlay, | 709 switches::kEnableClickToPlay, |
708 switches::kEnableCrxlessWebApps, | 710 switches::kEnableCrxlessWebApps, |
709 switches::kEnableDCHECK, | 711 switches::kEnableDCHECK, |
710 switches::kEnableExperimentalExtensionApis, | 712 switches::kEnableExperimentalExtensionApis, |
711 switches::kEnableInBrowserThumbnailing, | 713 switches::kEnableInBrowserThumbnailing, |
712 switches::kEnableLogging, | 714 switches::kEnableLogging, |
713 switches::kEnableNaCl, | 715 switches::kEnableNaCl, |
714 switches::kEnableOpenMax, | 716 switches::kEnableOpenMax, |
| 717 #if defined(ENABLE_P2P_APIS) |
715 switches::kEnableP2PApi, | 718 switches::kEnableP2PApi, |
| 719 #endif |
716 switches::kEnablePepperTesting, | 720 switches::kEnablePepperTesting, |
717 switches::kEnablePrintPreview, | 721 switches::kEnablePrintPreview, |
718 switches::kEnableRemoting, | 722 switches::kEnableRemoting, |
719 switches::kEnableResourceContentSettings, | 723 switches::kEnableResourceContentSettings, |
720 #if defined(OS_MACOSX) | 724 #if defined(OS_MACOSX) |
721 // Allow this to be set when invoking the browser and relayed along. | 725 // Allow this to be set when invoking the browser and relayed along. |
722 switches::kEnableSandboxLogging, | 726 switches::kEnableSandboxLogging, |
723 #endif | 727 #endif |
724 switches::kEnableSearchProviderApiV2, | 728 switches::kEnableSearchProviderApiV2, |
725 switches::kEnableSeccompSandbox, | 729 switches::kEnableSeccompSandbox, |
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1309 IPC::PlatformFileForTransit file; | 1313 IPC::PlatformFileForTransit file; |
1310 #if defined(OS_POSIX) | 1314 #if defined(OS_POSIX) |
1311 file = base::FileDescriptor(model_file, false); | 1315 file = base::FileDescriptor(model_file, false); |
1312 #elif defined(OS_WIN) | 1316 #elif defined(OS_WIN) |
1313 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0, | 1317 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0, |
1314 false, DUPLICATE_SAME_ACCESS); | 1318 false, DUPLICATE_SAME_ACCESS); |
1315 #endif | 1319 #endif |
1316 Send(new SafeBrowsingMsg_SetPhishingModel(file)); | 1320 Send(new SafeBrowsingMsg_SetPhishingModel(file)); |
1317 } | 1321 } |
1318 } | 1322 } |
OLD | NEW |