| 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/common/system/chromeos/bluetooth/tray_bluetooth.h" | 5 #include "ash/common/system/chromeos/bluetooth/tray_bluetooth.h" |
| 6 | 6 |
| 7 #include "ash/common/session/session_state_delegate.h" | 7 #include "ash/common/session/session_state_delegate.h" |
| 8 #include "ash/common/system/tray/hover_highlight_view.h" | 8 #include "ash/common/system/tray/hover_highlight_view.h" |
| 9 #include "ash/common/system/tray/system_tray.h" | 9 #include "ash/common/system/tray/system_tray.h" |
| 10 #include "ash/common/system/tray/system_tray_delegate.h" | 10 #include "ash/common/system/tray/system_tray_delegate.h" |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 RemoveObsoleteBluetoothDevicesFromList(&paired_not_connected_devices_, | 259 RemoveObsoleteBluetoothDevicesFromList(&paired_not_connected_devices_, |
| 260 new_paired_not_connected_devices); | 260 new_paired_not_connected_devices); |
| 261 RemoveObsoleteBluetoothDevicesFromList(&discovered_not_paired_devices_, | 261 RemoveObsoleteBluetoothDevicesFromList(&discovered_not_paired_devices_, |
| 262 new_discovered_not_paired_devices); | 262 new_discovered_not_paired_devices); |
| 263 } | 263 } |
| 264 | 264 |
| 265 void UpdateHeaderEntry() { | 265 void UpdateHeaderEntry() { |
| 266 bool is_bluetooth_enabled = | 266 bool is_bluetooth_enabled = |
| 267 WmShell::Get()->system_tray_delegate()->GetBluetoothEnabled(); | 267 WmShell::Get()->system_tray_delegate()->GetBluetoothEnabled(); |
| 268 if (toggle_) | 268 if (toggle_) |
| 269 toggle_->SetIsOn(is_bluetooth_enabled, false); | 269 toggle_->SetIsOn(is_bluetooth_enabled, true); |
| 270 } | 270 } |
| 271 | 271 |
| 272 void UpdateDeviceScrollList() { | 272 void UpdateDeviceScrollList() { |
| 273 device_map_.clear(); | 273 device_map_.clear(); |
| 274 scroll_content()->RemoveAllChildViews(true); | 274 scroll_content()->RemoveAllChildViews(true); |
| 275 | 275 |
| 276 SystemTrayDelegate* delegate = WmShell::Get()->system_tray_delegate(); | 276 SystemTrayDelegate* delegate = WmShell::Get()->system_tray_delegate(); |
| 277 bool bluetooth_enabled = delegate->GetBluetoothEnabled(); | 277 bool bluetooth_enabled = delegate->GetBluetoothEnabled(); |
| 278 bool bluetooth_available = delegate->GetBluetoothAvailable(); | 278 bool bluetooth_available = delegate->GetBluetoothAvailable(); |
| 279 | 279 |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 detailed_->Update(); | 623 detailed_->Update(); |
| 624 } | 624 } |
| 625 | 625 |
| 626 void TrayBluetooth::OnBluetoothDiscoveringChanged() { | 626 void TrayBluetooth::OnBluetoothDiscoveringChanged() { |
| 627 if (!detailed_) | 627 if (!detailed_) |
| 628 return; | 628 return; |
| 629 detailed_->Update(); | 629 detailed_->Update(); |
| 630 } | 630 } |
| 631 | 631 |
| 632 } // namespace ash | 632 } // namespace ash |
| OLD | NEW |