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

Unified Diff: ash/system/tray_caps_lock.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/system/tray/system_tray_delegate.h ('k') | ash/test/test_shell_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray_caps_lock.cc
diff --git a/ash/system/tray_caps_lock.cc b/ash/system/tray_caps_lock.cc
index 5209a66218e8098d48bf25c04e2db75cb60562e4..c1d3cef305809b5e75a152cc517f9a24ccebdf30 100644
--- a/ash/system/tray_caps_lock.cc
+++ b/ash/system/tray_caps_lock.cc
@@ -4,8 +4,8 @@
#include "ash/system/tray_caps_lock.h"
+#include "ash/caps_lock_delegate.h"
#include "ash/shell.h"
-#include "ash/system/tray/system_tray_delegate.h"
#include "ash/system/tray/tray_constants.h"
#include "ash/system/tray/tray_views.h"
#include "grit/ash_strings.h"
@@ -92,8 +92,7 @@ class CapsLockDefaultView : public ActionableView {
// Overridden from ActionableView:
virtual bool PerformAction(const ui::Event& event) OVERRIDE {
- Shell::GetInstance()->tray_delegate()->SetCapsLockEnabled(
- !Shell::GetInstance()->tray_delegate()->IsCapsLockOn());
+ Shell::GetInstance()->caps_lock_delegate()->ToggleCapsLock();
return true;
}
@@ -109,14 +108,14 @@ TrayCapsLock::TrayCapsLock()
detailed_(NULL),
search_mapped_to_caps_lock_(false),
caps_lock_enabled_(
- Shell::GetInstance()->tray_delegate()->IsCapsLockOn()),
+ Shell::GetInstance()->caps_lock_delegate()->IsCapsLockEnabled()),
message_shown_(false) {
}
TrayCapsLock::~TrayCapsLock() {}
bool TrayCapsLock::GetInitialVisibility() {
- return Shell::GetInstance()->tray_delegate()->IsCapsLockOn();
+ return Shell::GetInstance()->caps_lock_delegate()->IsCapsLockEnabled();
}
views::View* TrayCapsLock::CreateDefaultView(user::LoginStatus status) {
« no previous file with comments | « ash/system/tray/system_tray_delegate.h ('k') | ash/test/test_shell_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698