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

Unified Diff: chrome/browser/browser_process_impl.cc

Issue 1691813003: Add --auto-open-devtools-for-tabs flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: close last DevToolsWindow Created 4 years, 10 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 | « chrome/browser/browser_process_impl.h ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_process_impl.cc
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 45756a4d69837af8358fad6ebd90e36bff2d0637..9f17e38602bd98c6c6d9a78dc1a85366f7cd3422 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -35,6 +35,7 @@
#include "chrome/browser/component_updater/chrome_component_updater_configurator.h"
#include "chrome/browser/component_updater/supervised_user_whitelist_installer.h"
#include "chrome/browser/defaults.h"
+#include "chrome/browser/devtools/devtools_auto_opener.h"
#include "chrome/browser/devtools/remote_debugging_server.h"
#include "chrome/browser/download/download_request_limiter.h"
#include "chrome/browser/download/download_status_updater.h"
@@ -286,6 +287,7 @@ void BrowserProcessImpl::StartTearDown() {
#if !defined(OS_ANDROID)
// Debugger must be cleaned up before ProfileManager.
remote_debugging_server_.reset();
+ devtools_auto_opener_.reset();
#endif
// Need to clear profiles (download managers) before the io_thread_.
@@ -688,6 +690,16 @@ void BrowserProcessImpl::CreateDevToolsHttpProtocolHandler(
#endif
}
+void BrowserProcessImpl::CreateDevToolsAutoOpener() {
+ DCHECK(CalledOnValidThread());
+#if !defined(OS_ANDROID)
+ // StartupBrowserCreator::LaunchBrowser can be run multiple times when browser
+ // is started with several profiles or existing browser process is reused.
+ if (!devtools_auto_opener_.get())
+ devtools_auto_opener_.reset(new DevToolsAutoOpener());
+#endif
+}
+
bool BrowserProcessImpl::IsShuttingDown() {
DCHECK(CalledOnValidThread());
// TODO(crbug.com/560486): Fix the tests that make the check of
« no previous file with comments | « chrome/browser/browser_process_impl.h ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698