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/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 Loading... |
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 Loading... |
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 |
OLD | NEW |