| 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 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 namespace tray { | 30 namespace tray { |
| 31 | 31 |
| 32 class IMEDefaultView : public TrayItemMore { | 32 class IMEDefaultView : public TrayItemMore { |
| 33 public: | 33 public: |
| 34 explicit IMEDefaultView(SystemTrayItem* owner) | 34 explicit IMEDefaultView(SystemTrayItem* owner) |
| 35 : TrayItemMore(owner) { | 35 : TrayItemMore(owner) { |
| 36 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); | 36 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); |
| 37 | 37 |
| 38 SetImage(bundle.GetImageNamed( | 38 SetImage(bundle.GetImageNamed( |
| 39 IDR_AURA_UBER_TRAY_IME).ToSkBitmap()); | 39 IDR_AURA_UBER_TRAY_IME).ToImageSkia()); |
| 40 | 40 |
| 41 IMEInfo info; | 41 IMEInfo info; |
| 42 Shell::GetInstance()->tray_delegate()->GetCurrentIME(&info); | 42 Shell::GetInstance()->tray_delegate()->GetCurrentIME(&info); |
| 43 UpdateLabel(info); | 43 UpdateLabel(info); |
| 44 } | 44 } |
| 45 | 45 |
| 46 virtual ~IMEDefaultView() {} | 46 virtual ~IMEDefaultView() {} |
| 47 | 47 |
| 48 void UpdateLabel(const IMEInfo& info) { | 48 void UpdateLabel(const IMEInfo& info) { |
| 49 SetLabel(info.name); | 49 SetLabel(info.name); |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 UpdateTrayLabel(current, list.size()); | 254 UpdateTrayLabel(current, list.size()); |
| 255 | 255 |
| 256 if (default_) | 256 if (default_) |
| 257 default_->UpdateLabel(current); | 257 default_->UpdateLabel(current); |
| 258 if (detailed_) | 258 if (detailed_) |
| 259 detailed_->Update(list, property_list); | 259 detailed_->Update(list, property_list); |
| 260 } | 260 } |
| 261 | 261 |
| 262 } // namespace internal | 262 } // namespace internal |
| 263 } // namespace ash | 263 } // namespace ash |
| OLD | NEW |