Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2339)

Unified Diff: ash/accelerators/accelerator_controller.cc

Issue 10878058: Move functions for controlling Caps Lock to CapsLockDelegate from SystemTrayDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/accelerators/accelerator_controller.h ('k') | ash/accelerators/accelerator_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_controller.cc
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index a33b0e4af22fd7fc88bc1e16519670b499ea203b..3c3c5c65f45e6be41c48bd7fc20d474911e29961 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -492,14 +492,12 @@ bool AcceleratorController::PerformAction(int action,
ash::Shell::GetInstance()->ToggleAppList();
return true;
case DISABLE_CAPS_LOCK:
- // TODO(mazda): Handle this using |caps_lock_delegate_|.
- if (shell->tray_delegate()->IsCapsLockOn())
- shell->tray_delegate()->SetCapsLockEnabled(false);
+ if (shell->caps_lock_delegate()->IsCapsLockEnabled())
+ shell->caps_lock_delegate()->SetCapsLockEnabled(false);
return true;
case TOGGLE_CAPS_LOCK:
- if (caps_lock_delegate_.get())
- return caps_lock_delegate_->HandleToggleCapsLock();
- break;
+ shell->caps_lock_delegate()->ToggleCapsLock();
+ return true;
case BRIGHTNESS_DOWN:
if (brightness_control_delegate_.get())
return brightness_control_delegate_->HandleBrightnessDown(accelerator);
@@ -703,11 +701,6 @@ void AcceleratorController::SetBrightnessControlDelegate(
brightness_control_delegate_.swap(brightness_control_delegate);
}
-void AcceleratorController::SetCapsLockDelegate(
- scoped_ptr<CapsLockDelegate> caps_lock_delegate) {
- caps_lock_delegate_.swap(caps_lock_delegate);
-}
-
void AcceleratorController::SetImeControlDelegate(
scoped_ptr<ImeControlDelegate> ime_control_delegate) {
ime_control_delegate_.swap(ime_control_delegate);
« no previous file with comments | « ash/accelerators/accelerator_controller.h ('k') | ash/accelerators/accelerator_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698