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/events/event_constants.h" | 10 #include "ui/events/event_constants.h" |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 const ChromeCmdId2AshActionId kChromeCmdId2AshActionId[] = { | 198 const ChromeCmdId2AshActionId kChromeCmdId2AshActionId[] = { |
199 #if defined(GOOGLE_CHROME_BUILD) | 199 #if defined(GOOGLE_CHROME_BUILD) |
200 { IDC_FEEDBACK, ash::OPEN_FEEDBACK_PAGE }, | 200 { IDC_FEEDBACK, ash::OPEN_FEEDBACK_PAGE }, |
201 #endif | 201 #endif |
202 { IDC_EXIT, ash::EXIT }, | 202 { IDC_EXIT, ash::EXIT }, |
203 { IDC_NEW_INCOGNITO_WINDOW, ash::NEW_INCOGNITO_WINDOW }, | 203 { IDC_NEW_INCOGNITO_WINDOW, ash::NEW_INCOGNITO_WINDOW }, |
204 { IDC_NEW_TAB, ash::NEW_TAB }, | 204 { IDC_NEW_TAB, ash::NEW_TAB }, |
205 { IDC_NEW_WINDOW, ash::NEW_WINDOW }, | 205 { IDC_NEW_WINDOW, ash::NEW_WINDOW }, |
206 { IDC_RESTORE_TAB, ash::RESTORE_TAB }, | 206 { IDC_RESTORE_TAB, ash::RESTORE_TAB }, |
207 { IDC_TASK_MANAGER, ash::SHOW_TASK_MANAGER }, | 207 { IDC_TASK_MANAGER, ash::SHOW_TASK_MANAGER }, |
| 208 #if defined(OS_CHROMEOS) |
208 { IDC_TOUCH_HUD_PROJECTION_TOGGLE, ash::TOUCH_HUD_PROJECTION_TOGGLE }, | 209 { IDC_TOUCH_HUD_PROJECTION_TOGGLE, ash::TOUCH_HUD_PROJECTION_TOGGLE }, |
| 210 #endif |
209 }; | 211 }; |
210 const size_t kChromeCmdId2AshActionIdLength = | 212 const size_t kChromeCmdId2AshActionIdLength = |
211 arraysize(kChromeCmdId2AshActionId); | 213 arraysize(kChromeCmdId2AshActionId); |
212 #endif // defined(USE_ASH) | 214 #endif // defined(USE_ASH) |
213 | 215 |
214 } // namespace | 216 } // namespace |
215 | 217 |
216 std::vector<AcceleratorMapping> GetAcceleratorList() { | 218 std::vector<AcceleratorMapping> GetAcceleratorList() { |
217 return std::vector<AcceleratorMapping>( | 219 return std::vector<AcceleratorMapping>( |
218 kAcceleratorMap, kAcceleratorMap + kAcceleratorMapLength); | 220 kAcceleratorMap, kAcceleratorMap + kAcceleratorMapLength); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 *accelerator = ui::Accelerator(ui::VKEY_C, ui::EF_CONTROL_DOWN); | 254 *accelerator = ui::Accelerator(ui::VKEY_C, ui::EF_CONTROL_DOWN); |
253 return true; | 255 return true; |
254 case IDC_PASTE: | 256 case IDC_PASTE: |
255 *accelerator = ui::Accelerator(ui::VKEY_V, ui::EF_CONTROL_DOWN); | 257 *accelerator = ui::Accelerator(ui::VKEY_V, ui::EF_CONTROL_DOWN); |
256 return true; | 258 return true; |
257 } | 259 } |
258 return false; | 260 return false; |
259 } | 261 } |
260 | 262 |
261 } // namespace chrome | 263 } // namespace chrome |
OLD | NEW |