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 #include "content/shell/shell_browser_main_parts.h" | 5 #include "content/shell/shell_browser_main_parts.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 #endif | 115 #endif |
116 } | 116 } |
117 | 117 |
118 void ShellBrowserMainParts::PreMainMessageLoopRun() { | 118 void ShellBrowserMainParts::PreMainMessageLoopRun() { |
119 browser_context_.reset(new ShellBrowserContext(false)); | 119 browser_context_.reset(new ShellBrowserContext(false)); |
120 off_the_record_browser_context_.reset(new ShellBrowserContext(true)); | 120 off_the_record_browser_context_.reset(new ShellBrowserContext(true)); |
121 | 121 |
122 Shell::Initialize(); | 122 Shell::Initialize(); |
123 net::NetModule::SetResourceProvider(PlatformResourceProvider); | 123 net::NetModule::SetResourceProvider(PlatformResourceProvider); |
124 | 124 |
125 devtools_delegate_ = new ShellDevToolsDelegate(browser_context_.get()); | 125 devtools_delegate_.reset(new ShellDevToolsDelegate(browser_context_.get())); |
126 | 126 |
127 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) { | 127 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) { |
128 Shell::CreateNewWindow(browser_context_.get(), | 128 Shell::CreateNewWindow(browser_context_.get(), |
129 GetStartupURL(), | 129 GetStartupURL(), |
130 NULL, | 130 NULL, |
131 MSG_ROUTING_NONE, | 131 MSG_ROUTING_NONE, |
132 gfx::Size()); | 132 gfx::Size()); |
133 } | 133 } |
134 | 134 |
135 #if defined(ENABLE_PLUGINS) | 135 #if defined(ENABLE_PLUGINS) |
(...skipping 19 matching lines...) Expand all Loading... |
155 #if defined(USE_AURA) | 155 #if defined(USE_AURA) |
156 Shell::PlatformExit(); | 156 Shell::PlatformExit(); |
157 #endif | 157 #endif |
158 if (devtools_delegate_) | 158 if (devtools_delegate_) |
159 devtools_delegate_->Stop(); | 159 devtools_delegate_->Stop(); |
160 browser_context_.reset(); | 160 browser_context_.reset(); |
161 off_the_record_browser_context_.reset(); | 161 off_the_record_browser_context_.reset(); |
162 } | 162 } |
163 | 163 |
164 } // namespace | 164 } // namespace |
OLD | NEW |