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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
235 void AcceleratorController::Unregister(const ui::Accelerator& accelerator, | 235 void AcceleratorController::Unregister(const ui::Accelerator& accelerator, |
236 ui::AcceleratorTarget* target) { | 236 ui::AcceleratorTarget* target) { |
237 accelerator_manager_->Unregister(accelerator, target); | 237 accelerator_manager_->Unregister(accelerator, target); |
238 } | 238 } |
239 | 239 |
240 void AcceleratorController::UnregisterAll(ui::AcceleratorTarget* target) { | 240 void AcceleratorController::UnregisterAll(ui::AcceleratorTarget* target) { |
241 accelerator_manager_->UnregisterAll(target); | 241 accelerator_manager_->UnregisterAll(target); |
242 } | 242 } |
243 | 243 |
244 bool AcceleratorController::Process(const ui::Accelerator& accelerator) { | 244 bool AcceleratorController::Process(const ui::Accelerator& accelerator) { |
245 if (ime_control_delegate_.get()) { | |
246 return accelerator_manager_->Process( | |
247 ime_control_delegate_->RemapAccelerator(accelerator)); | |
Daniel Erat
2012/05/30 15:58:27
nit: indent this four spaces beyond the previous l
Mr4D (OOO till 08-26)
2012/05/30 16:21:31
Moment. We have *always* 4 spaces - ignoring *any*
Daniel Erat
2012/05/30 16:54:06
I'm not aware of anything in google3 that says to
Mr4D (OOO till 08-26)
2012/05/30 17:37:17
Even though it doesn't change anything, here is an
Daniel Erat
2012/05/30 17:51:05
For the sake of argument ( :-) ), that example doe
Mr4D (OOO till 08-26)
2012/05/30 18:09:46
:) In the past there was a rule to indent first br
| |
248 } | |
245 return accelerator_manager_->Process(accelerator); | 249 return accelerator_manager_->Process(accelerator); |
246 } | 250 } |
247 | 251 |
248 bool AcceleratorController::IsRegistered( | 252 bool AcceleratorController::IsRegistered( |
249 const ui::Accelerator& accelerator) const { | 253 const ui::Accelerator& accelerator) const { |
250 return accelerator_manager_->GetCurrentTarget(accelerator) != NULL; | 254 return accelerator_manager_->GetCurrentTarget(accelerator) != NULL; |
251 } | 255 } |
252 | 256 |
253 void AcceleratorController::SetBrightnessControlDelegate( | 257 void AcceleratorController::SetBrightnessControlDelegate( |
254 scoped_ptr<BrightnessControlDelegate> brightness_control_delegate) { | 258 scoped_ptr<BrightnessControlDelegate> brightness_control_delegate) { |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
534 // Then set this one as active. | 538 // Then set this one as active. |
535 Shell::GetInstance()->launcher()->ActivateLauncherItem(found_index); | 539 Shell::GetInstance()->launcher()->ActivateLauncherItem(found_index); |
536 } | 540 } |
537 } | 541 } |
538 | 542 |
539 bool AcceleratorController::CanHandleAccelerators() const { | 543 bool AcceleratorController::CanHandleAccelerators() const { |
540 return true; | 544 return true; |
541 } | 545 } |
542 | 546 |
543 } // namespace ash | 547 } // namespace ash |
OLD | NEW |