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

Side by Side Diff: chrome/browser/ui/views/external_tab_container_win.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
« no previous file with comments | « chrome/browser/ui/views/extensions/extension_popup.cc ('k') | no next file » | 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) 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/external_tab_container_win.h" 5 #include "chrome/browser/ui/views/external_tab_container_win.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after
1062 break; 1062 break;
1063 case IDC_ZOOM_NORMAL: 1063 case IDC_ZOOM_NORMAL:
1064 host->Zoom(content::PAGE_ZOOM_RESET); 1064 host->Zoom(content::PAGE_ZOOM_RESET);
1065 break; 1065 break;
1066 case IDC_ZOOM_MINUS: 1066 case IDC_ZOOM_MINUS:
1067 host->Zoom(content::PAGE_ZOOM_OUT); 1067 host->Zoom(content::PAGE_ZOOM_OUT);
1068 break; 1068 break;
1069 case IDC_DEV_TOOLS: 1069 case IDC_DEV_TOOLS:
1070 DevToolsWindow::ToggleDevToolsWindow( 1070 DevToolsWindow::ToggleDevToolsWindow(
1071 tab_contents_->web_contents()->GetRenderViewHost(), 1071 tab_contents_->web_contents()->GetRenderViewHost(),
1072 DEVTOOLS_TOGGLE_ACTION_NONE); 1072 false,
1073 DEVTOOLS_TOGGLE_ACTION_SHOW);
1073 break; 1074 break;
1074 case IDC_DEV_TOOLS_CONSOLE: 1075 case IDC_DEV_TOOLS_CONSOLE:
1075 DevToolsWindow::ToggleDevToolsWindow( 1076 DevToolsWindow::ToggleDevToolsWindow(
1076 tab_contents_->web_contents()->GetRenderViewHost(), 1077 tab_contents_->web_contents()->GetRenderViewHost(),
1078 false,
1077 DEVTOOLS_TOGGLE_ACTION_SHOW_CONSOLE); 1079 DEVTOOLS_TOGGLE_ACTION_SHOW_CONSOLE);
1078 break; 1080 break;
1079 case IDC_DEV_TOOLS_INSPECT: 1081 case IDC_DEV_TOOLS_INSPECT:
1080 DevToolsWindow::ToggleDevToolsWindow( 1082 DevToolsWindow::ToggleDevToolsWindow(
1081 tab_contents_->web_contents()->GetRenderViewHost(), 1083 tab_contents_->web_contents()->GetRenderViewHost(),
1084 false,
1082 DEVTOOLS_TOGGLE_ACTION_INSPECT); 1085 DEVTOOLS_TOGGLE_ACTION_INSPECT);
1083 break; 1086 break;
1087 case IDC_DEV_TOOLS_TOGGLE:
1088 DevToolsWindow::ToggleDevToolsWindow(
1089 tab_contents_->web_contents()->GetRenderViewHost(),
1090 false,
1091 DEVTOOLS_TOGGLE_ACTION_TOGGLE);
1092 break;
1084 default: 1093 default:
1085 NOTREACHED() << "Unsupported accelerator: " << command_id; 1094 NOTREACHED() << "Unsupported accelerator: " << command_id;
1086 return false; 1095 return false;
1087 } 1096 }
1088 return true; 1097 return true;
1089 } 1098 }
1090 1099
1091 bool ExternalTabContainerWin::CanHandleAccelerators() const { 1100 bool ExternalTabContainerWin::CanHandleAccelerators() const {
1092 return true; 1101 return true;
1093 } 1102 }
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 if (params.disposition == CURRENT_TAB) { 1271 if (params.disposition == CURRENT_TAB) {
1263 DCHECK(route_all_top_level_navigations_); 1272 DCHECK(route_all_top_level_navigations_);
1264 forward_params.disposition = NEW_FOREGROUND_TAB; 1273 forward_params.disposition = NEW_FOREGROUND_TAB;
1265 } 1274 }
1266 WebContents* new_contents = 1275 WebContents* new_contents =
1267 ExternalTabContainerWin::OpenURLFromTab(source, forward_params); 1276 ExternalTabContainerWin::OpenURLFromTab(source, forward_params);
1268 // support only one navigation for a dummy tab before it is killed. 1277 // support only one navigation for a dummy tab before it is killed.
1269 ::DestroyWindow(GetNativeView()); 1278 ::DestroyWindow(GetNativeView());
1270 return new_contents; 1279 return new_contents;
1271 } 1280 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/extensions/extension_popup.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698