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 19 matching lines...) Expand all Loading... |
30 | 30 |
31 namespace tray { | 31 namespace tray { |
32 | 32 |
33 class IMEDefaultView : public TrayItemMore { | 33 class IMEDefaultView : public TrayItemMore { |
34 public: | 34 public: |
35 explicit IMEDefaultView(SystemTrayItem* owner) | 35 explicit IMEDefaultView(SystemTrayItem* owner) |
36 : TrayItemMore(owner) { | 36 : TrayItemMore(owner) { |
37 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); | 37 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); |
38 | 38 |
39 SetImage(bundle.GetImageNamed( | 39 SetImage(bundle.GetImageNamed( |
40 IDR_AURA_UBER_TRAY_IME).ToSkBitmap()); | 40 IDR_AURA_UBER_TRAY_IME).ToImageSkia()); |
41 | 41 |
42 IMEInfo info; | 42 IMEInfo info; |
43 Shell::GetInstance()->tray_delegate()->GetCurrentIME(&info); | 43 Shell::GetInstance()->tray_delegate()->GetCurrentIME(&info); |
44 UpdateLabel(info); | 44 UpdateLabel(info); |
45 } | 45 } |
46 | 46 |
47 virtual ~IMEDefaultView() {} | 47 virtual ~IMEDefaultView() {} |
48 | 48 |
49 void UpdateLabel(const IMEInfo& info) { | 49 void UpdateLabel(const IMEInfo& info) { |
50 SetLabel(info.name); | 50 SetLabel(info.name); |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 UpdateTrayLabel(current, list.size()); | 241 UpdateTrayLabel(current, list.size()); |
242 | 242 |
243 if (default_) | 243 if (default_) |
244 default_->UpdateLabel(current); | 244 default_->UpdateLabel(current); |
245 if (detailed_) | 245 if (detailed_) |
246 detailed_->Update(list, property_list); | 246 detailed_->Update(list, property_list); |
247 } | 247 } |
248 | 248 |
249 } // namespace internal | 249 } // namespace internal |
250 } // namespace ash | 250 } // namespace ash |
OLD | NEW |