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/ime/tray_ime_chromeos.h" | 5 #include "ash/common/system/ime/tray_ime_chromeos.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "ash/common/session/session_state_delegate.h" | 9 #include "ash/common/session/session_state_delegate.h" |
10 #include "ash/common/system/tray/hover_highlight_view.h" | 10 #include "ash/common/system/tray/hover_highlight_view.h" |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 std::map<views::View*, std::string> property_map_; | 217 std::map<views::View*, std::string> property_map_; |
218 views::View* settings_; | 218 views::View* settings_; |
219 views::View* keyboard_status_; | 219 views::View* keyboard_status_; |
220 | 220 |
221 DISALLOW_COPY_AND_ASSIGN(IMEDetailedView); | 221 DISALLOW_COPY_AND_ASSIGN(IMEDetailedView); |
222 }; | 222 }; |
223 | 223 |
224 } // namespace tray | 224 } // namespace tray |
225 | 225 |
226 TrayIME::TrayIME(SystemTray* system_tray) | 226 TrayIME::TrayIME(SystemTray* system_tray) |
227 : SystemTrayItem(system_tray), | 227 : SystemTrayItem(system_tray, UMA_IME), |
228 tray_label_(NULL), | 228 tray_label_(NULL), |
229 default_(NULL), | 229 default_(NULL), |
230 detailed_(NULL), | 230 detailed_(NULL), |
231 keyboard_suppressed_(false), | 231 keyboard_suppressed_(false), |
232 is_visible_(true) { | 232 is_visible_(true) { |
233 SystemTrayNotifier* tray_notifier = WmShell::Get()->system_tray_notifier(); | 233 SystemTrayNotifier* tray_notifier = WmShell::Get()->system_tray_notifier(); |
234 tray_notifier->AddVirtualKeyboardObserver(this); | 234 tray_notifier->AddVirtualKeyboardObserver(this); |
235 tray_notifier->AddAccessibilityObserver(this); | 235 tray_notifier->AddAccessibilityObserver(this); |
236 tray_notifier->AddIMEObserver(this); | 236 tray_notifier->AddIMEObserver(this); |
237 } | 237 } |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 else | 364 else |
365 Update(); | 365 Update(); |
366 } | 366 } |
367 | 367 |
368 bool TrayIME::ShouldDefaultViewBeVisible() { | 368 bool TrayIME::ShouldDefaultViewBeVisible() { |
369 return is_visible_ && (ime_list_.size() > 1 || property_list_.size() > 1 || | 369 return is_visible_ && (ime_list_.size() > 1 || property_list_.size() > 1 || |
370 ShouldShowKeyboardToggle()); | 370 ShouldShowKeyboardToggle()); |
371 } | 371 } |
372 | 372 |
373 } // namespace ash | 373 } // namespace ash |
OLD | NEW |