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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
116 #include "ui/gl/gl_switches.h" | 116 #include "ui/gl/gl_switches.h" |
117 #include "webkit/fileapi/sandbox_mount_point_provider.h" | 117 #include "webkit/fileapi/sandbox_mount_point_provider.h" |
118 #include "webkit/glue/resource_type.h" | 118 #include "webkit/glue/resource_type.h" |
119 #include "webkit/plugins/plugin_switches.h" | 119 #include "webkit/plugins/plugin_switches.h" |
120 | 120 |
121 #if defined(OS_WIN) | 121 #if defined(OS_WIN) |
122 #include "base/win/scoped_com_initializer.h" | 122 #include "base/win/scoped_com_initializer.h" |
123 #include "content/common/font_cache_dispatcher_win.h" | 123 #include "content/common/font_cache_dispatcher_win.h" |
124 #endif | 124 #endif |
125 | 125 |
126 #if defined(OS_ANDROID) | |
127 #include "content/browser/browser_child_process_host_impl.h" | |
128 #endif | |
129 | |
126 #include "third_party/skia/include/core/SkBitmap.h" | 130 #include "third_party/skia/include/core/SkBitmap.h" |
127 | 131 |
128 extern bool g_exited_main_message_loop; | 132 extern bool g_exited_main_message_loop; |
129 | 133 |
130 static const char* kSiteProcessMapKeyName = "content_site_process_map"; | 134 static const char* kSiteProcessMapKeyName = "content_site_process_map"; |
131 | 135 |
132 namespace content { | 136 namespace content { |
133 | 137 |
134 // This class creates the IO thread for the renderer when running in | 138 // This class creates the IO thread for the renderer when running in |
135 // single-process mode. It's not used in multi-process mode. | 139 // single-process mode. It's not used in multi-process mode. |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
498 OnProcessLaunched(); // Fake a callback that the process is ready. | 502 OnProcessLaunched(); // Fake a callback that the process is ready. |
499 } else { | 503 } else { |
500 // Build command line for renderer. We call AppendRendererCommandLine() | 504 // Build command line for renderer. We call AppendRendererCommandLine() |
501 // first so the process type argument will appear first. | 505 // first so the process type argument will appear first. |
502 CommandLine* cmd_line = new CommandLine(renderer_path); | 506 CommandLine* cmd_line = new CommandLine(renderer_path); |
503 if (!renderer_prefix.empty()) | 507 if (!renderer_prefix.empty()) |
504 cmd_line->PrependWrapper(renderer_prefix); | 508 cmd_line->PrependWrapper(renderer_prefix); |
505 AppendRendererCommandLine(cmd_line); | 509 AppendRendererCommandLine(cmd_line); |
506 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id); | 510 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id); |
507 | 511 |
512 base::EnvironmentVector env; | |
Yaron
2012/10/09 21:38:53
This is unnecessary.
Yusuf
2012/10/10 00:06:08
Done.
| |
513 | |
514 #if defined(OS_ANDROID) | |
515 BrowserChildProcessHostImpl::AppendCommonChildCommandLine(cmd_line); | |
516 #endif | |
517 | |
508 // Spawn the child process asynchronously to avoid blocking the UI thread. | 518 // Spawn the child process asynchronously to avoid blocking the UI thread. |
509 // As long as there's no renderer prefix, we can use the zygote process | 519 // As long as there's no renderer prefix, we can use the zygote process |
510 // at this stage. | 520 // at this stage. |
511 child_process_launcher_.reset(new ChildProcessLauncher( | 521 child_process_launcher_.reset(new ChildProcessLauncher( |
512 #if defined(OS_WIN) | 522 #if defined(OS_WIN) |
513 FilePath(), | 523 FilePath(), |
514 #elif defined(OS_POSIX) | 524 #elif defined(OS_POSIX) |
515 renderer_prefix.empty(), | 525 renderer_prefix.empty(), |
516 base::EnvironmentVector(), | 526 base::EnvironmentVector(), |
517 channel_->TakeClientFileDescriptor(), | 527 channel_->TakeClientFileDescriptor(), |
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1583 const gfx::Size& size, | 1593 const gfx::Size& size, |
1584 int32 gpu_process_host_id) { | 1594 int32 gpu_process_host_id) { |
1585 TRACE_EVENT0("renderer_host", | 1595 TRACE_EVENT0("renderer_host", |
1586 "RenderWidgetHostImpl::OnCompositorSurfaceBuffersSwappedNoHost"); | 1596 "RenderWidgetHostImpl::OnCompositorSurfaceBuffersSwappedNoHost"); |
1587 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id, | 1597 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id, |
1588 gpu_process_host_id, | 1598 gpu_process_host_id, |
1589 0); | 1599 0); |
1590 } | 1600 } |
1591 | 1601 |
1592 } // namespace content | 1602 } // namespace content |
OLD | NEW |