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

Unified Diff: chrome/browser/browser.cc

Issue 115050: Enabled Ctrl+Shift+L for POPUP and APP windows.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 7 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 | « no previous file | chrome/browser/debugger/debugger_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser.cc
===================================================================
--- chrome/browser/browser.cc (revision 15515)
+++ chrome/browser/browser.cc (working copy)
@@ -16,6 +16,7 @@
#include "chrome/browser/browser_shutdown.h"
#include "chrome/browser/browser_window.h"
#include "chrome/browser/character_encoding.h"
+#include "chrome/browser/debugger/debugger_host.h"
#include "chrome/browser/debugger/devtools_manager.h"
#include "chrome/browser/download/download_manager.h"
#include "chrome/browser/find_bar.h"
@@ -1045,8 +1046,12 @@
// 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();
+ DebuggerHost* host = DebuggerWindow::GetAnyExistingDebugger();
+ if (host) {
+ host->ShowWindow();
+ return;
+ }
+ debugger_window_ = new DebuggerWindow();
debugger_window_->Show(GetSelectedTabContents());
#endif
}
@@ -2115,6 +2120,14 @@
// Show various bits of UI
command_updater_.UpdateCommandEnabled(IDC_OPEN_FILE, true);
command_updater_.UpdateCommandEnabled(IDC_CREATE_SHORTCUTS, false);
+#if defined(OS_WIN)
+ // Command line debugger conflicts with the new oop one.
+ bool oop_devtools = CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableOutOfProcessDevTools);
+ command_updater_.UpdateCommandEnabled(IDC_DEBUGGER,
+ // The debugger doesn't work in single process mode.
+ !oop_devtools && !RenderProcessHost::run_renderer_in_process());
+#endif
command_updater_.UpdateCommandEnabled(IDC_TASK_MANAGER, true);
command_updater_.UpdateCommandEnabled(IDC_SELECT_PROFILE, true);
command_updater_.UpdateCommandEnabled(IDC_SHOW_HISTORY, true);
@@ -2146,15 +2159,6 @@
normal_window && !profile_->IsOffTheRecord());
// Show various bits of UI
-#if defined(OS_WIN)
- // Command line debugger conflicts with the new oop one.
- bool oop_devtools = CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableOutOfProcessDevTools);
- command_updater_.UpdateCommandEnabled(IDC_DEBUGGER,
- // The debugger doesn't work in single process mode.
- !oop_devtools && normal_window &&
- !RenderProcessHost::run_renderer_in_process());
-#endif
command_updater_.UpdateCommandEnabled(IDC_CLEAR_BROWSING_DATA,
normal_window);
}
« no previous file with comments | « no previous file | chrome/browser/debugger/debugger_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698