| 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 447 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 458   channel_->AddFilter(new ChromeRenderMessageFilter( | 458   channel_->AddFilter(new ChromeRenderMessageFilter( | 
| 459       id(), | 459       id(), | 
| 460       profile(), | 460       profile(), | 
| 461       profile()->GetRequestContextForPossibleApp(installed_app_))); | 461       profile()->GetRequestContextForPossibleApp(installed_app_))); | 
| 462 | 462 | 
| 463   scoped_refptr<RendererURLRequestContextOverride> url_request_context_override( | 463   scoped_refptr<RendererURLRequestContextOverride> url_request_context_override( | 
| 464       new RendererURLRequestContextOverride(profile(), installed_app_)); | 464       new RendererURLRequestContextOverride(profile(), installed_app_)); | 
| 465 | 465 | 
| 466   ResourceMessageFilter* resource_message_filter = new ResourceMessageFilter( | 466   ResourceMessageFilter* resource_message_filter = new ResourceMessageFilter( | 
| 467       id(), ChildProcessInfo::RENDER_PROCESS, | 467       id(), ChildProcessInfo::RENDER_PROCESS, | 
|  | 468       profile()->GetResourceContext(), | 
| 468       g_browser_process->resource_dispatcher_host()); | 469       g_browser_process->resource_dispatcher_host()); | 
| 469   resource_message_filter->set_url_request_context_override( | 470   resource_message_filter->set_url_request_context_override( | 
| 470       url_request_context_override); | 471       url_request_context_override); | 
| 471 | 472 | 
| 472   channel_->AddFilter(resource_message_filter); | 473   channel_->AddFilter(resource_message_filter); | 
| 473   channel_->AddFilter(new AudioInputRendererHost()); | 474   channel_->AddFilter(new AudioInputRendererHost()); | 
| 474   channel_->AddFilter(new AudioRendererHost()); | 475   channel_->AddFilter(new AudioRendererHost()); | 
| 475   channel_->AddFilter( | 476   channel_->AddFilter( | 
| 476       new AppCacheDispatcherHost(profile()->GetRequestContext(), id())); | 477       new AppCacheDispatcherHost(profile()->GetRequestContext(), id())); | 
| 477   channel_->AddFilter(new ClipboardMessageFilter()); | 478   channel_->AddFilter(new ClipboardMessageFilter()); | 
| (...skipping 22 matching lines...) Expand all  Loading... | 
| 500   channel_->AddFilter(new DatabaseMessageFilter( | 501   channel_->AddFilter(new DatabaseMessageFilter( | 
| 501       profile()->GetDatabaseTracker(), profile()->GetHostContentSettingsMap())); | 502       profile()->GetDatabaseTracker(), profile()->GetHostContentSettingsMap())); | 
| 502 | 503 | 
| 503   SocketStreamDispatcherHost* socket_stream_dispatcher_host = | 504   SocketStreamDispatcherHost* socket_stream_dispatcher_host = | 
| 504       new SocketStreamDispatcherHost(); | 505       new SocketStreamDispatcherHost(); | 
| 505   socket_stream_dispatcher_host->set_url_request_context_override( | 506   socket_stream_dispatcher_host->set_url_request_context_override( | 
| 506       url_request_context_override); | 507       url_request_context_override); | 
| 507   channel_->AddFilter(socket_stream_dispatcher_host); | 508   channel_->AddFilter(socket_stream_dispatcher_host); | 
| 508 | 509 | 
| 509   channel_->AddFilter(new SpellCheckMessageFilter()); | 510   channel_->AddFilter(new SpellCheckMessageFilter()); | 
| 510   channel_->AddFilter(new WorkerMessageFilter( | 511   channel_->AddFilter( | 
| 511       id(), | 512       new WorkerMessageFilter( | 
| 512       profile()->GetRequestContext(), | 513           id(), | 
| 513       g_browser_process->resource_dispatcher_host(), | 514           profile()->GetRequestContext(), | 
| 514       NewCallbackWithReturnValue( | 515           profile()->GetResourceContext(), | 
| 515           widget_helper_.get(), &RenderWidgetHelper::GetNextRoutingID))); | 516           g_browser_process->resource_dispatcher_host(), | 
|  | 517           NewCallbackWithReturnValue( | 
|  | 518               widget_helper_.get(), &RenderWidgetHelper::GetNextRoutingID))); | 
| 516 | 519 | 
| 517   if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableP2PApi)) | 520   if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableP2PApi)) | 
| 518     channel_->AddFilter(new P2PSocketDispatcherHost()); | 521     channel_->AddFilter(new P2PSocketDispatcherHost()); | 
| 519 | 522 | 
| 520   channel_->AddFilter(new TraceMessageFilter()); | 523   channel_->AddFilter(new TraceMessageFilter()); | 
| 521   channel_->AddFilter(new ResolveProxyMsgHelper(NULL)); | 524   channel_->AddFilter(new ResolveProxyMsgHelper(NULL)); | 
| 522   channel_->AddFilter(new QuotaDispatcherHost()); | 525   channel_->AddFilter(new QuotaDispatcherHost()); | 
| 523 } | 526 } | 
| 524 | 527 | 
| 525 int BrowserRenderProcessHost::GetNextRoutingID() { | 528 int BrowserRenderProcessHost::GetNextRoutingID() { | 
| (...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1321     IPC::PlatformFileForTransit file; | 1324     IPC::PlatformFileForTransit file; | 
| 1322 #if defined(OS_POSIX) | 1325 #if defined(OS_POSIX) | 
| 1323     file = base::FileDescriptor(model_file, false); | 1326     file = base::FileDescriptor(model_file, false); | 
| 1324 #elif defined(OS_WIN) | 1327 #elif defined(OS_WIN) | 
| 1325     ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0, | 1328     ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0, | 
| 1326                       false, DUPLICATE_SAME_ACCESS); | 1329                       false, DUPLICATE_SAME_ACCESS); | 
| 1327 #endif | 1330 #endif | 
| 1328     Send(new SafeBrowsingMsg_SetPhishingModel(file)); | 1331     Send(new SafeBrowsingMsg_SetPhishingModel(file)); | 
| 1329   } | 1332   } | 
| 1330 } | 1333 } | 
| OLD | NEW | 
|---|