Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Side by Side Diff: ash/common/system/ime/tray_ime_chromeos.cc

Issue 2154523002: Move AccessibilityDelegate ownership to ash::WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@setmediadelegate
Patch Set: fix mash_unittests Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/common/keyboard/keyboard_ui.cc ('k') | ash/common/system/ime/tray_ime_chromeos_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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(&current); 292 WmShell::Get()->system_tray_delegate()->GetCurrentIME(&current);
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
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
OLDNEW
« no previous file with comments | « ash/common/keyboard/keyboard_ui.cc ('k') | ash/common/system/ime/tray_ime_chromeos_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698