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

Side by Side Diff: chrome/browser/ui/views/accelerator_table.cc

Issue 1177773002: Deprecating high-conflict accelerators (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: oshima's comments Created 5 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
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/accelerator_table.h" 5 #include "chrome/browser/ui/views/accelerator_table.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "ui/base/accelerators/accelerator.h" 9 #include "ui/base/accelerators/accelerator.h"
10 #include "ui/events/event_constants.h" 10 #include "ui/events/event_constants.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 { ui::VKEY_F3, ui::EF_SHIFT_DOWN, IDC_FIND_PREVIOUS }, 138 { ui::VKEY_F3, ui::EF_SHIFT_DOWN, IDC_FIND_PREVIOUS },
139 { ui::VKEY_F4, ui::EF_CONTROL_DOWN, IDC_CLOSE_TAB }, 139 { ui::VKEY_F4, ui::EF_CONTROL_DOWN, IDC_CLOSE_TAB },
140 { ui::VKEY_F4, ui::EF_ALT_DOWN, IDC_CLOSE_WINDOW }, 140 { ui::VKEY_F4, ui::EF_ALT_DOWN, IDC_CLOSE_WINDOW },
141 { ui::VKEY_F5, ui::EF_NONE, IDC_RELOAD }, 141 { ui::VKEY_F5, ui::EF_NONE, IDC_RELOAD },
142 { ui::VKEY_F5, ui::EF_CONTROL_DOWN, IDC_RELOAD_IGNORING_CACHE }, 142 { ui::VKEY_F5, ui::EF_CONTROL_DOWN, IDC_RELOAD_IGNORING_CACHE },
143 { ui::VKEY_F5, ui::EF_SHIFT_DOWN, IDC_RELOAD_IGNORING_CACHE }, 143 { ui::VKEY_F5, ui::EF_SHIFT_DOWN, IDC_RELOAD_IGNORING_CACHE },
144 { ui::VKEY_F6, ui::EF_NONE, IDC_FOCUS_NEXT_PANE }, 144 { ui::VKEY_F6, ui::EF_NONE, IDC_FOCUS_NEXT_PANE },
145 { ui::VKEY_F6, ui::EF_SHIFT_DOWN, IDC_FOCUS_PREVIOUS_PANE }, 145 { ui::VKEY_F6, ui::EF_SHIFT_DOWN, IDC_FOCUS_PREVIOUS_PANE },
146 { ui::VKEY_F10, ui::EF_NONE, IDC_FOCUS_MENU_BAR }, 146 { ui::VKEY_F10, ui::EF_NONE, IDC_FOCUS_MENU_BAR },
147 { ui::VKEY_F11, ui::EF_NONE, IDC_FULLSCREEN }, 147 { ui::VKEY_F11, ui::EF_NONE, IDC_FULLSCREEN },
148 { ui::VKEY_ESCAPE, ui::EF_SHIFT_DOWN, IDC_TASK_MANAGER },
149 148
150 // Platform-specific key maps. 149 // Platform-specific key maps.
151 #if defined(OS_LINUX) 150 #if defined(OS_LINUX)
152 { ui::VKEY_BROWSER_BACK, ui::EF_NONE, IDC_BACK }, 151 { ui::VKEY_BROWSER_BACK, ui::EF_NONE, IDC_BACK },
153 { ui::VKEY_BROWSER_FORWARD, ui::EF_NONE, IDC_FORWARD }, 152 { ui::VKEY_BROWSER_FORWARD, ui::EF_NONE, IDC_FORWARD },
154 { ui::VKEY_BROWSER_HOME, ui::EF_NONE, IDC_HOME }, 153 { ui::VKEY_BROWSER_HOME, ui::EF_NONE, IDC_HOME },
155 { ui::VKEY_BROWSER_REFRESH, ui::EF_NONE, IDC_RELOAD }, 154 { ui::VKEY_BROWSER_REFRESH, ui::EF_NONE, IDC_RELOAD },
156 { ui::VKEY_BROWSER_REFRESH, ui::EF_CONTROL_DOWN, IDC_RELOAD_IGNORING_CACHE }, 155 { ui::VKEY_BROWSER_REFRESH, ui::EF_CONTROL_DOWN, IDC_RELOAD_IGNORING_CACHE },
157 { ui::VKEY_BROWSER_REFRESH, ui::EF_SHIFT_DOWN, IDC_RELOAD_IGNORING_CACHE }, 156 { ui::VKEY_BROWSER_REFRESH, ui::EF_SHIFT_DOWN, IDC_RELOAD_IGNORING_CACHE },
158 #endif // defined(OS_LINUX) 157 #endif // defined(OS_LINUX)
159 158
160 #if defined(OS_CHROMEOS) 159 #if defined(OS_CHROMEOS)
161 // On Chrome OS, VKEY_BROWSER_SEARCH is handled in Ash. 160 // On Chrome OS, VKEY_BROWSER_SEARCH is handled in Ash.
162 { ui::VKEY_BACK, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, 161 { ui::VKEY_BACK, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN,
163 IDC_CLEAR_BROWSING_DATA }, 162 IDC_CLEAR_BROWSING_DATA },
164 { ui::VKEY_OEM_2, ui::EF_CONTROL_DOWN, IDC_HELP_PAGE_VIA_KEYBOARD }, 163 { ui::VKEY_OEM_2, ui::EF_CONTROL_DOWN, IDC_HELP_PAGE_VIA_KEYBOARD },
165 { ui::VKEY_OEM_2, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, 164 { ui::VKEY_OEM_2, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN,
166 IDC_HELP_PAGE_VIA_KEYBOARD }, 165 IDC_HELP_PAGE_VIA_KEYBOARD },
167 { ui::VKEY_BROWSER_FAVORITES, ui::EF_NONE, IDC_SHOW_BOOKMARK_MANAGER }, 166 { ui::VKEY_BROWSER_FAVORITES, ui::EF_NONE, IDC_SHOW_BOOKMARK_MANAGER },
168 { ui::VKEY_BROWSER_STOP, ui::EF_NONE, IDC_STOP }, 167 { ui::VKEY_BROWSER_STOP, ui::EF_NONE, IDC_STOP },
169 { ui::VKEY_P, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN, 168 { ui::VKEY_P, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
170 IDC_TOUCH_HUD_PROJECTION_TOGGLE }, 169 IDC_TOUCH_HUD_PROJECTION_TOGGLE },
171 #else // OS_CHROMEOS 170 #else // OS_CHROMEOS
171 { ui::VKEY_ESCAPE, ui::EF_SHIFT_DOWN, IDC_TASK_MANAGER },
172 { ui::VKEY_DELETE, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, 172 { ui::VKEY_DELETE, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN,
173 IDC_CLEAR_BROWSING_DATA }, 173 IDC_CLEAR_BROWSING_DATA },
174 { ui::VKEY_LMENU, ui::EF_NONE, IDC_FOCUS_MENU_BAR }, 174 { ui::VKEY_LMENU, ui::EF_NONE, IDC_FOCUS_MENU_BAR },
175 { ui::VKEY_MENU, ui::EF_NONE, IDC_FOCUS_MENU_BAR }, 175 { ui::VKEY_MENU, ui::EF_NONE, IDC_FOCUS_MENU_BAR },
176 { ui::VKEY_RMENU, ui::EF_NONE, IDC_FOCUS_MENU_BAR }, 176 { ui::VKEY_RMENU, ui::EF_NONE, IDC_FOCUS_MENU_BAR },
177 // On Windows, all VKEY_BROWSER_* keys except VKEY_BROWSER_SEARCH are handled 177 // On Windows, all VKEY_BROWSER_* keys except VKEY_BROWSER_SEARCH are handled
178 // via WM_APPCOMMAND. 178 // via WM_APPCOMMAND.
179 { ui::VKEY_BROWSER_SEARCH, ui::EF_NONE, IDC_FOCUS_SEARCH }, 179 { ui::VKEY_BROWSER_SEARCH, ui::EF_NONE, IDC_FOCUS_SEARCH },
180 { ui::VKEY_M, ui::EF_SHIFT_DOWN | kPlatformModifier, IDC_SHOW_AVATAR_MENU}, 180 { ui::VKEY_M, ui::EF_SHIFT_DOWN | kPlatformModifier, IDC_SHOW_AVATAR_MENU},
181 // On ChromeOS, these keys are assigned to change UI scale. 181 // On ChromeOS, these keys are assigned to change UI scale.
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 *accelerator = ui::Accelerator(ui::VKEY_C, ui::EF_CONTROL_DOWN); 264 *accelerator = ui::Accelerator(ui::VKEY_C, ui::EF_CONTROL_DOWN);
265 return true; 265 return true;
266 case IDC_PASTE: 266 case IDC_PASTE:
267 *accelerator = ui::Accelerator(ui::VKEY_V, ui::EF_CONTROL_DOWN); 267 *accelerator = ui::Accelerator(ui::VKEY_V, ui::EF_CONTROL_DOWN);
268 return true; 268 return true;
269 } 269 }
270 return false; 270 return false;
271 } 271 }
272 272
273 } // namespace chrome 273 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/chrome_shell_delegate.cc ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698