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 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1048 | 1048 |
1049 GetContentClient()->browser()->AppendExtraCommandLineSwitches( | 1049 GetContentClient()->browser()->AppendExtraCommandLineSwitches( |
1050 command_line, GetID()); | 1050 command_line, GetID()); |
1051 | 1051 |
1052 if (IsPinchToZoomEnabled()) | 1052 if (IsPinchToZoomEnabled()) |
1053 command_line->AppendSwitch(switches::kEnablePinch); | 1053 command_line->AppendSwitch(switches::kEnablePinch); |
1054 | 1054 |
1055 #if defined(OS_WIN) | 1055 #if defined(OS_WIN) |
1056 command_line->AppendSwitchASCII(switches::kDeviceScaleFactor, | 1056 command_line->AppendSwitchASCII(switches::kDeviceScaleFactor, |
1057 base::DoubleToString(gfx::GetDPIScale())); | 1057 base::DoubleToString(gfx::GetDPIScale())); |
| 1058 command_line->AppendSwitchASCII( |
| 1059 switches::kFontCacheSharedMemSuffix, |
| 1060 base::UintToString(base::GetCurrentProcId())); |
1058 #endif | 1061 #endif |
1059 | 1062 |
1060 AppendCompositorCommandLineFlags(command_line); | 1063 AppendCompositorCommandLineFlags(command_line); |
1061 } | 1064 } |
1062 | 1065 |
1063 void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( | 1066 void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( |
1064 const base::CommandLine& browser_cmd, | 1067 const base::CommandLine& browser_cmd, |
1065 base::CommandLine* renderer_cmd) const { | 1068 base::CommandLine* renderer_cmd) const { |
1066 // Propagate the following switches to the renderer command line (along | 1069 // Propagate the following switches to the renderer command line (along |
1067 // with any associated values) if present in the browser command line. | 1070 // with any associated values) if present in the browser command line. |
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2238 | 2241 |
2239 void RenderProcessHostImpl::DecrementWorkerRefCount() { | 2242 void RenderProcessHostImpl::DecrementWorkerRefCount() { |
2240 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2243 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
2241 DCHECK_GT(worker_ref_count_, 0); | 2244 DCHECK_GT(worker_ref_count_, 0); |
2242 --worker_ref_count_; | 2245 --worker_ref_count_; |
2243 if (worker_ref_count_ == 0) | 2246 if (worker_ref_count_ == 0) |
2244 Cleanup(); | 2247 Cleanup(); |
2245 } | 2248 } |
2246 | 2249 |
2247 } // namespace content | 2250 } // namespace content |
OLD | NEW |