Chromium Code Reviews| 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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 456 channel_->AddFilter(new ChromeRenderMessageFilter( | 456 channel_->AddFilter(new ChromeRenderMessageFilter( |
| 457 id(), | 457 id(), |
| 458 profile(), | 458 profile(), |
| 459 profile()->GetRequestContextForPossibleApp(installed_app_))); | 459 profile()->GetRequestContextForPossibleApp(installed_app_))); |
| 460 | 460 |
| 461 scoped_refptr<RendererURLRequestContextOverride> url_request_context_override( | 461 scoped_refptr<RendererURLRequestContextOverride> url_request_context_override( |
| 462 new RendererURLRequestContextOverride(profile(), installed_app_)); | 462 new RendererURLRequestContextOverride(profile(), installed_app_)); |
| 463 | 463 |
| 464 ResourceMessageFilter* resource_message_filter = new ResourceMessageFilter( | 464 ResourceMessageFilter* resource_message_filter = new ResourceMessageFilter( |
| 465 id(), ChildProcessInfo::RENDER_PROCESS, | 465 id(), ChildProcessInfo::RENDER_PROCESS, |
| 466 profile()->GetResourceContext(), | |
| 466 g_browser_process->resource_dispatcher_host()); | 467 g_browser_process->resource_dispatcher_host()); |
| 467 resource_message_filter->set_url_request_context_override( | 468 resource_message_filter->set_url_request_context_override( |
| 468 url_request_context_override); | 469 url_request_context_override); |
| 469 channel_->AddFilter(resource_message_filter); | 470 channel_->AddFilter(resource_message_filter); |
| 470 | 471 |
| 471 channel_->AddFilter(new AudioRendererHost()); | 472 channel_->AddFilter(new AudioRendererHost()); |
| 472 channel_->AddFilter( | 473 channel_->AddFilter( |
| 473 new AppCacheDispatcherHost(profile()->GetRequestContext(), id())); | 474 new AppCacheDispatcherHost(profile()->GetRequestContext(), id())); |
| 474 channel_->AddFilter(new ClipboardMessageFilter()); | 475 channel_->AddFilter(new ClipboardMessageFilter()); |
| 475 channel_->AddFilter( | 476 channel_->AddFilter( |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 497 channel_->AddFilter(new DatabaseMessageFilter( | 498 channel_->AddFilter(new DatabaseMessageFilter( |
| 498 profile()->GetDatabaseTracker(), profile()->GetHostContentSettingsMap())); | 499 profile()->GetDatabaseTracker(), profile()->GetHostContentSettingsMap())); |
| 499 | 500 |
| 500 SocketStreamDispatcherHost* socket_stream_dispatcher_host = | 501 SocketStreamDispatcherHost* socket_stream_dispatcher_host = |
| 501 new SocketStreamDispatcherHost(); | 502 new SocketStreamDispatcherHost(); |
| 502 socket_stream_dispatcher_host->set_url_request_context_override( | 503 socket_stream_dispatcher_host->set_url_request_context_override( |
| 503 url_request_context_override); | 504 url_request_context_override); |
| 504 channel_->AddFilter(socket_stream_dispatcher_host); | 505 channel_->AddFilter(socket_stream_dispatcher_host); |
| 505 | 506 |
| 506 channel_->AddFilter(new SpellCheckMessageFilter()); | 507 channel_->AddFilter(new SpellCheckMessageFilter()); |
| 507 channel_->AddFilter(new WorkerMessageFilter( | 508 scoped_refptr<WorkerMessageFilter> worker_message_filter = |
|
jam
2011/04/13 16:43:06
why this change?
willchan no longer on Chromium
2011/04/13 18:03:44
I'm cleaning this up, sorry. Leftovers from when I
| |
| 508 id(), | 509 new WorkerMessageFilter( |
| 509 profile()->GetRequestContext(), | 510 id(), |
| 510 g_browser_process->resource_dispatcher_host(), | 511 profile()->GetRequestContext(), |
| 511 NewCallbackWithReturnValue( | 512 profile()->GetResourceContext(), |
| 512 widget_helper_.get(), &RenderWidgetHelper::GetNextRoutingID))); | 513 g_browser_process->resource_dispatcher_host(), |
| 514 NewCallbackWithReturnValue( | |
| 515 widget_helper_.get(), &RenderWidgetHelper::GetNextRoutingID)); | |
| 516 channel_->AddFilter(worker_message_filter); | |
| 517 worker_message_filter = NULL; | |
| 513 | 518 |
| 514 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableP2PApi)) | 519 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableP2PApi)) |
| 515 channel_->AddFilter(new P2PSocketsHost()); | 520 channel_->AddFilter(new P2PSocketsHost()); |
| 516 | 521 |
| 517 channel_->AddFilter(new TraceMessageFilter()); | 522 channel_->AddFilter(new TraceMessageFilter()); |
| 518 channel_->AddFilter(new ResolveProxyMsgHelper(NULL)); | 523 channel_->AddFilter(new ResolveProxyMsgHelper(NULL)); |
| 519 } | 524 } |
| 520 | 525 |
| 521 int BrowserRenderProcessHost::GetNextRoutingID() { | 526 int BrowserRenderProcessHost::GetNextRoutingID() { |
| 522 return widget_helper_->GetNextRoutingID(); | 527 return widget_helper_->GetNextRoutingID(); |
| (...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1316 IPC::PlatformFileForTransit file; | 1321 IPC::PlatformFileForTransit file; |
| 1317 #if defined(OS_POSIX) | 1322 #if defined(OS_POSIX) |
| 1318 file = base::FileDescriptor(model_file, false); | 1323 file = base::FileDescriptor(model_file, false); |
| 1319 #elif defined(OS_WIN) | 1324 #elif defined(OS_WIN) |
| 1320 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0, | 1325 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0, |
| 1321 false, DUPLICATE_SAME_ACCESS); | 1326 false, DUPLICATE_SAME_ACCESS); |
| 1322 #endif | 1327 #endif |
| 1323 Send(new SafeBrowsingMsg_SetPhishingModel(file)); | 1328 Send(new SafeBrowsingMsg_SetPhishingModel(file)); |
| 1324 } | 1329 } |
| 1325 } | 1330 } |
| OLD | NEW |