| 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/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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |