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

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

Issue 10382144: Change SetImage, SetBackground, and SetToggledImage to take in a gfx::ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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
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 18 matching lines...) Expand all
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698