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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 11828040: Revert 175971 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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/test/base/chrome_test_suite.cc ('k') | content/browser/site_instance_impl_unittest.cc » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 #include "content/browser/renderer_host/render_view_host_delegate.h" 77 #include "content/browser/renderer_host/render_view_host_delegate.h"
78 #include "content/browser/renderer_host/render_view_host_impl.h" 78 #include "content/browser/renderer_host/render_view_host_impl.h"
79 #include "content/browser/renderer_host/render_widget_helper.h" 79 #include "content/browser/renderer_host/render_widget_helper.h"
80 #include "content/browser/renderer_host/socket_stream_dispatcher_host.h" 80 #include "content/browser/renderer_host/socket_stream_dispatcher_host.h"
81 #include "content/browser/renderer_host/text_input_client_message_filter.h" 81 #include "content/browser/renderer_host/text_input_client_message_filter.h"
82 #include "content/browser/resolve_proxy_msg_helper.h" 82 #include "content/browser/resolve_proxy_msg_helper.h"
83 #include "content/browser/storage_partition_impl.h" 83 #include "content/browser/storage_partition_impl.h"
84 #include "content/browser/speech/input_tag_speech_dispatcher_host.h" 84 #include "content/browser/speech/input_tag_speech_dispatcher_host.h"
85 #include "content/browser/speech/speech_recognition_dispatcher_host.h" 85 #include "content/browser/speech/speech_recognition_dispatcher_host.h"
86 #include "content/browser/trace_message_filter.h" 86 #include "content/browser/trace_message_filter.h"
87 #include "content/browser/webui/web_ui_controller_factory_registry.h"
88 #include "content/browser/worker_host/worker_storage_partition.h" 87 #include "content/browser/worker_host/worker_storage_partition.h"
89 #include "content/browser/worker_host/worker_message_filter.h" 88 #include "content/browser/worker_host/worker_message_filter.h"
90 #include "content/common/child_process_host_impl.h" 89 #include "content/common/child_process_host_impl.h"
91 #include "content/common/child_process_messages.h" 90 #include "content/common/child_process_messages.h"
92 #include "content/common/gpu/gpu_messages.h" 91 #include "content/common/gpu/gpu_messages.h"
93 #include "content/common/resource_messages.h" 92 #include "content/common/resource_messages.h"
94 #include "content/common/view_messages.h" 93 #include "content/common/view_messages.h"
95 #include "content/public/browser/browser_context.h" 94 #include "content/public/browser/browser_context.h"
96 #include "content/public/browser/content_browser_client.h" 95 #include "content/public/browser/content_browser_client.h"
97 #include "content/public/browser/notification_service.h" 96 #include "content/public/browser/notification_service.h"
98 #include "content/public/browser/notification_types.h" 97 #include "content/public/browser/notification_types.h"
99 #include "content/public/browser/render_process_host_factory.h" 98 #include "content/public/browser/render_process_host_factory.h"
100 #include "content/public/browser/resource_context.h" 99 #include "content/public/browser/resource_context.h"
101 #include "content/public/browser/user_metrics.h" 100 #include "content/public/browser/user_metrics.h"
101 #include "content/public/browser/web_ui_controller_factory.h"
102 #include "content/public/common/content_constants.h" 102 #include "content/public/common/content_constants.h"
103 #include "content/public/common/content_switches.h" 103 #include "content/public/common/content_switches.h"
104 #include "content/public/common/process_type.h" 104 #include "content/public/common/process_type.h"
105 #include "content/public/common/result_codes.h" 105 #include "content/public/common/result_codes.h"
106 #include "content/public/common/url_constants.h" 106 #include "content/public/common/url_constants.h"
107 #include "content/renderer/render_process_impl.h" 107 #include "content/renderer/render_process_impl.h"
108 #include "content/renderer/render_thread_impl.h" 108 #include "content/renderer/render_thread_impl.h"
109 #include "ipc/ipc_channel.h" 109 #include "ipc/ipc_channel.h"
110 #include "ipc/ipc_logging.h" 110 #include "ipc/ipc_logging.h"
111 #include "ipc/ipc_platform_file.h" 111 #include "ipc/ipc_platform_file.h"
(...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after
1264 // All URLs are suitable if this is associated with a guest renderer process. 1264 // All URLs are suitable if this is associated with a guest renderer process.
1265 // TODO(fsamuel, creis): Further validation is needed to ensure that only 1265 // TODO(fsamuel, creis): Further validation is needed to ensure that only
1266 // normal web URLs are permitted in guest processes. We need to investigate 1266 // normal web URLs are permitted in guest processes. We need to investigate
1267 // where this validation should happen. 1267 // where this validation should happen.
1268 if (host->IsGuest()) 1268 if (host->IsGuest())
1269 return true; 1269 return true;
1270 1270
1271 if (!host->IsGuest() && site_url.SchemeIs(chrome::kGuestScheme)) 1271 if (!host->IsGuest() && site_url.SchemeIs(chrome::kGuestScheme))
1272 return false; 1272 return false;
1273 1273
1274 if (ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings( 1274 WebUIControllerFactory* factory =
1275 GetContentClient()->browser()->GetWebUIControllerFactory();
1276 if (factory &&
1277 ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings(
1275 host->GetID()) != 1278 host->GetID()) !=
1276 WebUIControllerFactoryRegistry::GetInstance()->UseWebUIBindingsForURL( 1279 factory->UseWebUIBindingsForURL(browser_context, site_url)) {
1277 browser_context, site_url)) {
1278 return false; 1280 return false;
1279 } 1281 }
1280 1282
1281 return GetContentClient()->browser()->IsSuitableHost(host, site_url); 1283 return GetContentClient()->browser()->IsSuitableHost(host, site_url);
1282 } 1284 }
1283 1285
1284 // static 1286 // static
1285 bool RenderProcessHost::run_renderer_in_process() { 1287 bool RenderProcessHost::run_renderer_in_process() {
1286 return g_run_renderer_in_process_; 1288 return g_run_renderer_in_process_;
1287 } 1289 }
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
1383 // We want to consolidate particular sites like WebUI when we are using 1385 // We want to consolidate particular sites like WebUI when we are using
1384 // process-per-tab or process-per-site-instance models. 1386 // process-per-tab or process-per-site-instance models.
1385 // Note that --single-process is handled in ShouldTryToUseExistingProcessHost. 1387 // Note that --single-process is handled in ShouldTryToUseExistingProcessHost.
1386 1388
1387 if (GetContentClient()->browser()-> 1389 if (GetContentClient()->browser()->
1388 ShouldUseProcessPerSite(browser_context, url)) { 1390 ShouldUseProcessPerSite(browser_context, url)) {
1389 return true; 1391 return true;
1390 } 1392 }
1391 1393
1392 // DevTools pages have WebUI type but should not reuse the same host. 1394 // DevTools pages have WebUI type but should not reuse the same host.
1393 if (WebUIControllerFactoryRegistry::GetInstance()->UseWebUIForURL( 1395 WebUIControllerFactory* factory =
1394 browser_context, url) && 1396 GetContentClient()->browser()->GetWebUIControllerFactory();
1397 if (factory &&
1398 factory->UseWebUIForURL(browser_context, url) &&
1395 !url.SchemeIs(chrome::kChromeDevToolsScheme)) { 1399 !url.SchemeIs(chrome::kChromeDevToolsScheme)) {
1396 return true; 1400 return true;
1397 } 1401 }
1398 1402
1399 // In all other cases, don't use process-per-site logic. 1403 // In all other cases, don't use process-per-site logic.
1400 return false; 1404 return false;
1401 } 1405 }
1402 1406
1403 // static 1407 // static
1404 RenderProcessHost* RenderProcessHostImpl::GetProcessHostForSite( 1408 RenderProcessHost* RenderProcessHostImpl::GetProcessHostForSite(
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
1598 TRACE_EVENT0("renderer_host", 1602 TRACE_EVENT0("renderer_host",
1599 "RenderWidgetHostImpl::OnCompositorSurfaceBuffersSwappedNoHost"); 1603 "RenderWidgetHostImpl::OnCompositorSurfaceBuffersSwappedNoHost");
1600 AcceleratedSurfaceMsg_BufferPresented_Params ack_params; 1604 AcceleratedSurfaceMsg_BufferPresented_Params ack_params;
1601 ack_params.sync_point = 0; 1605 ack_params.sync_point = 0;
1602 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id, 1606 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id,
1603 gpu_process_host_id, 1607 gpu_process_host_id,
1604 ack_params); 1608 ack_params);
1605 } 1609 }
1606 1610
1607 } // namespace content 1611 } // namespace content
OLDNEW
« no previous file with comments | « chrome/test/base/chrome_test_suite.cc ('k') | content/browser/site_instance_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698