OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |