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

Side by Side Diff: ash/system/bluetooth/tray_bluetooth.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/bluetooth/tray_bluetooth.h" 5 #include "ash/system/bluetooth/tray_bluetooth.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/system/tray/system_tray.h" 8 #include "ash/system/tray/system_tray.h"
9 #include "ash/system/tray/system_tray_delegate.h" 9 #include "ash/system/tray/system_tray_delegate.h"
10 #include "ash/system/tray/tray_constants.h" 10 #include "ash/system/tray/tray_constants.h"
(...skipping 14 matching lines...) Expand all
25 namespace ash { 25 namespace ash {
26 namespace internal { 26 namespace internal {
27 27
28 namespace tray { 28 namespace tray {
29 29
30 class BluetoothDefaultView : public TrayItemMore { 30 class BluetoothDefaultView : public TrayItemMore {
31 public: 31 public:
32 explicit BluetoothDefaultView(SystemTrayItem* owner) 32 explicit BluetoothDefaultView(SystemTrayItem* owner)
33 : TrayItemMore(owner) { 33 : TrayItemMore(owner) {
34 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); 34 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
35 SetImage(bundle.GetImageNamed(IDR_AURA_UBER_TRAY_BLUETOOTH).ToSkBitmap()); 35 SetImage(bundle.GetImageNamed(IDR_AURA_UBER_TRAY_BLUETOOTH).ToImageSkia());
36 UpdateLabel(); 36 UpdateLabel();
37 } 37 }
38 38
39 virtual ~BluetoothDefaultView() {} 39 virtual ~BluetoothDefaultView() {}
40 40
41 void UpdateLabel() { 41 void UpdateLabel() {
42 ash::SystemTrayDelegate* delegate = 42 ash::SystemTrayDelegate* delegate =
43 ash::Shell::GetInstance()->tray_delegate(); 43 ash::Shell::GetInstance()->tray_delegate();
44 if (delegate->GetBluetoothAvailable()) { 44 if (delegate->GetBluetoothAvailable()) {
45 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 45 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 BluetoothDeviceList list; 243 BluetoothDeviceList list;
244 Shell::GetInstance()->tray_delegate()->GetAvailableBluetoothDevices(&list); 244 Shell::GetInstance()->tray_delegate()->GetAvailableBluetoothDevices(&list);
245 if (default_) 245 if (default_)
246 default_->UpdateLabel(); 246 default_->UpdateLabel();
247 else if (detailed_) 247 else if (detailed_)
248 detailed_->Update(list); 248 detailed_->Update(list);
249 } 249 }
250 250
251 } // namespace internal 251 } // namespace internal
252 } // namespace ash 252 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698