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

Unified Diff: chrome/browser/debugger/devtools_window.cc

Issue 155068: DevTools: preserve focus on activating dev tools window. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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/debugger/devtools_window.h ('k') | chrome/browser/renderer_host/render_view_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/debugger/devtools_window.cc
===================================================================
--- chrome/browser/debugger/devtools_window.cc (revision 19929)
+++ chrome/browser/debugger/devtools_window.cc (working copy)
@@ -33,6 +33,7 @@
FloatingWindow(Profile* profile);
virtual ~FloatingWindow();
virtual void Show();
+ virtual void Activate();
virtual void InspectedTabClosing();
// TabStripModelObserver implementation
@@ -49,6 +50,7 @@
public:
DockedWindow(Profile* profile, BrowserWindow* window);
virtual ~DockedWindow();
+ virtual void Activate() {}
virtual void Show();
virtual void InspectedTabClosing();
@@ -216,6 +218,12 @@
FloatingWindow::~FloatingWindow() {
}
+void FloatingWindow::Activate() {
+ if (!browser_->window()->IsActive()) {
+ browser_->window()->Activate();
+ }
+}
+
void FloatingWindow::Show() {
browser_->window()->Show();
tab_contents_->view()->SetInitialFocus();
« no previous file with comments | « chrome/browser/debugger/devtools_window.h ('k') | chrome/browser/renderer_host/render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698