summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authoryurys@google.com <yurys@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-10 09:59:04 +0000
committeryurys@google.com <yurys@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-10 09:59:04 +0000
commit95e23c07d05e60f685051618103b9cbcf77198a3 (patch)
tree40ac2ed3cc40d896778dd4661626c22492e19c31 /chrome
parent3e682c670b174230ccb819294ee58588a4efaaea (diff)
downloadchromium_src-95e23c07d05e60f685051618103b9cbcf77198a3.zip
chromium_src-95e23c07d05e60f685051618103b9cbcf77198a3.tar.gz
chromium_src-95e23c07d05e60f685051618103b9cbcf77198a3.tar.bz2
If the flag is specified developer tools window will be opened instead of Console Debugger when user clicks Debug JavaScript. This is a temporary solution and we will get rid of this flag as well as of debugger console when developer tools implement all their functionality.
Review URL: http://codereview.chromium.org/39259 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11321 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/browser.cc18
-rw-r--r--chrome/common/chrome_switches.cc4
-rw-r--r--chrome/common/chrome_switches.h2
3 files changed, 18 insertions, 6 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index 4de2951..43e4a49 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -938,12 +938,18 @@ void Browser::OpenDebuggerWindow() {
UserMetrics::RecordAction(L"Debugger", profile_);
TabContents* current_tab = GetSelectedTabContents();
if (current_tab->AsWebContents()) {
- // Only one debugger instance can exist at a time right now.
- // TODO(erikkay): need an alert, dialog, something
- // or better yet, fix the one instance limitation
- if (!DebuggerWindow::DoesDebuggerExist())
- debugger_window_ = new DebuggerWindow();
- debugger_window_->Show(current_tab);
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableOutOfProcessDevTools)) {
+ WebContents* wc = current_tab->AsWebContents();
+ wc->view()->OpenDeveloperTools();
+ } else {
+ // Only one debugger instance can exist at a time right now.
+ // TODO(erikkay): need an alert, dialog, something
+ // or better yet, fix the one instance limitation
+ if (!DebuggerWindow::DoesDebuggerExist())
+ debugger_window_ = new DebuggerWindow();
+ debugger_window_->Show(current_tab);
+ }
}
#endif
}
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 00757ed..1ea18e8 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -404,4 +404,8 @@ const wchar_t kRendererCmdPrefix[] = L"renderer-cmd-prefix";
// can connect to a channel, provided it knows its name. For debugging purposes.
const wchar_t kIPCUseFIFO[] = L"ipc-use-fifo";
+// If this flag is set open out of process developer tools window instead of
+// Console Debugger when user clicks "Debug JavaScript".
+const wchar_t kEnableOutOfProcessDevTools[] = L"enable-oop-devtools";
+
} // namespace switches
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index 0c4c2e5..f106dba 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -154,6 +154,8 @@ extern const wchar_t kRendererCmdPrefix[];
extern const wchar_t kIPCUseFIFO[];
+extern const wchar_t kEnableOutOfProcessDevTools[];
+
} // namespace switches
#endif // CHROME_COMMON_CHROME_SWITCHES_H__