From 2a8a98126b0115e0f3d137668c67b90a399f72bf Mon Sep 17 00:00:00 2001 From: "apavlov@chromium.org" Date: Fri, 16 Jul 2010 11:58:48 +0000 Subject: Add "Inspect Element" shortcut to browser tabs. If the DevTools window is closed, it gets opened, and the Inspect Element tool is enabled. If the DevTools window is opened, the inspected tab remains focused with the Inspect Element tool enabled. If the Inspect Element tool is enabled, it gets turned off. The shortcut is Ctrl-Shift-C for Win/Linux, Cmd-Shift-C for Mac BUG=29532 TEST=manual Review URL: http://codereview.chromium.org/3011002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52651 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/external_tab_container_win.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'chrome/browser/external_tab_container_win.cc') diff --git a/chrome/browser/external_tab_container_win.cc b/chrome/browser/external_tab_container_win.cc index 7d12555..106ad30 100644 --- a/chrome/browser/external_tab_container_win.cc +++ b/chrome/browser/external_tab_container_win.cc @@ -15,6 +15,7 @@ #include "chrome/browser/automation/automation_extension_function.h" #include "chrome/browser/browser_window.h" #include "chrome/browser/debugger/devtools_manager.h" +#include "chrome/browser/debugger/devtools_toggle_action.h" #include "chrome/browser/load_notification_details.h" #include "chrome/browser/page_info_window.h" #include "chrome/browser/profile.h" @@ -827,11 +828,17 @@ bool ExternalTabContainer::AcceleratorPressed( break; case IDC_DEV_TOOLS: DevToolsManager::GetInstance()->ToggleDevToolsWindow( - tab_contents_->render_view_host(), false); + tab_contents_->render_view_host(), DEVTOOLS_TOGGLE_ACTION_NONE); break; case IDC_DEV_TOOLS_CONSOLE: DevToolsManager::GetInstance()->ToggleDevToolsWindow( - tab_contents_->render_view_host(), true); + tab_contents_->render_view_host(), + DEVTOOLS_TOGGLE_ACTION_SHOW_CONSOLE); + break; + case IDC_DEV_TOOLS_INSPECT: + DevToolsManager::GetInstance()->ToggleDevToolsWindow( + tab_contents_->render_view_host(), + DEVTOOLS_TOGGLE_ACTION_INSPECT); break; default: NOTREACHED() << "Unsupported accelerator: " << command_id; -- cgit v1.1