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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 | 391 |
392 channel_->AddFilter( | 392 channel_->AddFilter( |
393 new WorkerMessageFilter( | 393 new WorkerMessageFilter( |
394 id(), | 394 id(), |
395 &profile()->GetResourceContext(), | 395 &profile()->GetResourceContext(), |
396 content::GetContentClient()->browser()->GetResourceDispatcherHost(), | 396 content::GetContentClient()->browser()->GetResourceDispatcherHost(), |
397 NewCallbackWithReturnValue( | 397 NewCallbackWithReturnValue( |
398 widget_helper_.get(), &RenderWidgetHelper::GetNextRoutingID))); | 398 widget_helper_.get(), &RenderWidgetHelper::GetNextRoutingID))); |
399 | 399 |
400 #if defined(ENABLE_P2P_APIS) | 400 #if defined(ENABLE_P2P_APIS) |
401 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableP2PApi)) | 401 channel_->AddFilter(new P2PSocketDispatcherHost()); |
402 channel_->AddFilter(new P2PSocketDispatcherHost()); | |
403 #endif | 402 #endif |
404 | 403 |
405 channel_->AddFilter(new TraceMessageFilter()); | 404 channel_->AddFilter(new TraceMessageFilter()); |
406 channel_->AddFilter(new ResolveProxyMsgHelper(NULL)); | 405 channel_->AddFilter(new ResolveProxyMsgHelper(NULL)); |
407 channel_->AddFilter(new QuotaDispatcherHost( | 406 channel_->AddFilter(new QuotaDispatcherHost( |
408 id(), profile()->GetQuotaManager(), | 407 id(), profile()->GetQuotaManager(), |
409 content::GetContentClient()->browser()->CreateQuotaPermissionContext())); | 408 content::GetContentClient()->browser()->CreateQuotaPermissionContext())); |
410 } | 409 } |
411 | 410 |
412 int BrowserRenderProcessHost::GetNextRoutingID() { | 411 int BrowserRenderProcessHost::GetNextRoutingID() { |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 switches::kDisableSpeechInput, | 541 switches::kDisableSpeechInput, |
543 switches::kDisableWebAudio, | 542 switches::kDisableWebAudio, |
544 switches::kDisableWebSockets, | 543 switches::kDisableWebSockets, |
545 switches::kEnableAdaptive, | 544 switches::kEnableAdaptive, |
546 switches::kEnableBenchmarking, | 545 switches::kEnableBenchmarking, |
547 switches::kEnableDCHECK, | 546 switches::kEnableDCHECK, |
548 switches::kEnableGPUServiceLogging, | 547 switches::kEnableGPUServiceLogging, |
549 switches::kEnableGPUClientLogging, | 548 switches::kEnableGPUClientLogging, |
550 switches::kEnableLogging, | 549 switches::kEnableLogging, |
551 switches::kEnableMediaStream, | 550 switches::kEnableMediaStream, |
552 #if defined(ENABLE_P2P_APIS) | |
553 switches::kEnableP2PApi, | |
554 #endif | |
555 switches::kEnablePepperTesting, | 551 switches::kEnablePepperTesting, |
556 #if defined(OS_MACOSX) | 552 #if defined(OS_MACOSX) |
557 // Allow this to be set when invoking the browser and relayed along. | 553 // Allow this to be set when invoking the browser and relayed along. |
558 switches::kEnableSandboxLogging, | 554 switches::kEnableSandboxLogging, |
559 #endif | 555 #endif |
560 switches::kEnableSeccompSandbox, | 556 switches::kEnableSeccompSandbox, |
561 switches::kEnableStatsTable, | 557 switches::kEnableStatsTable, |
562 switches::kEnableVideoFullscreen, | 558 switches::kEnableVideoFullscreen, |
563 switches::kEnableVideoLogging, | 559 switches::kEnableVideoLogging, |
564 switches::kFullMemoryCrashReport, | 560 switches::kFullMemoryCrashReport, |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
912 void BrowserRenderProcessHost::OnUserMetricsRecordAction( | 908 void BrowserRenderProcessHost::OnUserMetricsRecordAction( |
913 const std::string& action) { | 909 const std::string& action) { |
914 UserMetrics::RecordComputedAction(action); | 910 UserMetrics::RecordComputedAction(action); |
915 } | 911 } |
916 | 912 |
917 void BrowserRenderProcessHost::OnRevealFolderInOS(const FilePath& path) { | 913 void BrowserRenderProcessHost::OnRevealFolderInOS(const FilePath& path) { |
918 // Only honor the request if appropriate persmissions are granted. | 914 // Only honor the request if appropriate persmissions are granted. |
919 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(id(), path)) | 915 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(id(), path)) |
920 content::GetContentClient()->browser()->RevealFolderInOS(path); | 916 content::GetContentClient()->browser()->RevealFolderInOS(path); |
921 } | 917 } |
OLD | NEW |