| OLD | NEW |
| 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 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
| (...skipping 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1284 // process-per-site-instance for particular sites (e.g., WebUI). | 1284 // process-per-site-instance for particular sites (e.g., WebUI). |
| 1285 | 1285 |
| 1286 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 1286 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 1287 if (command_line.HasSwitch(switches::kProcessPerSite)) | 1287 if (command_line.HasSwitch(switches::kProcessPerSite)) |
| 1288 return true; | 1288 return true; |
| 1289 | 1289 |
| 1290 // We want to consolidate particular sites like WebUI when we are using | 1290 // We want to consolidate particular sites like WebUI when we are using |
| 1291 // process-per-tab or process-per-site-instance models. | 1291 // process-per-tab or process-per-site-instance models. |
| 1292 // Note that --single-process is handled in ShouldTryToUseExistingProcessHost. | 1292 // Note that --single-process is handled in ShouldTryToUseExistingProcessHost. |
| 1293 | 1293 |
| 1294 if (content::GetContentClient()->browser()-> | 1294 if (GetContentClient()->browser()-> |
| 1295 ShouldUseProcessPerSite(browser_context, url)) { | 1295 ShouldUseProcessPerSite(browser_context, url)) { |
| 1296 return true; | 1296 return true; |
| 1297 } | 1297 } |
| 1298 | 1298 |
| 1299 // DevTools pages have WebUI type but should not reuse the same host. | 1299 // DevTools pages have WebUI type but should not reuse the same host. |
| 1300 WebUIControllerFactory* factory = | 1300 WebUIControllerFactory* factory = |
| 1301 content::GetContentClient()->browser()->GetWebUIControllerFactory(); | 1301 GetContentClient()->browser()->GetWebUIControllerFactory(); |
| 1302 if (factory && | 1302 if (factory && |
| 1303 factory->UseWebUIForURL(browser_context, url) && | 1303 factory->UseWebUIForURL(browser_context, url) && |
| 1304 !url.SchemeIs(chrome::kChromeDevToolsScheme)) { | 1304 !url.SchemeIs(chrome::kChromeDevToolsScheme)) { |
| 1305 return true; | 1305 return true; |
| 1306 } | 1306 } |
| 1307 | 1307 |
| 1308 // In all other cases, don't use process-per-site logic. | 1308 // In all other cases, don't use process-per-site logic. |
| 1309 return false; | 1309 return false; |
| 1310 } | 1310 } |
| 1311 | 1311 |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1502 int32 route_id, | 1502 int32 route_id, |
| 1503 int32 gpu_process_host_id) { | 1503 int32 gpu_process_host_id) { |
| 1504 TRACE_EVENT0("renderer_host", | 1504 TRACE_EVENT0("renderer_host", |
| 1505 "RenderWidgetHostImpl::OnCompositorSurfaceBuffersSwappedNoHost"); | 1505 "RenderWidgetHostImpl::OnCompositorSurfaceBuffersSwappedNoHost"); |
| 1506 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id, | 1506 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id, |
| 1507 gpu_process_host_id, | 1507 gpu_process_host_id, |
| 1508 0); | 1508 0); |
| 1509 } | 1509 } |
| 1510 | 1510 |
| 1511 } // namespace content | 1511 } // namespace content |
| OLD | NEW |