OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/shell/browser/shell_browser_main_parts.h" | 5 #include "content/shell/browser/shell_browser_main_parts.h" |
6 | 6 |
7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 void ShellBrowserMainParts::InitializeBrowserContexts() { | 117 void ShellBrowserMainParts::InitializeBrowserContexts() { |
118 set_browser_context(new ShellBrowserContext(false, net_log_.get())); | 118 set_browser_context(new ShellBrowserContext(false, net_log_.get())); |
119 set_off_the_record_browser_context( | 119 set_off_the_record_browser_context( |
120 new ShellBrowserContext(true, net_log_.get())); | 120 new ShellBrowserContext(true, net_log_.get())); |
121 } | 121 } |
122 | 122 |
123 void ShellBrowserMainParts::InitializeMessageLoopContext() { | 123 void ShellBrowserMainParts::InitializeMessageLoopContext() { |
124 Shell::CreateNewWindow(browser_context_.get(), | 124 Shell::CreateNewWindow(browser_context_.get(), |
125 GetStartupURL(), | 125 GetStartupURL(), |
126 NULL, | 126 NULL, |
127 MSG_ROUTING_NONE, | |
128 gfx::Size()); | 127 gfx::Size()); |
129 } | 128 } |
130 | 129 |
131 void ShellBrowserMainParts::PreMainMessageLoopRun() { | 130 void ShellBrowserMainParts::PreMainMessageLoopRun() { |
132 #if defined(OS_ANDROID) | 131 #if defined(OS_ANDROID) |
133 if (CommandLine::ForCurrentProcess()->HasSwitch( | 132 if (CommandLine::ForCurrentProcess()->HasSwitch( |
134 switches::kEnableCrashReporter)) { | 133 switches::kEnableCrashReporter)) { |
135 base::FilePath crash_dumps_dir = | 134 base::FilePath crash_dumps_dir = |
136 CommandLine::ForCurrentProcess()->GetSwitchValuePath( | 135 CommandLine::ForCurrentProcess()->GetSwitchValuePath( |
137 switches::kCrashDumpsDir); | 136 switches::kCrashDumpsDir); |
(...skipping 22 matching lines...) Expand all Loading... |
160 return !run_message_loop_; | 159 return !run_message_loop_; |
161 } | 160 } |
162 | 161 |
163 void ShellBrowserMainParts::PostMainMessageLoopRun() { | 162 void ShellBrowserMainParts::PostMainMessageLoopRun() { |
164 devtools_http_handler_.reset(); | 163 devtools_http_handler_.reset(); |
165 browser_context_.reset(); | 164 browser_context_.reset(); |
166 off_the_record_browser_context_.reset(); | 165 off_the_record_browser_context_.reset(); |
167 } | 166 } |
168 | 167 |
169 } // namespace | 168 } // namespace |
OLD | NEW |