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

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

Issue 9753019: ash: Add a bluetooth entry in the uber tray. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 | Annotate | Revision Log
« no previous file with comments | « ash/system/bluetooth/tray_bluetooth.cc ('k') | ash/system/network/tray_network.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/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_delegate.h" 10 #include "ash/system/tray/system_tray_delegate.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/utf_string_conversions.h" 12 #include "base/utf_string_conversions.h"
13 #include "ui/gfx/font.h" 13 #include "ui/gfx/font.h"
14 #include "ui/views/controls/label.h" 14 #include "ui/views/controls/label.h"
15 15
16 namespace ash { 16 namespace ash {
17 namespace internal { 17 namespace internal {
18 18
19 TrayIME::TrayIME() { 19 TrayIME::TrayIME() {
20 } 20 }
21 21
22 TrayIME::~TrayIME() { 22 TrayIME::~TrayIME() {
23 } 23 }
24 24
25 void TrayIME::UpdateTrayLabel() { 25 void TrayIME::UpdateTrayLabel() {
26 IMEInfoList list = ash::Shell::GetInstance()->tray_delegate()-> 26 IMEInfoList list;
27 GetAvailableIMEList(); 27 ash::Shell::GetInstance()->tray_delegate()->GetAvailableIMEList(&list);
28 for (size_t i = 0; i < list.size(); i++) { 28 for (size_t i = 0; i < list.size(); i++) {
29 if (list[i].selected) { 29 if (list[i].selected) {
30 tray_label_->SetText(list[i].short_name); 30 tray_label_->SetText(list[i].short_name);
31 break; 31 break;
32 } 32 }
33 } 33 }
34 tray_label_->SetVisible(list.size() > 1); 34 tray_label_->SetVisible(list.size() > 1);
35 } 35 }
36 36
37 views::View* TrayIME::CreateTrayView(user::LoginStatus status) { 37 views::View* TrayIME::CreateTrayView(user::LoginStatus status) {
(...skipping 22 matching lines...) Expand all
60 60
61 void TrayIME::DestroyDetailedView() { 61 void TrayIME::DestroyDetailedView() {
62 } 62 }
63 63
64 void TrayIME::OnIMERefresh() { 64 void TrayIME::OnIMERefresh() {
65 UpdateTrayLabel(); 65 UpdateTrayLabel();
66 } 66 }
67 67
68 } // namespace internal 68 } // namespace internal
69 } // namespace ash 69 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/bluetooth/tray_bluetooth.cc ('k') | ash/system/network/tray_network.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698