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

Side by Side Diff: chrome/browser/debugger/devtools_window.cc

Issue 155423: DevTools: Focus docked DevTools window on breakpoint. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/cocoa/browser_window_cocoa.mm ('k') | chrome/browser/gtk/browser_window_gtk.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "app/l10n_util.h" 5 #include "app/l10n_util.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "chrome/browser/browser.h" 7 #include "chrome/browser/browser.h"
8 #include "chrome/browser/browser_list.h" 8 #include "chrome/browser/browser_list.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/browser_window.h" 10 #include "chrome/browser/browser_window.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 } 120 }
121 121
122 if (!browser_) { 122 if (!browser_) {
123 CreateDevToolsBrowser(); 123 CreateDevToolsBrowser();
124 } 124 }
125 browser_->window()->Show(); 125 browser_->window()->Show();
126 tab_contents_->view()->SetInitialFocus(); 126 tab_contents_->view()->SetInitialFocus();
127 } 127 }
128 128
129 void DevToolsWindow::Activate() { 129 void DevToolsWindow::Activate() {
130 if (!docked_ && !browser_->window()->IsActive()) { 130 if (!docked_) {
131 browser_->window()->Activate(); 131 if (!browser_->window()->IsActive()) {
132 browser_->window()->Activate();
133 }
134 } else {
135 inspected_window_->FocusDevTools();
132 } 136 }
133 } 137 }
134 138
135 void DevToolsWindow::SetDocked(bool docked) { 139 void DevToolsWindow::SetDocked(bool docked) {
136 if (docked_ == docked) { 140 if (docked_ == docked) {
137 return; 141 return;
138 } 142 }
139 docked_ = docked; 143 docked_ = docked;
140 144
141 if (docked) { 145 if (docked) {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 &tab_contents_->controller()) { 216 &tab_contents_->controller()) {
213 // This happens when browser closes all of its tabs as a result 217 // This happens when browser closes all of its tabs as a result
214 // of window.Close event. 218 // of window.Close event.
215 // Notify manager that this DevToolsClientHost no longer exists and 219 // Notify manager that this DevToolsClientHost no longer exists and
216 // initiate self-destuct here. 220 // initiate self-destuct here.
217 NotifyCloseListener(); 221 NotifyCloseListener();
218 delete this; 222 delete this;
219 } 223 }
220 } 224 }
221 } 225 }
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/browser_window_cocoa.mm ('k') | chrome/browser/gtk/browser_window_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698