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

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

Issue 2775973002: Promotes more accessors from WmShell to Shell (Closed)
Patch Set: feedback Created 3 years, 9 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
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/material_design/material_design_controller.h" 9 #include "ash/common/material_design/material_design_controller.h"
10 #include "ash/common/session/session_state_delegate.h" 10 #include "ash/common/session/session_state_delegate.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 213
214 } // namespace tray 214 } // namespace tray
215 215
216 TrayIME::TrayIME(SystemTray* system_tray) 216 TrayIME::TrayIME(SystemTray* system_tray)
217 : SystemTrayItem(system_tray, UMA_IME), 217 : SystemTrayItem(system_tray, UMA_IME),
218 tray_label_(NULL), 218 tray_label_(NULL),
219 default_(NULL), 219 default_(NULL),
220 detailed_(NULL), 220 detailed_(NULL),
221 keyboard_suppressed_(false), 221 keyboard_suppressed_(false),
222 is_visible_(true) { 222 is_visible_(true) {
223 SystemTrayNotifier* tray_notifier = WmShell::Get()->system_tray_notifier(); 223 SystemTrayNotifier* tray_notifier = Shell::Get()->system_tray_notifier();
224 tray_notifier->AddVirtualKeyboardObserver(this); 224 tray_notifier->AddVirtualKeyboardObserver(this);
225 tray_notifier->AddAccessibilityObserver(this); 225 tray_notifier->AddAccessibilityObserver(this);
226 tray_notifier->AddIMEObserver(this); 226 tray_notifier->AddIMEObserver(this);
227 } 227 }
228 228
229 TrayIME::~TrayIME() { 229 TrayIME::~TrayIME() {
230 SystemTrayNotifier* tray_notifier = WmShell::Get()->system_tray_notifier(); 230 SystemTrayNotifier* tray_notifier = Shell::Get()->system_tray_notifier();
231 tray_notifier->RemoveIMEObserver(this); 231 tray_notifier->RemoveIMEObserver(this);
232 tray_notifier->RemoveAccessibilityObserver(this); 232 tray_notifier->RemoveAccessibilityObserver(this);
233 tray_notifier->RemoveVirtualKeyboardObserver(this); 233 tray_notifier->RemoveVirtualKeyboardObserver(this);
234 } 234 }
235 235
236 void TrayIME::OnKeyboardSuppressionChanged(bool suppressed) { 236 void TrayIME::OnKeyboardSuppressionChanged(bool suppressed) {
237 keyboard_suppressed_ = suppressed; 237 keyboard_suppressed_ = suppressed;
238 Update(); 238 Update();
239 } 239 }
240 240
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 return ime_count >= threshold; 370 return ime_count >= threshold;
371 } 371 }
372 372
373 ImeListView::SingleImeBehavior TrayIME::GetSingleImeBehavior() { 373 ImeListView::SingleImeBehavior TrayIME::GetSingleImeBehavior() {
374 // If managed, we also want to show a single IME. 374 // If managed, we also want to show a single IME.
375 return IsIMEManaged() ? ImeListView::SHOW_SINGLE_IME 375 return IsIMEManaged() ? ImeListView::SHOW_SINGLE_IME
376 : ImeListView::HIDE_SINGLE_IME; 376 : ImeListView::HIDE_SINGLE_IME;
377 } 377 }
378 378
379 } // namespace ash 379 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/date/tray_system_info.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