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

Side by Side Diff: chrome/browser/ui/browser_command_controller.cc

Issue 2778523002: Revert change http://crrev.com/3c7af99a93f4b4837b2fbee5cb66697f66ccf241/ (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/ui/browser_command_controller_unittest.cc » ('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) 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_command_controller.h" 5 #include "chrome/browser/ui/browser_command_controller.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 // reserve browser back/forward and refresh here. 180 // reserve browser back/forward and refresh here.
181 ui::KeyboardCode key_code = 181 ui::KeyboardCode key_code =
182 static_cast<ui::KeyboardCode>(event.windowsKeyCode); 182 static_cast<ui::KeyboardCode>(event.windowsKeyCode);
183 if ((key_code == ui::VKEY_BROWSER_BACK && command_id == IDC_BACK) || 183 if ((key_code == ui::VKEY_BROWSER_BACK && command_id == IDC_BACK) ||
184 (key_code == ui::VKEY_BROWSER_FORWARD && command_id == IDC_FORWARD) || 184 (key_code == ui::VKEY_BROWSER_FORWARD && command_id == IDC_FORWARD) ||
185 (key_code == ui::VKEY_BROWSER_REFRESH && command_id == IDC_RELOAD)) { 185 (key_code == ui::VKEY_BROWSER_REFRESH && command_id == IDC_RELOAD)) {
186 return true; 186 return true;
187 } 187 }
188 #endif 188 #endif
189 189
190 if (window()->IsFullscreen()) { 190 if (window()->IsFullscreen() && command_id == IDC_FULLSCREEN) {
msw 2017/03/25 01:07:26 optional nit: curlies not needed
Hzj_jie 2017/03/25 02:19:19 Different culture :)
191 // In fullscreen, all commands except for IDC_FULLSCREEN and IDC_EXIT should 191 return true;
192 // be delivered to the web page. See, intent to implement,
193 // https://goo.gl/4tJ32G.
194 return command_id == IDC_EXIT || command_id == IDC_FULLSCREEN;
195 } 192 }
196 193
197 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 194 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
198 // If this key was registered by the user as a content editing hotkey, then 195 // If this key was registered by the user as a content editing hotkey, then
199 // it is not reserved. 196 // it is not reserved.
200 ui::TextEditKeyBindingsDelegateAuraLinux* delegate = 197 ui::TextEditKeyBindingsDelegateAuraLinux* delegate =
201 ui::GetTextEditKeyBindingsDelegate(); 198 ui::GetTextEditKeyBindingsDelegate();
202 if (delegate && event.os_event && delegate->MatchEvent(*event.os_event, NULL)) 199 if (delegate && event.os_event && delegate->MatchEvent(*event.os_event, NULL))
203 return false; 200 return false;
204 #endif 201 #endif
(...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after
1148 1145
1149 BrowserWindow* BrowserCommandController::window() { 1146 BrowserWindow* BrowserCommandController::window() {
1150 return browser_->window(); 1147 return browser_->window();
1151 } 1148 }
1152 1149
1153 Profile* BrowserCommandController::profile() { 1150 Profile* BrowserCommandController::profile() {
1154 return browser_->profile(); 1151 return browser_->profile();
1155 } 1152 }
1156 1153
1157 } // namespace chrome 1154 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/browser_command_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698