| 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 "ash/accelerators/focus_manager_factory.h" | 5 #include "ash/accelerators/focus_manager_factory.h" |
| 6 | 6 |
| 7 #include "ash/accelerators/accelerator_controller.h" | 7 #include "ash/accelerators/accelerator_controller.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ui/views/focus/focus_manager.h" | 9 #include "ui/views/focus/focus_manager.h" |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 ui::AcceleratorTarget* | 31 ui::AcceleratorTarget* |
| 32 AshFocusManagerFactory::Delegate::GetCurrentTargetForAccelerator( | 32 AshFocusManagerFactory::Delegate::GetCurrentTargetForAccelerator( |
| 33 const ui::Accelerator& accelerator) const { | 33 const ui::Accelerator& accelerator) const { |
| 34 AcceleratorController* controller = | 34 AcceleratorController* controller = |
| 35 Shell::GetInstance()->accelerator_controller(); | 35 Shell::GetInstance()->accelerator_controller(); |
| 36 if (controller && controller->IsRegistered(accelerator)) | 36 if (controller && controller->IsRegistered(accelerator)) |
| 37 return controller; | 37 return controller; |
| 38 return NULL; | 38 return NULL; |
| 39 } | 39 } |
| 40 | 40 |
| 41 bool AshFocusManagerFactory::Delegate::IsAcceleratorDeprecated( |
| 42 const ui::Accelerator& accelerator) const { |
| 43 AcceleratorController* controller = |
| 44 Shell::GetInstance()->accelerator_controller(); |
| 45 return controller && controller->IsDeprecated(accelerator); |
| 46 } |
| 47 |
| 41 } // namespace ash | 48 } // namespace ash |
| OLD | NEW |