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 #include <algorithm> | 10 #include <algorithm> |
(...skipping 1261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1272 // Disable databases in incognito mode. | 1272 // Disable databases in incognito mode. |
1273 if (GetBrowserContext()->IsOffTheRecord() && | 1273 if (GetBrowserContext()->IsOffTheRecord() && |
1274 !browser_cmd.HasSwitch(switches::kDisableDatabases)) { | 1274 !browser_cmd.HasSwitch(switches::kDisableDatabases)) { |
1275 renderer_cmd->AppendSwitch(switches::kDisableDatabases); | 1275 renderer_cmd->AppendSwitch(switches::kDisableDatabases); |
1276 } | 1276 } |
1277 | 1277 |
1278 // Enforce the extra command line flags for impl-side painting. | 1278 // Enforce the extra command line flags for impl-side painting. |
1279 if (IsImplSidePaintingEnabled() && | 1279 if (IsImplSidePaintingEnabled() && |
1280 !browser_cmd.HasSwitch(switches::kEnableDeferredImageDecoding)) | 1280 !browser_cmd.HasSwitch(switches::kEnableDeferredImageDecoding)) |
1281 renderer_cmd->AppendSwitch(switches::kEnableDeferredImageDecoding); | 1281 renderer_cmd->AppendSwitch(switches::kEnableDeferredImageDecoding); |
| 1282 |
| 1283 // Add kWaitForDebugger to let renderer process wait for a debugger. |
| 1284 if (browser_cmd.HasSwitch(switches::kWaitForDebuggerChildren)) { |
| 1285 // Look to pass-on the kWaitForDebugger flag. |
| 1286 std::string value = |
| 1287 browser_cmd.GetSwitchValueASCII(switches::kWaitForDebuggerChildren); |
| 1288 if (value.empty() || value == switches::kRendererProcess) { |
| 1289 renderer_cmd->AppendSwitch(switches::kWaitForDebugger); |
| 1290 } |
| 1291 } |
1282 } | 1292 } |
1283 | 1293 |
1284 base::ProcessHandle RenderProcessHostImpl::GetHandle() const { | 1294 base::ProcessHandle RenderProcessHostImpl::GetHandle() const { |
1285 if (run_renderer_in_process()) | 1295 if (run_renderer_in_process()) |
1286 return base::Process::Current().handle(); | 1296 return base::Process::Current().handle(); |
1287 | 1297 |
1288 if (!child_process_launcher_.get() || child_process_launcher_->IsStarting()) | 1298 if (!child_process_launcher_.get() || child_process_launcher_->IsStarting()) |
1289 return base::kNullProcessHandle; | 1299 return base::kNullProcessHandle; |
1290 | 1300 |
1291 return child_process_launcher_->GetHandle(); | 1301 return child_process_launcher_->GetHandle(); |
(...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2353 } | 2363 } |
2354 | 2364 |
2355 void RenderProcessHostImpl::OnDeletedGpuMemoryBuffer( | 2365 void RenderProcessHostImpl::OnDeletedGpuMemoryBuffer( |
2356 gfx::GpuMemoryBufferType type, | 2366 gfx::GpuMemoryBufferType type, |
2357 const gfx::GpuMemoryBufferId& id) { | 2367 const gfx::GpuMemoryBufferId& id) { |
2358 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2368 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
2359 GpuMemoryBufferImpl::DeletedByChildProcess(type, id, GetHandle()); | 2369 GpuMemoryBufferImpl::DeletedByChildProcess(type, id, GetHandle()); |
2360 } | 2370 } |
2361 | 2371 |
2362 } // namespace content | 2372 } // namespace content |
OLD | NEW |