| 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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 } else { | 276 } else { |
| 277 tray_label_->label()->SetText(current.short_name); | 277 tray_label_->label()->SetText(current.short_name); |
| 278 } | 278 } |
| 279 SetTrayLabelItemBorder(tray_label_, system_tray()->shelf_alignment()); | 279 SetTrayLabelItemBorder(tray_label_, system_tray()->shelf_alignment()); |
| 280 tray_label_->Layout(); | 280 tray_label_->Layout(); |
| 281 } | 281 } |
| 282 } | 282 } |
| 283 | 283 |
| 284 bool TrayIME::ShouldShowKeyboardToggle() { | 284 bool TrayIME::ShouldShowKeyboardToggle() { |
| 285 return keyboard_suppressed_ && | 285 return keyboard_suppressed_ && |
| 286 !WmShell::Get() | 286 !WmShell::Get()->accessibility_delegate()->IsVirtualKeyboardEnabled(); |
| 287 ->GetAccessibilityDelegate() | |
| 288 ->IsVirtualKeyboardEnabled(); | |
| 289 } | 287 } |
| 290 | 288 |
| 291 base::string16 TrayIME::GetDefaultViewLabel(bool show_ime_label) { | 289 base::string16 TrayIME::GetDefaultViewLabel(bool show_ime_label) { |
| 292 if (show_ime_label) { | 290 if (show_ime_label) { |
| 293 IMEInfo current; | 291 IMEInfo current; |
| 294 WmShell::Get()->system_tray_delegate()->GetCurrentIME(¤t); | 292 WmShell::Get()->system_tray_delegate()->GetCurrentIME(¤t); |
| 295 return current.name; | 293 return current.name; |
| 296 } else { | 294 } else { |
| 297 // Display virtual keyboard status instead. | 295 // Display virtual keyboard status instead. |
| 298 int id = keyboard::IsKeyboardEnabled() | 296 int id = keyboard::IsKeyboardEnabled() |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 else | 364 else |
| 367 Update(); | 365 Update(); |
| 368 } | 366 } |
| 369 | 367 |
| 370 bool TrayIME::ShouldDefaultViewBeVisible() { | 368 bool TrayIME::ShouldDefaultViewBeVisible() { |
| 371 return is_visible_ && (ime_list_.size() > 1 || property_list_.size() > 1 || | 369 return is_visible_ && (ime_list_.size() > 1 || property_list_.size() > 1 || |
| 372 ShouldShowKeyboardToggle()); | 370 ShouldShowKeyboardToggle()); |
| 373 } | 371 } |
| 374 | 372 |
| 375 } // namespace ash | 373 } // namespace ash |
| OLD | NEW |