| 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/ash_switches.h" | 8 #include "ash/ash_switches.h" |
| 9 #include "ash/caps_lock_delegate.h" | 9 #include "ash/caps_lock_delegate.h" |
| 10 #include "ash/desktop_background/desktop_background_controller.h" | 10 #include "ash/desktop_background/desktop_background_controller.h" |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 } | 217 } |
| 218 | 218 |
| 219 void AcceleratorController::UnregisterAll(ui::AcceleratorTarget* target) { | 219 void AcceleratorController::UnregisterAll(ui::AcceleratorTarget* target) { |
| 220 accelerator_manager_->UnregisterAll(target); | 220 accelerator_manager_->UnregisterAll(target); |
| 221 } | 221 } |
| 222 | 222 |
| 223 bool AcceleratorController::Process(const ui::Accelerator& accelerator) { | 223 bool AcceleratorController::Process(const ui::Accelerator& accelerator) { |
| 224 return accelerator_manager_->Process(accelerator); | 224 return accelerator_manager_->Process(accelerator); |
| 225 } | 225 } |
| 226 | 226 |
| 227 bool AcceleratorController::IsRegistered( |
| 228 const ui::Accelerator& accelerator) const { |
| 229 return accelerator_manager_->GetCurrentTarget(accelerator) != NULL; |
| 230 } |
| 231 |
| 227 void AcceleratorController::SetBrightnessControlDelegate( | 232 void AcceleratorController::SetBrightnessControlDelegate( |
| 228 scoped_ptr<BrightnessControlDelegate> brightness_control_delegate) { | 233 scoped_ptr<BrightnessControlDelegate> brightness_control_delegate) { |
| 229 brightness_control_delegate_.swap(brightness_control_delegate); | 234 brightness_control_delegate_.swap(brightness_control_delegate); |
| 230 } | 235 } |
| 231 | 236 |
| 232 void AcceleratorController::SetCapsLockDelegate( | 237 void AcceleratorController::SetCapsLockDelegate( |
| 233 scoped_ptr<CapsLockDelegate> caps_lock_delegate) { | 238 scoped_ptr<CapsLockDelegate> caps_lock_delegate) { |
| 234 caps_lock_delegate_.swap(caps_lock_delegate); | 239 caps_lock_delegate_.swap(caps_lock_delegate); |
| 235 } | 240 } |
| 236 | 241 |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 // Then set this one as active. | 503 // Then set this one as active. |
| 499 Shell::GetInstance()->launcher()->ActivateLauncherItem(found_index); | 504 Shell::GetInstance()->launcher()->ActivateLauncherItem(found_index); |
| 500 } | 505 } |
| 501 } | 506 } |
| 502 | 507 |
| 503 bool AcceleratorController::CanHandleAccelerators() const { | 508 bool AcceleratorController::CanHandleAccelerators() const { |
| 504 return true; | 509 return true; |
| 505 } | 510 } |
| 506 | 511 |
| 507 } // namespace ash | 512 } // namespace ash |
| OLD | NEW |