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

Side by Side Diff: chrome/browser/ui/views/extensions/extension_popup.cc

Issue 10823233: Close detached DevTools window (rather than open a new instance) when it receives an F12 keypress (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win compilation fixed Created 8 years, 3 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/ui/views/extensions/extension_popup.h" 5 #include "chrome/browser/ui/views/extensions/extension_popup.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/browser/debugger/devtools_window.h" 9 #include "chrome/browser/debugger/devtools_window.h"
10 #include "chrome/browser/extensions/extension_process_manager.h" 10 #include "chrome/browser/extensions/extension_process_manager.h"
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 Show(); 206 Show();
207 207
208 // Focus on the host contents when the bubble is first shown. 208 // Focus on the host contents when the bubble is first shown.
209 host()->host_contents()->Focus(); 209 host()->host_contents()->Focus();
210 210
211 // Listen for widget focus changes after showing (used for non-aura win). 211 // Listen for widget focus changes after showing (used for non-aura win).
212 views::WidgetFocusManager::GetInstance()->AddFocusChangeListener(this); 212 views::WidgetFocusManager::GetInstance()->AddFocusChangeListener(this);
213 213
214 if (inspect_with_devtools_) { 214 if (inspect_with_devtools_) {
215 DevToolsWindow::ToggleDevToolsWindow(host()->render_view_host(), 215 DevToolsWindow::ToggleDevToolsWindow(host()->render_view_host(),
216 true,
216 DEVTOOLS_TOGGLE_ACTION_SHOW_CONSOLE); 217 DEVTOOLS_TOGGLE_ACTION_SHOW_CONSOLE);
217 } 218 }
218 } 219 }
219 220
220 void ExtensionPopup::CloseBubble() { 221 void ExtensionPopup::CloseBubble() {
221 GetWidget()->Close(); 222 GetWidget()->Close();
222 } 223 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/accelerator_table.cc ('k') | chrome/browser/ui/views/external_tab_container_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698