| 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/ime/tray_ime_chromeos.h" | 5 #include "ash/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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 Shell::GetInstance()->system_tray_notifier()->RemoveVirtualKeyboardObserver( | 251 Shell::GetInstance()->system_tray_notifier()->RemoveVirtualKeyboardObserver( |
| 252 this); | 252 this); |
| 253 } | 253 } |
| 254 | 254 |
| 255 void TrayIME::OnKeyboardSuppressionChanged(bool suppressed) { | 255 void TrayIME::OnKeyboardSuppressionChanged(bool suppressed) { |
| 256 keyboard_suppressed_ = suppressed; | 256 keyboard_suppressed_ = suppressed; |
| 257 Update(); | 257 Update(); |
| 258 } | 258 } |
| 259 | 259 |
| 260 void TrayIME::OnAccessibilityModeChanged( | 260 void TrayIME::OnAccessibilityModeChanged( |
| 261 ui::AccessibilityNotificationVisibility notify) { | 261 AccessibilityNotificationVisibility notify) { |
| 262 Update(); | 262 Update(); |
| 263 } | 263 } |
| 264 | 264 |
| 265 void TrayIME::Update() { | 265 void TrayIME::Update() { |
| 266 UpdateTrayLabel(current_ime_, ime_list_.size()); | 266 UpdateTrayLabel(current_ime_, ime_list_.size()); |
| 267 if (default_) { | 267 if (default_) { |
| 268 default_->SetVisible(ShouldDefaultViewBeVisible()); | 268 default_->SetVisible(ShouldDefaultViewBeVisible()); |
| 269 default_->UpdateLabel(GetDefaultViewLabel(ime_list_.size() > 1)); | 269 default_->UpdateLabel(GetDefaultViewLabel(ime_list_.size() > 1)); |
| 270 } | 270 } |
| 271 if (detailed_) | 271 if (detailed_) |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 else | 375 else |
| 376 Update(); | 376 Update(); |
| 377 } | 377 } |
| 378 | 378 |
| 379 bool TrayIME::ShouldDefaultViewBeVisible() { | 379 bool TrayIME::ShouldDefaultViewBeVisible() { |
| 380 return is_visible_ && (ime_list_.size() > 1 || property_list_.size() > 1 || | 380 return is_visible_ && (ime_list_.size() > 1 || property_list_.size() > 1 || |
| 381 ShouldShowKeyboardToggle()); | 381 ShouldShowKeyboardToggle()); |
| 382 } | 382 } |
| 383 | 383 |
| 384 } // namespace ash | 384 } // namespace ash |
| OLD | NEW |