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

Side by Side Diff: chrome/browser/ui/browser_commands.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/browser_commands.h" 5 #include "chrome/browser/ui/browser_commands.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/bookmarks/bookmark_editor.h" 10 #include "chrome/browser/bookmarks/bookmark_editor.h"
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 void FocusPreviousPane(Browser* browser) { 813 void FocusPreviousPane(Browser* browser) {
814 content::RecordAction(UserMetricsAction("FocusPreviousPane")); 814 content::RecordAction(UserMetricsAction("FocusPreviousPane"));
815 browser->window()->RotatePaneFocus(false); 815 browser->window()->RotatePaneFocus(false);
816 } 816 }
817 817
818 void ToggleDevToolsWindow(Browser* browser, DevToolsToggleAction action) { 818 void ToggleDevToolsWindow(Browser* browser, DevToolsToggleAction action) {
819 if (action == DEVTOOLS_TOGGLE_ACTION_SHOW_CONSOLE) 819 if (action == DEVTOOLS_TOGGLE_ACTION_SHOW_CONSOLE)
820 content::RecordAction(UserMetricsAction("DevTools_ToggleConsole")); 820 content::RecordAction(UserMetricsAction("DevTools_ToggleConsole"));
821 else 821 else
822 content::RecordAction(UserMetricsAction("DevTools_ToggleWindow")); 822 content::RecordAction(UserMetricsAction("DevTools_ToggleWindow"));
823 823 DevToolsWindow::ToggleDevToolsWindow(browser, action);
824 DevToolsWindow::ToggleDevToolsWindow(
825 GetActiveWebContents(browser)->GetRenderViewHost(),
826 action);
827 } 824 }
828 825
829 bool CanOpenTaskManager() { 826 bool CanOpenTaskManager() {
830 #if defined(OS_WIN) 827 #if defined(OS_WIN)
831 // In metro we can't display the task manager, as it is a native window. 828 // In metro we can't display the task manager, as it is a native window.
832 return !base::win::IsMetroProcess(); 829 return !base::win::IsMetroProcess();
833 #else 830 #else
834 return true; 831 return true;
835 #endif 832 #endif
836 } 833 }
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 BrowserCommandsTabContentsCreator::CreateTabContents(contents); 999 BrowserCommandsTabContentsCreator::CreateTabContents(contents);
1003 } 1000 }
1004 app_browser->tab_strip_model()->AppendTabContents(tab_contents, true); 1001 app_browser->tab_strip_model()->AppendTabContents(tab_contents, true);
1005 1002
1006 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; 1003 contents->GetMutableRendererPrefs()->can_accept_load_drops = false;
1007 contents->GetRenderViewHost()->SyncRendererPrefs(); 1004 contents->GetRenderViewHost()->SyncRendererPrefs();
1008 app_browser->window()->Show(); 1005 app_browser->window()->Show();
1009 } 1006 }
1010 1007
1011 } // namespace chrome 1008 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_command_controller.cc ('k') | chrome/browser/ui/gtk/accelerators_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698