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/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/base/events/event_constants.h" | 10 #include "ui/base/events/event_constants.h" |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 #if defined(USE_ASH) | 157 #if defined(USE_ASH) |
158 // Below we map Chrome command ids to Ash action ids for commands that have | 158 // Below we map Chrome command ids to Ash action ids for commands that have |
159 // an shortcut that is handled by Ash (instead of Chrome). Adding entries | 159 // an shortcut that is handled by Ash (instead of Chrome). Adding entries |
160 // here will show shortcut text on menus. See comment above. | 160 // here will show shortcut text on menus. See comment above. |
161 struct ChromeCmdId2AshActionId { | 161 struct ChromeCmdId2AshActionId { |
162 const int chrome_cmd_id; | 162 const int chrome_cmd_id; |
163 const ash::AcceleratorAction ash_action_id; | 163 const ash::AcceleratorAction ash_action_id; |
164 }; | 164 }; |
165 const ChromeCmdId2AshActionId kChromeCmdId2AshActionId[] = { | 165 const ChromeCmdId2AshActionId kChromeCmdId2AshActionId[] = { |
166 { IDC_FEEDBACK, ash::OPEN_FEEDBACK_PAGE }, | 166 { IDC_FEEDBACK, ash::OPEN_FEEDBACK_PAGE }, |
167 { IDC_EXIT, ash::EXIT }, | 167 { IDC_EXIT, ash::EXIT_PRESSED }, |
168 { IDC_NEW_INCOGNITO_WINDOW, ash::NEW_INCOGNITO_WINDOW }, | 168 { IDC_NEW_INCOGNITO_WINDOW, ash::NEW_INCOGNITO_WINDOW }, |
169 { IDC_NEW_TAB, ash::NEW_TAB }, | 169 { IDC_NEW_TAB, ash::NEW_TAB }, |
170 { IDC_NEW_WINDOW, ash::NEW_WINDOW }, | 170 { IDC_NEW_WINDOW, ash::NEW_WINDOW }, |
171 #if defined(OS_CHROMEOS) | 171 #if defined(OS_CHROMEOS) |
172 { IDC_OPEN_FILE, ash::OPEN_FILE_DIALOG }, | 172 { IDC_OPEN_FILE, ash::OPEN_FILE_DIALOG }, |
173 #endif | 173 #endif |
174 { IDC_RESTORE_TAB, ash::RESTORE_TAB }, | 174 { IDC_RESTORE_TAB, ash::RESTORE_TAB }, |
175 { IDC_TASK_MANAGER, ash::SHOW_TASK_MANAGER }, | 175 { IDC_TASK_MANAGER, ash::SHOW_TASK_MANAGER }, |
176 }; | 176 }; |
177 const size_t kChromeCmdId2AshActionIdLength = | 177 const size_t kChromeCmdId2AshActionIdLength = |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 *accelerator = ui::Accelerator(ui::VKEY_C, ui::EF_CONTROL_DOWN); | 219 *accelerator = ui::Accelerator(ui::VKEY_C, ui::EF_CONTROL_DOWN); |
220 return true; | 220 return true; |
221 case IDC_PASTE: | 221 case IDC_PASTE: |
222 *accelerator = ui::Accelerator(ui::VKEY_V, ui::EF_CONTROL_DOWN); | 222 *accelerator = ui::Accelerator(ui::VKEY_V, ui::EF_CONTROL_DOWN); |
223 return true; | 223 return true; |
224 } | 224 } |
225 return false; | 225 return false; |
226 } | 226 } |
227 | 227 |
228 } // namespace chrome | 228 } // namespace chrome |
OLD | NEW |