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

Side by Side Diff: content/shell/browser/shell_browser_main_parts.cc

Issue 790423002: Add the main frame routing ID to WebContentsDelegate, use it in BackgroundContents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: content shell Created 6 years 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
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/shell/browser/shell_application_mac.mm ('k') | content/shell/browser/shell_devtools_frontend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698