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

Side by Side Diff: content/browser/browser_main_runner.cc

Issue 10115048: Fix single process mode in content_shell. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 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
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | content/shell/shell_main_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "content/public/browser/browser_main_runner.h" 5 #include "content/public/browser/browser_main_runner.h"
6 6
7 #include "base/allocator/allocator_shim.h" 7 #include "base/allocator/allocator_shim.h"
8 #include "base/base_switches.h" 8 #include "base/base_switches.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/metrics/histogram.h" 12 #include "base/metrics/histogram.h"
13 #include "content/browser/browser_main_loop.h" 13 #include "content/browser/browser_main_loop.h"
14 #include "content/browser/notification_service_impl.h" 14 #include "content/browser/notification_service_impl.h"
15 #include "content/common/child_process.h" 15 #include "content/common/child_process.h"
16 #include "content/public/browser/render_process_host.h"
16 #include "content/public/common/content_switches.h" 17 #include "content/public/common/content_switches.h"
17 #include "content/public/common/main_function_params.h" 18 #include "content/public/common/main_function_params.h"
18 19
19 #if defined(OS_WIN) 20 #if defined(OS_WIN)
20 #include "base/win/scoped_com_initializer.h" 21 #include "base/win/scoped_com_initializer.h"
21 #endif 22 #endif
22 23
23 bool g_exited_main_message_loop = false; 24 bool g_exited_main_message_loop = false;
24 25
25 namespace { 26 namespace {
(...skipping 14 matching lines...) Expand all
40 virtual int Initialize(const content::MainFunctionParams& parameters) 41 virtual int Initialize(const content::MainFunctionParams& parameters)
41 OVERRIDE { 42 OVERRIDE {
42 is_initialized_ = true; 43 is_initialized_ = true;
43 44
44 // ChildProcess:: is a misnomer unless you consider context. Use 45 // ChildProcess:: is a misnomer unless you consider context. Use
45 // of --wait-for-debugger only makes sense when Chrome itself is a 46 // of --wait-for-debugger only makes sense when Chrome itself is a
46 // child process (e.g. when launched by PyAuto). 47 // child process (e.g. when launched by PyAuto).
47 if (parameters.command_line.HasSwitch(switches::kWaitForDebugger)) 48 if (parameters.command_line.HasSwitch(switches::kWaitForDebugger))
48 ChildProcess::WaitForDebugger("Browser"); 49 ChildProcess::WaitForDebugger("Browser");
49 50
51 if (parameters.command_line.HasSwitch(switches::kSingleProcess))
52 content::RenderProcessHost::set_run_renderer_in_process(true);
53
50 statistics_.reset(new base::StatisticsRecorder); 54 statistics_.reset(new base::StatisticsRecorder);
51 55
52 notification_service_.reset(new NotificationServiceImpl); 56 notification_service_.reset(new NotificationServiceImpl);
53 57
54 main_loop_.reset(new content::BrowserMainLoop(parameters)); 58 main_loop_.reset(new content::BrowserMainLoop(parameters));
55 59
56 main_loop_->Init(); 60 main_loop_->Init();
57 61
58 main_loop_->EarlyInitialization(); 62 main_loop_->EarlyInitialization();
59 63
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 } // namespace 143 } // namespace
140 144
141 namespace content { 145 namespace content {
142 146
143 // static 147 // static
144 BrowserMainRunner* BrowserMainRunner::Create() { 148 BrowserMainRunner* BrowserMainRunner::Create() {
145 return new BrowserMainRunnerImpl(); 149 return new BrowserMainRunnerImpl();
146 } 150 }
147 151
148 } // namespace content 152 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | content/shell/shell_main_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698