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

Unified Diff: content/shell/shell_browser_main_parts.cc

Issue 9982011: Mac content shell: Fix new browser window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/shell/shell_browser_main_parts.h ('k') | content/shell/shell_content_browser_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/shell_browser_main_parts.cc
diff --git a/content/shell/shell_browser_main_parts.cc b/content/shell/shell_browser_main_parts.cc
index a47c84940b7f47998960185ccf723adc0795add5..272b94473279f448d8cabab01a498ce379ff91b3 100644
--- a/content/shell/shell_browser_main_parts.cc
+++ b/content/shell/shell_browser_main_parts.cc
@@ -58,6 +58,8 @@ int ShellBrowserMainParts::PreCreateThreads() {
}
void ShellBrowserMainParts::PreMainMessageLoopRun() {
+ browser_context_.reset(new ShellBrowserContext(this));
+
Shell::PlatformInitialize();
net::NetModule::SetResourceProvider(Shell::PlatformResourceProvider);
@@ -69,14 +71,14 @@ void ShellBrowserMainParts::PreMainMessageLoopRun() {
if (base::StringToInt(port_str, &port) && port > 0 && port < 65535) {
devtools_delegate_ = new ShellDevToolsDelegate(
port,
- ShellBrowserContext::GetInstance()->GetRequestContext());
+ browser_context_->GetRequestContext());
} else {
DLOG(WARNING) << "Invalid http debugger port number " << port;
}
}
if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) {
- Shell::CreateNewWindow(ShellBrowserContext::GetInstance(),
+ Shell::CreateNewWindow(browser_context_.get(),
GetStartupURL(),
NULL,
MSG_ROUTING_NONE,
@@ -87,6 +89,7 @@ void ShellBrowserMainParts::PreMainMessageLoopRun() {
void ShellBrowserMainParts::PostMainMessageLoopRun() {
if (devtools_delegate_)
devtools_delegate_->Stop();
+ browser_context_.reset();
}
bool ShellBrowserMainParts::MainMessageLoopRun(int* result_code) {
« no previous file with comments | « content/shell/shell_browser_main_parts.h ('k') | content/shell/shell_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698