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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 #endif | 162 #endif |
163 | 163 |
164 #if defined(OS_WIN) | 164 #if defined(OS_WIN) |
165 #include "base/strings/string_number_conversions.h" | 165 #include "base/strings/string_number_conversions.h" |
166 #include "base/win/scoped_com_initializer.h" | 166 #include "base/win/scoped_com_initializer.h" |
167 #include "content/common/font_cache_dispatcher_win.h" | 167 #include "content/common/font_cache_dispatcher_win.h" |
168 #include "content/common/sandbox_win.h" | 168 #include "content/common/sandbox_win.h" |
169 #include "ui/gfx/win/dpi.h" | 169 #include "ui/gfx/win/dpi.h" |
170 #endif | 170 #endif |
171 | 171 |
| 172 #if defined(OS_MACOSX) |
| 173 #include "content/public/common/sandbox_type_mac.h" |
| 174 #endif |
| 175 |
172 #if defined(ENABLE_WEBRTC) | 176 #if defined(ENABLE_WEBRTC) |
173 #include "content/browser/media/webrtc_internals.h" | 177 #include "content/browser/media/webrtc_internals.h" |
174 #include "content/browser/renderer_host/media/media_stream_track_metrics_host.h" | 178 #include "content/browser/renderer_host/media/media_stream_track_metrics_host.h" |
175 #include "content/browser/renderer_host/media/webrtc_identity_service_host.h" | 179 #include "content/browser/renderer_host/media/webrtc_identity_service_host.h" |
176 #include "content/common/media/media_stream_messages.h" | 180 #include "content/common/media/media_stream_messages.h" |
177 #endif | 181 #endif |
178 | 182 |
179 extern bool g_exited_main_message_loop; | 183 extern bool g_exited_main_message_loop; |
180 | 184 |
181 static const char* kSiteProcessMapKeyName = "content_site_process_map"; | 185 static const char* kSiteProcessMapKeyName = "content_site_process_map"; |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 #elif defined(OS_POSIX) | 324 #elif defined(OS_POSIX) |
321 virtual bool ShouldUseZygote() OVERRIDE { | 325 virtual bool ShouldUseZygote() OVERRIDE { |
322 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); | 326 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); |
323 CommandLine::StringType renderer_prefix = | 327 CommandLine::StringType renderer_prefix = |
324 browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix); | 328 browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix); |
325 return renderer_prefix.empty(); | 329 return renderer_prefix.empty(); |
326 } | 330 } |
327 virtual int GetIpcFd() OVERRIDE { | 331 virtual int GetIpcFd() OVERRIDE { |
328 return ipc_fd_; | 332 return ipc_fd_; |
329 } | 333 } |
| 334 #if defined(OS_MACOSX) |
| 335 virtual SandboxType GetSandboxType() OVERRIDE { |
| 336 return SANDBOX_TYPE_RENDERER; |
| 337 } |
| 338 #endif |
330 #endif // OS_WIN | 339 #endif // OS_WIN |
331 | 340 |
332 private: | 341 private: |
333 #if defined(OS_POSIX) | 342 #if defined(OS_POSIX) |
334 int ipc_fd_; | 343 int ipc_fd_; |
335 #endif // OS_POSIX | 344 #endif // OS_POSIX |
336 }; | 345 }; |
337 | 346 |
338 #if defined(OS_MACOSX) | 347 #if defined(OS_MACOSX) |
339 void AddBooleanValue(CFMutableDictionaryRef dictionary, | 348 void AddBooleanValue(CFMutableDictionaryRef dictionary, |
(...skipping 1947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2287 void RenderProcessHostImpl::GpuMemoryBufferAllocated( | 2296 void RenderProcessHostImpl::GpuMemoryBufferAllocated( |
2288 IPC::Message* reply, | 2297 IPC::Message* reply, |
2289 const gfx::GpuMemoryBufferHandle& handle) { | 2298 const gfx::GpuMemoryBufferHandle& handle) { |
2290 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2299 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
2291 ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer::WriteReplyParams(reply, | 2300 ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer::WriteReplyParams(reply, |
2292 handle); | 2301 handle); |
2293 Send(reply); | 2302 Send(reply); |
2294 } | 2303 } |
2295 | 2304 |
2296 } // namespace content | 2305 } // namespace content |
OLD | NEW |