| 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/accelerator_controller.h" | 5 #include "ash/accelerators/accelerator_controller.h" |
| 6 | 6 |
| 7 #include "ash/accelerators/accelerator_table.h" | 7 #include "ash/accelerators/accelerator_table.h" |
| 8 #include "ash/desktop_background/desktop_background_controller.h" | 8 #include "ash/desktop_background/desktop_background_controller.h" |
| 9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
| 10 #include "ash/caps_lock_delegate.h" | 10 #include "ash/caps_lock_delegate.h" |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 } | 274 } |
| 275 | 275 |
| 276 void AcceleratorController::UnregisterAll(ui::AcceleratorTarget* target) { | 276 void AcceleratorController::UnregisterAll(ui::AcceleratorTarget* target) { |
| 277 accelerator_manager_->UnregisterAll(target); | 277 accelerator_manager_->UnregisterAll(target); |
| 278 } | 278 } |
| 279 | 279 |
| 280 bool AcceleratorController::Process(const ui::Accelerator& accelerator) { | 280 bool AcceleratorController::Process(const ui::Accelerator& accelerator) { |
| 281 return accelerator_manager_->Process(accelerator); | 281 return accelerator_manager_->Process(accelerator); |
| 282 } | 282 } |
| 283 | 283 |
| 284 bool AcceleratorController::IsAccelerator(const ui::Accelerator& accelerator) { |
| 285 return accelerator_manager_->GetCurrentTarget(accelerator) != NULL; |
| 286 } |
| 287 |
| 284 void AcceleratorController::SetBrightnessControlDelegate( | 288 void AcceleratorController::SetBrightnessControlDelegate( |
| 285 scoped_ptr<BrightnessControlDelegate> brightness_control_delegate) { | 289 scoped_ptr<BrightnessControlDelegate> brightness_control_delegate) { |
| 286 brightness_control_delegate_.swap(brightness_control_delegate); | 290 brightness_control_delegate_.swap(brightness_control_delegate); |
| 287 } | 291 } |
| 288 | 292 |
| 289 void AcceleratorController::SetCapsLockDelegate( | 293 void AcceleratorController::SetCapsLockDelegate( |
| 290 scoped_ptr<CapsLockDelegate> caps_lock_delegate) { | 294 scoped_ptr<CapsLockDelegate> caps_lock_delegate) { |
| 291 caps_lock_delegate_.swap(caps_lock_delegate); | 295 caps_lock_delegate_.swap(caps_lock_delegate); |
| 292 } | 296 } |
| 293 | 297 |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 // Then set this one as active. | 548 // Then set this one as active. |
| 545 ActivateLauncherItem(found_index); | 549 ActivateLauncherItem(found_index); |
| 546 } | 550 } |
| 547 } | 551 } |
| 548 | 552 |
| 549 bool AcceleratorController::CanHandleAccelerators() const { | 553 bool AcceleratorController::CanHandleAccelerators() const { |
| 550 return true; | 554 return true; |
| 551 } | 555 } |
| 552 | 556 |
| 553 } // namespace ash | 557 } // namespace ash |
| OLD | NEW |