Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Side by Side Diff: chrome/browser/renderer_host/browser_render_process_host.cc

Issue 6598053: P2P Sockets host implementation. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: - Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/chrome_common.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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))
491 channel_->AddFilter(new P2PSocketsHost());
488 } 492 }
489 493
490 int BrowserRenderProcessHost::GetNextRoutingID() { 494 int BrowserRenderProcessHost::GetNextRoutingID() {
491 return widget_helper_->GetNextRoutingID(); 495 return widget_helper_->GetNextRoutingID();
492 } 496 }
493 497
494 void BrowserRenderProcessHost::CancelResourceRequests(int render_widget_id) { 498 void BrowserRenderProcessHost::CancelResourceRequests(int render_widget_id) {
495 widget_helper_->CancelResourceRequests(render_widget_id); 499 widget_helper_->CancelResourceRequests(render_widget_id);
496 } 500 }
497 501
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 switches::kEnableAcceleratedDecoding, 683 switches::kEnableAcceleratedDecoding,
680 switches::kEnableBenchmarking, 684 switches::kEnableBenchmarking,
681 switches::kEnableClickToPlay, 685 switches::kEnableClickToPlay,
682 switches::kEnableCrxlessWebApps, 686 switches::kEnableCrxlessWebApps,
683 switches::kEnableDCHECK, 687 switches::kEnableDCHECK,
684 switches::kEnableExperimentalExtensionApis, 688 switches::kEnableExperimentalExtensionApis,
685 switches::kEnableInBrowserThumbnailing, 689 switches::kEnableInBrowserThumbnailing,
686 switches::kEnableLogging, 690 switches::kEnableLogging,
687 switches::kEnableNaCl, 691 switches::kEnableNaCl,
688 switches::kEnableOpenMax, 692 switches::kEnableOpenMax,
693 switches::kEnableP2PApi,
689 switches::kEnablePepperTesting, 694 switches::kEnablePepperTesting,
690 switches::kEnablePrintPreview, 695 switches::kEnablePrintPreview,
691 switches::kEnableRemoting, 696 switches::kEnableRemoting,
692 switches::kEnableResourceContentSettings, 697 switches::kEnableResourceContentSettings,
693 #if defined(OS_MACOSX) 698 #if defined(OS_MACOSX)
694 // Allow this to be set when invoking the browser and relayed along. 699 // Allow this to be set when invoking the browser and relayed along.
695 switches::kEnableSandboxLogging, 700 switches::kEnableSandboxLogging,
696 #endif 701 #endif
697 switches::kEnableSearchProviderApiV2, 702 switches::kEnableSearchProviderApiV2,
698 switches::kEnableSeccompSandbox, 703 switches::kEnableSeccompSandbox,
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
1281 IPC::PlatformFileForTransit file; 1286 IPC::PlatformFileForTransit file;
1282 #if defined(OS_POSIX) 1287 #if defined(OS_POSIX)
1283 file = base::FileDescriptor(model_file, false); 1288 file = base::FileDescriptor(model_file, false);
1284 #elif defined(OS_WIN) 1289 #elif defined(OS_WIN)
1285 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0, 1290 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0,
1286 false, DUPLICATE_SAME_ACCESS); 1291 false, DUPLICATE_SAME_ACCESS);
1287 #endif 1292 #endif
1288 Send(new ViewMsg_SetPhishingModel(file)); 1293 Send(new ViewMsg_SetPhishingModel(file));
1289 } 1294 }
1290 } 1295 }
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/chrome_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698