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/system/chromeos/tray_caps_lock.h" | 5 #include "ash/system/chromeos/tray_caps_lock.h" |
6 | 6 |
7 #include "ash/common/system/tray/actionable_view.h" | 7 #include "ash/common/system/tray/actionable_view.h" |
8 #include "ash/common/system/tray/fixed_sized_image_view.h" | 8 #include "ash/common/system/tray/fixed_sized_image_view.h" |
9 #include "ash/common/system/tray/system_tray_delegate.h" | 9 #include "ash/common/system/tray/system_tray_delegate.h" |
10 #include "ash/common/system/tray/tray_constants.h" | 10 #include "ash/common/system/tray/tray_constants.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 return true; | 119 return true; |
120 } | 120 } |
121 | 121 |
122 views::Label* text_label_; | 122 views::Label* text_label_; |
123 views::Label* shortcut_label_; | 123 views::Label* shortcut_label_; |
124 | 124 |
125 DISALLOW_COPY_AND_ASSIGN(CapsLockDefaultView); | 125 DISALLOW_COPY_AND_ASSIGN(CapsLockDefaultView); |
126 }; | 126 }; |
127 | 127 |
128 TrayCapsLock::TrayCapsLock(SystemTray* system_tray) | 128 TrayCapsLock::TrayCapsLock(SystemTray* system_tray) |
129 : TrayImageItem(system_tray, IDR_AURA_UBER_TRAY_CAPS_LOCK), | 129 : TrayImageItem(system_tray, IDR_AURA_UBER_TRAY_CAPS_LOCK, UMA_CAPS_LOCK), |
130 default_(NULL), | 130 default_(NULL), |
131 detailed_(NULL), | 131 detailed_(NULL), |
132 caps_lock_enabled_(CapsLockIsEnabled()), | 132 caps_lock_enabled_(CapsLockIsEnabled()), |
133 message_shown_(false) { | 133 message_shown_(false) { |
134 chromeos::input_method::InputMethodManager* ime = | 134 chromeos::input_method::InputMethodManager* ime = |
135 chromeos::input_method::InputMethodManager::Get(); | 135 chromeos::input_method::InputMethodManager::Get(); |
136 if (ime && ime->GetImeKeyboard()) | 136 if (ime && ime->GetImeKeyboard()) |
137 ime->GetImeKeyboard()->AddObserver(this); | 137 ime->GetImeKeyboard()->AddObserver(this); |
138 } | 138 } |
139 | 139 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 | 209 |
210 void TrayCapsLock::DestroyDefaultView() { | 210 void TrayCapsLock::DestroyDefaultView() { |
211 default_ = NULL; | 211 default_ = NULL; |
212 } | 212 } |
213 | 213 |
214 void TrayCapsLock::DestroyDetailedView() { | 214 void TrayCapsLock::DestroyDetailedView() { |
215 detailed_ = NULL; | 215 detailed_ = NULL; |
216 } | 216 } |
217 | 217 |
218 } // namespace ash | 218 } // namespace ash |
OLD | NEW |