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

Side by Side Diff: ash/system/ime/tray_ime.cc

Issue 10200006: ash: Refresh the tray items, instead of recreating them, when login status changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « ash/system/ime/tray_ime.h ('k') | ash/system/network/tray_network.h » ('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/system/ime/tray_ime.h" 5 #include "ash/system/ime/tray_ime.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/system/tray/system_tray.h" 10 #include "ash/system/tray/system_tray.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 } 222 }
223 223
224 void TrayIME::DestroyDefaultView() { 224 void TrayIME::DestroyDefaultView() {
225 default_.reset(); 225 default_.reset();
226 } 226 }
227 227
228 void TrayIME::DestroyDetailedView() { 228 void TrayIME::DestroyDetailedView() {
229 detailed_.reset(); 229 detailed_.reset();
230 } 230 }
231 231
232 void TrayIME::UpdateAfterLoginStatusChange(user::LoginStatus status) {
233 }
234
232 void TrayIME::OnIMERefresh() { 235 void TrayIME::OnIMERefresh() {
233 SystemTrayDelegate* delegate = Shell::GetInstance()->tray_delegate(); 236 SystemTrayDelegate* delegate = Shell::GetInstance()->tray_delegate();
234 IMEInfoList list; 237 IMEInfoList list;
235 IMEInfo current; 238 IMEInfo current;
236 IMEPropertyInfoList property_list; 239 IMEPropertyInfoList property_list;
237 delegate->GetCurrentIME(&current); 240 delegate->GetCurrentIME(&current);
238 delegate->GetAvailableIMEList(&list); 241 delegate->GetAvailableIMEList(&list);
239 delegate->GetCurrentIMEProperties(&property_list); 242 delegate->GetCurrentIMEProperties(&property_list);
240 243
241 UpdateTrayLabel(current, list.size()); 244 UpdateTrayLabel(current, list.size());
242 245
243 if (default_.get()) 246 if (default_.get())
244 default_->UpdateLabel(current); 247 default_->UpdateLabel(current);
245 if (detailed_.get()) 248 if (detailed_.get())
246 detailed_->Update(list, property_list); 249 detailed_->Update(list, property_list);
247 } 250 }
248 251
249 } // namespace internal 252 } // namespace internal
250 } // namespace ash 253 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/ime/tray_ime.h ('k') | ash/system/network/tray_network.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698