Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(678)

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 11066087: Upstream BrowserChildProcessHostImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed file and the static method and added the call to render_process_host_impl.cc Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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"
jam 2012/10/11 19:38:17 not needed now
Yusuf 2012/10/11 20:22:37 Done.
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
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 if (CommandLine::ForCurrentProcess()->HasSwitch(
513 switches::kUseMobileUserAgent)) {
514 cmd_line->AppendSwitch(switches::kUseMobileUserAgent);
jam 2012/10/11 19:38:17 put this in kSwitchNames below
Yusuf 2012/10/11 20:22:37 Done.
515 }
516
508 // Spawn the child process asynchronously to avoid blocking the UI thread. 517 // 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 518 // As long as there's no renderer prefix, we can use the zygote process
510 // at this stage. 519 // at this stage.
511 child_process_launcher_.reset(new ChildProcessLauncher( 520 child_process_launcher_.reset(new ChildProcessLauncher(
512 #if defined(OS_WIN) 521 #if defined(OS_WIN)
513 FilePath(), 522 FilePath(),
514 #elif defined(OS_POSIX) 523 #elif defined(OS_POSIX)
515 renderer_prefix.empty(), 524 renderer_prefix.empty(),
516 base::EnvironmentVector(), 525 base::EnvironmentVector(),
517 channel_->TakeClientFileDescriptor(), 526 channel_->TakeClientFileDescriptor(),
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after
1583 const gfx::Size& size, 1592 const gfx::Size& size,
1584 int32 gpu_process_host_id) { 1593 int32 gpu_process_host_id) {
1585 TRACE_EVENT0("renderer_host", 1594 TRACE_EVENT0("renderer_host",
1586 "RenderWidgetHostImpl::OnCompositorSurfaceBuffersSwappedNoHost"); 1595 "RenderWidgetHostImpl::OnCompositorSurfaceBuffersSwappedNoHost");
1587 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id, 1596 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id,
1588 gpu_process_host_id, 1597 gpu_process_host_id,
1589 0); 1598 0);
1590 } 1599 }
1591 1600
1592 } // namespace content 1601 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698