| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 #include "content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.h" | 159 #include "content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.h" |
| 160 #endif | 160 #endif |
| 161 | 161 |
| 162 #if defined(OS_MACOSX) | 162 #if defined(OS_MACOSX) |
| 163 #include "content/common/gpu/client/gpu_memory_buffer_impl_io_surface.h" | 163 #include "content/common/gpu/client/gpu_memory_buffer_impl_io_surface.h" |
| 164 #include "ui/gl/io_surface_support_mac.h" | 164 #include "ui/gl/io_surface_support_mac.h" |
| 165 #endif | 165 #endif |
| 166 | 166 |
| 167 #if defined(OS_WIN) | 167 #if defined(OS_WIN) |
| 168 #include "base/win/scoped_com_initializer.h" | 168 #include "base/win/scoped_com_initializer.h" |
| 169 #include "base/strings/string_number_conversions.h" |
| 169 #include "content/common/font_cache_dispatcher_win.h" | 170 #include "content/common/font_cache_dispatcher_win.h" |
| 170 #include "content/common/sandbox_win.h" | 171 #include "content/common/sandbox_win.h" |
| 172 #include "ui/gfx/win/dpi.h" |
| 171 #endif | 173 #endif |
| 172 | 174 |
| 173 #if defined(ENABLE_WEBRTC) | 175 #if defined(ENABLE_WEBRTC) |
| 174 #include "content/browser/media/webrtc_internals.h" | 176 #include "content/browser/media/webrtc_internals.h" |
| 175 #include "content/browser/renderer_host/media/media_stream_track_metrics_host.h" | 177 #include "content/browser/renderer_host/media/media_stream_track_metrics_host.h" |
| 176 #include "content/browser/renderer_host/media/webrtc_identity_service_host.h" | 178 #include "content/browser/renderer_host/media/webrtc_identity_service_host.h" |
| 177 #include "content/common/media/media_stream_messages.h" | 179 #include "content/common/media/media_stream_messages.h" |
| 178 #endif | 180 #endif |
| 179 | 181 |
| 180 extern bool g_exited_main_message_loop; | 182 extern bool g_exited_main_message_loop; |
| (...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1030 command_line->AppendSwitchASCII(switches::kForceFieldTrials, | 1032 command_line->AppendSwitchASCII(switches::kForceFieldTrials, |
| 1031 field_trial_states); | 1033 field_trial_states); |
| 1032 } | 1034 } |
| 1033 | 1035 |
| 1034 GetContentClient()->browser()->AppendExtraCommandLineSwitches( | 1036 GetContentClient()->browser()->AppendExtraCommandLineSwitches( |
| 1035 command_line, GetID()); | 1037 command_line, GetID()); |
| 1036 | 1038 |
| 1037 if (content::IsPinchToZoomEnabled()) | 1039 if (content::IsPinchToZoomEnabled()) |
| 1038 command_line->AppendSwitch(switches::kEnablePinch); | 1040 command_line->AppendSwitch(switches::kEnablePinch); |
| 1039 | 1041 |
| 1042 #if defined(OS_WIN) |
| 1043 command_line->AppendSwitchASCII(switches::kUseDeviceScaleFactor, |
| 1044 base::DoubleToString(gfx::GetDPIScale())); |
| 1045 #endif |
| 1046 |
| 1040 AppendCompositorCommandLineFlags(command_line); | 1047 AppendCompositorCommandLineFlags(command_line); |
| 1041 } | 1048 } |
| 1042 | 1049 |
| 1043 void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( | 1050 void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( |
| 1044 const CommandLine& browser_cmd, | 1051 const CommandLine& browser_cmd, |
| 1045 CommandLine* renderer_cmd) const { | 1052 CommandLine* renderer_cmd) const { |
| 1046 // Propagate the following switches to the renderer command line (along | 1053 // Propagate the following switches to the renderer command line (along |
| 1047 // with any associated values) if present in the browser command line. | 1054 // with any associated values) if present in the browser command line. |
| 1048 static const char* const kSwitchNames[] = { | 1055 static const char* const kSwitchNames[] = { |
| 1049 switches::kAllowInsecureWebSocketFromHttpsOrigin, | 1056 switches::kAllowInsecureWebSocketFromHttpsOrigin, |
| (...skipping 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2248 void RenderProcessHostImpl::GpuMemoryBufferAllocated( | 2255 void RenderProcessHostImpl::GpuMemoryBufferAllocated( |
| 2249 IPC::Message* reply, | 2256 IPC::Message* reply, |
| 2250 const gfx::GpuMemoryBufferHandle& handle) { | 2257 const gfx::GpuMemoryBufferHandle& handle) { |
| 2251 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2258 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 2252 ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer::WriteReplyParams(reply, | 2259 ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer::WriteReplyParams(reply, |
| 2253 handle); | 2260 handle); |
| 2254 Send(reply); | 2261 Send(reply); |
| 2255 } | 2262 } |
| 2256 | 2263 |
| 2257 } // namespace content | 2264 } // namespace content |
| OLD | NEW |