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

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

Issue 10544070: Add decoration to the language button to indicate that a third party IME is in use (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit tests Created 8 years, 6 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 | « no previous file | ash/system/tray/system_tray_delegate.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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 default_(NULL), 220 default_(NULL),
221 detailed_(NULL), 221 detailed_(NULL),
222 notification_(NULL) { 222 notification_(NULL) {
223 } 223 }
224 224
225 TrayIME::~TrayIME() { 225 TrayIME::~TrayIME() {
226 } 226 }
227 227
228 void TrayIME::UpdateTrayLabel(const IMEInfo& current, size_t count) { 228 void TrayIME::UpdateTrayLabel(const IMEInfo& current, size_t count) {
229 if (tray_label_) { 229 if (tray_label_) {
230 tray_label_->label()->SetText(current.short_name); 230 if (current.third_party) {
231 // TODO(zork): Update this decoration.
232 tray_label_->label()->SetText(current.short_name + UTF8ToUTF16("(3rd)"));
233 } else {
234 tray_label_->label()->SetText(current.short_name);
235 }
231 tray_label_->SetVisible(count > 1); 236 tray_label_->SetVisible(count > 1);
232 } 237 }
233 } 238 }
234 239
235 views::View* TrayIME::CreateTrayView(user::LoginStatus status) { 240 views::View* TrayIME::CreateTrayView(user::LoginStatus status) {
236 CHECK(tray_label_ == NULL); 241 CHECK(tray_label_ == NULL);
237 tray_label_ = new TrayItemView; 242 tray_label_ = new TrayItemView;
238 tray_label_->CreateLabel(); 243 tray_label_->CreateLabel();
239 SetupLabelForTray(tray_label_->label()); 244 SetupLabelForTray(tray_label_->label());
240 tray_label_->label()->set_border( 245 tray_label_->label()->set_border(
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 if (show_message) { 311 if (show_message) {
307 if (!notification_) 312 if (!notification_)
308 ShowNotificationView(); 313 ShowNotificationView();
309 else 314 else
310 notification_->RestartAutoCloseTimer(); 315 notification_->RestartAutoCloseTimer();
311 } 316 }
312 } 317 }
313 318
314 } // namespace internal 319 } // namespace internal
315 } // namespace ash 320 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/system/tray/system_tray_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698