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

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

Issue 2778523002: Revert change http://crrev.com/3c7af99a93f4b4837b2fbee5cb66697f66ccf241/ (Closed)
Patch Set: Resolve review comments 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)
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 }
196 192
197 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 193 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
198 // If this key was registered by the user as a content editing hotkey, then 194 // If this key was registered by the user as a content editing hotkey, then
199 // it is not reserved. 195 // it is not reserved.
200 ui::TextEditKeyBindingsDelegateAuraLinux* delegate = 196 ui::TextEditKeyBindingsDelegateAuraLinux* delegate =
201 ui::GetTextEditKeyBindingsDelegate(); 197 ui::GetTextEditKeyBindingsDelegate();
202 if (delegate && event.os_event && delegate->MatchEvent(*event.os_event, NULL)) 198 if (delegate && event.os_event && delegate->MatchEvent(*event.os_event, NULL))
203 return false; 199 return false;
204 #endif 200 #endif
205 201
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after
1148 1144
1149 BrowserWindow* BrowserCommandController::window() { 1145 BrowserWindow* BrowserCommandController::window() {
1150 return browser_->window(); 1146 return browser_->window();
1151 } 1147 }
1152 1148
1153 Profile* BrowserCommandController::profile() { 1149 Profile* BrowserCommandController::profile() {
1154 return browser_->profile(); 1150 return browser_->profile();
1155 } 1151 }
1156 1152
1157 } // namespace chrome 1153 } // 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