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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 #endif | 163 #endif |
164 | 164 |
165 #if defined(OS_WIN) | 165 #if defined(OS_WIN) |
166 #include "base/strings/string_number_conversions.h" | 166 #include "base/strings/string_number_conversions.h" |
167 #include "base/win/scoped_com_initializer.h" | 167 #include "base/win/scoped_com_initializer.h" |
168 #include "content/common/font_cache_dispatcher_win.h" | 168 #include "content/common/font_cache_dispatcher_win.h" |
169 #include "content/common/sandbox_win.h" | 169 #include "content/common/sandbox_win.h" |
170 #include "ui/gfx/win/dpi.h" | 170 #include "ui/gfx/win/dpi.h" |
171 #endif | 171 #endif |
172 | 172 |
173 #if defined(OS_MACOSX) | |
174 #include "content/public/common/sandbox_type_mac.h" | |
175 #endif | |
176 | |
177 #if defined(ENABLE_WEBRTC) | 173 #if defined(ENABLE_WEBRTC) |
178 #include "content/browser/media/webrtc_internals.h" | 174 #include "content/browser/media/webrtc_internals.h" |
179 #include "content/browser/renderer_host/media/media_stream_track_metrics_host.h" | 175 #include "content/browser/renderer_host/media/media_stream_track_metrics_host.h" |
180 #include "content/browser/renderer_host/media/webrtc_identity_service_host.h" | 176 #include "content/browser/renderer_host/media/webrtc_identity_service_host.h" |
181 #include "content/common/media/aec_dump_messages.h" | 177 #include "content/common/media/aec_dump_messages.h" |
182 #include "content/common/media/media_stream_messages.h" | 178 #include "content/common/media/media_stream_messages.h" |
183 #endif | 179 #endif |
184 | 180 |
185 extern bool g_exited_main_message_loop; | 181 extern bool g_exited_main_message_loop; |
186 | 182 |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 #elif defined(OS_POSIX) | 322 #elif defined(OS_POSIX) |
327 virtual bool ShouldUseZygote() OVERRIDE { | 323 virtual bool ShouldUseZygote() OVERRIDE { |
328 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); | 324 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); |
329 CommandLine::StringType renderer_prefix = | 325 CommandLine::StringType renderer_prefix = |
330 browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix); | 326 browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix); |
331 return renderer_prefix.empty(); | 327 return renderer_prefix.empty(); |
332 } | 328 } |
333 virtual int GetIpcFd() OVERRIDE { | 329 virtual int GetIpcFd() OVERRIDE { |
334 return ipc_fd_; | 330 return ipc_fd_; |
335 } | 331 } |
336 #if defined(OS_MACOSX) | |
337 virtual SandboxType GetSandboxType() OVERRIDE { | |
338 return SANDBOX_TYPE_RENDERER; | |
339 } | |
340 #endif | |
341 #endif // OS_WIN | 332 #endif // OS_WIN |
342 | 333 |
343 private: | 334 private: |
344 #if defined(OS_POSIX) | 335 #if defined(OS_POSIX) |
345 int ipc_fd_; | 336 int ipc_fd_; |
346 #endif // OS_POSIX | 337 #endif // OS_POSIX |
347 }; | 338 }; |
348 | 339 |
349 #if defined(OS_MACOSX) | 340 #if defined(OS_MACOSX) |
350 void AddBooleanValue(CFMutableDictionaryRef dictionary, | 341 void AddBooleanValue(CFMutableDictionaryRef dictionary, |
(...skipping 2016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2367 void RenderProcessHostImpl::GpuMemoryBufferAllocated( | 2358 void RenderProcessHostImpl::GpuMemoryBufferAllocated( |
2368 IPC::Message* reply, | 2359 IPC::Message* reply, |
2369 const gfx::GpuMemoryBufferHandle& handle) { | 2360 const gfx::GpuMemoryBufferHandle& handle) { |
2370 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2361 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
2371 ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer::WriteReplyParams(reply, | 2362 ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer::WriteReplyParams(reply, |
2372 handle); | 2363 handle); |
2373 Send(reply); | 2364 Send(reply); |
2374 } | 2365 } |
2375 | 2366 |
2376 } // namespace content | 2367 } // namespace content |
OLD | NEW |