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

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: Rebased 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
« no previous file with comments | « ash/system/audio/tray_volume.cc ('k') | ash/system/brightness/tray_brightness.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/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 15 matching lines...) Expand all
26 namespace ash { 26 namespace ash {
27 namespace internal { 27 namespace internal {
28 28
29 namespace tray { 29 namespace tray {
30 30
31 class BluetoothDefaultView : public TrayItemMore { 31 class BluetoothDefaultView : public TrayItemMore {
32 public: 32 public:
33 explicit BluetoothDefaultView(SystemTrayItem* owner) 33 explicit BluetoothDefaultView(SystemTrayItem* owner)
34 : TrayItemMore(owner) { 34 : TrayItemMore(owner) {
35 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); 35 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
36 SetImage(bundle.GetImageNamed(IDR_AURA_UBER_TRAY_BLUETOOTH).ToSkBitmap()); 36 SetImage(bundle.GetImageNamed(IDR_AURA_UBER_TRAY_BLUETOOTH).ToImageSkia());
37 UpdateLabel(); 37 UpdateLabel();
38 } 38 }
39 39
40 virtual ~BluetoothDefaultView() {} 40 virtual ~BluetoothDefaultView() {}
41 41
42 void UpdateLabel() { 42 void UpdateLabel() {
43 ash::SystemTrayDelegate* delegate = 43 ash::SystemTrayDelegate* delegate =
44 ash::Shell::GetInstance()->tray_delegate(); 44 ash::Shell::GetInstance()->tray_delegate();
45 if (delegate->GetBluetoothAvailable()) { 45 if (delegate->GetBluetoothAvailable()) {
46 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 46 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 BluetoothDeviceList list; 223 BluetoothDeviceList list;
224 Shell::GetInstance()->tray_delegate()->GetAvailableBluetoothDevices(&list); 224 Shell::GetInstance()->tray_delegate()->GetAvailableBluetoothDevices(&list);
225 if (default_) 225 if (default_)
226 default_->UpdateLabel(); 226 default_->UpdateLabel();
227 else if (detailed_) 227 else if (detailed_)
228 detailed_->Update(list); 228 detailed_->Update(list);
229 } 229 }
230 230
231 } // namespace internal 231 } // namespace internal
232 } // namespace ash 232 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/audio/tray_volume.cc ('k') | ash/system/brightness/tray_brightness.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698