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/common/system/chromeos/tray_caps_lock.h" | 5 #include "ash/common/system/chromeos/tray_caps_lock.h" |
6 | 6 |
7 #include "ash/common/material_design/material_design_controller.h" | 7 #include "ash/common/material_design/material_design_controller.h" |
8 #include "ash/common/system/tray/actionable_view.h" | 8 #include "ash/common/system/tray/actionable_view.h" |
9 #include "ash/common/system/tray/fixed_sized_image_view.h" | 9 #include "ash/common/system/tray/fixed_sized_image_view.h" |
10 #include "ash/common/system/tray/system_tray_delegate.h" | 10 #include "ash/common/system/tray/system_tray_delegate.h" |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 return true; | 127 return true; |
128 } | 128 } |
129 | 129 |
130 views::Label* text_label_; | 130 views::Label* text_label_; |
131 views::Label* shortcut_label_; | 131 views::Label* shortcut_label_; |
132 | 132 |
133 DISALLOW_COPY_AND_ASSIGN(CapsLockDefaultView); | 133 DISALLOW_COPY_AND_ASSIGN(CapsLockDefaultView); |
134 }; | 134 }; |
135 | 135 |
136 TrayCapsLock::TrayCapsLock(SystemTray* system_tray) | 136 TrayCapsLock::TrayCapsLock(SystemTray* system_tray) |
137 : TrayImageItem(system_tray, IDR_AURA_UBER_TRAY_CAPS_LOCK), | 137 : TrayImageItem(system_tray, IDR_AURA_UBER_TRAY_CAPS_LOCK, UMA_CAPS_LOCK), |
138 default_(NULL), | 138 default_(NULL), |
139 detailed_(NULL), | 139 detailed_(NULL), |
140 caps_lock_enabled_(CapsLockIsEnabled()), | 140 caps_lock_enabled_(CapsLockIsEnabled()), |
141 message_shown_(false) { | 141 message_shown_(false) { |
142 chromeos::input_method::InputMethodManager* ime = | 142 chromeos::input_method::InputMethodManager* ime = |
143 chromeos::input_method::InputMethodManager::Get(); | 143 chromeos::input_method::InputMethodManager::Get(); |
144 if (ime && ime->GetImeKeyboard()) | 144 if (ime && ime->GetImeKeyboard()) |
145 ime->GetImeKeyboard()->AddObserver(this); | 145 ime->GetImeKeyboard()->AddObserver(this); |
146 } | 146 } |
147 | 147 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 | 222 |
223 void TrayCapsLock::DestroyDefaultView() { | 223 void TrayCapsLock::DestroyDefaultView() { |
224 default_ = NULL; | 224 default_ = NULL; |
225 } | 225 } |
226 | 226 |
227 void TrayCapsLock::DestroyDetailedView() { | 227 void TrayCapsLock::DestroyDetailedView() { |
228 detailed_ = NULL; | 228 detailed_ = NULL; |
229 } | 229 } |
230 | 230 |
231 } // namespace ash | 231 } // namespace ash |
OLD | NEW |