| 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/material_design/material_design_controller.h" | 7 #include "ash/common/material_design/material_design_controller.h" |
| 8 #include "ash/common/session/session_state_delegate.h" | 8 #include "ash/common/session/session_state_delegate.h" |
| 9 #include "ash/common/system/tray/fixed_sized_scroll_view.h" | 9 #include "ash/common/system/tray/fixed_sized_scroll_view.h" |
| 10 #include "ash/common/system/tray/hover_highlight_view.h" | 10 #include "ash/common/system/tray/hover_highlight_view.h" |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 } | 324 } |
| 325 | 325 |
| 326 AppendSameTypeDevicesToScrollList(connected_devices_, true, true, | 326 AppendSameTypeDevicesToScrollList(connected_devices_, true, true, |
| 327 bluetooth_enabled); | 327 bluetooth_enabled); |
| 328 AppendSameTypeDevicesToScrollList(connecting_devices_, true, false, | 328 AppendSameTypeDevicesToScrollList(connecting_devices_, true, false, |
| 329 bluetooth_enabled); | 329 bluetooth_enabled); |
| 330 AppendSameTypeDevicesToScrollList(paired_not_connected_devices_, false, | 330 AppendSameTypeDevicesToScrollList(paired_not_connected_devices_, false, |
| 331 false, bluetooth_enabled); | 331 false, bluetooth_enabled); |
| 332 if (discovered_not_paired_devices_.size() > 0) { | 332 if (discovered_not_paired_devices_.size() > 0) { |
| 333 if (UseMd()) { | 333 if (UseMd()) { |
| 334 scroll_content()->AddChildView( | 334 if (scroll_content()->has_children()) { |
| 335 TrayPopupUtils::CreateListItemSeparator(false)); | 335 scroll_content()->AddChildView( |
| 336 TrayPopupUtils::CreateListItemSeparator(false)); |
| 337 } |
| 336 } else { | 338 } else { |
| 337 AddScrollSeparator(); | 339 AddScrollSeparator(); |
| 338 } | 340 } |
| 339 } | 341 } |
| 340 AppendSameTypeDevicesToScrollList(discovered_not_paired_devices_, false, | 342 AppendSameTypeDevicesToScrollList(discovered_not_paired_devices_, false, |
| 341 false, bluetooth_enabled); | 343 false, bluetooth_enabled); |
| 342 | 344 |
| 343 // Show user Bluetooth state if there is no bluetooth devices in list. | 345 // Show user Bluetooth state if there is no bluetooth devices in list. |
| 344 if (device_map_.size() == 0) { | 346 if (device_map_.size() == 0) { |
| 345 if (bluetooth_available && bluetooth_enabled) { | 347 if (bluetooth_available && bluetooth_enabled) { |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 detailed_->Update(); | 763 detailed_->Update(); |
| 762 } | 764 } |
| 763 | 765 |
| 764 void TrayBluetooth::OnBluetoothDiscoveringChanged() { | 766 void TrayBluetooth::OnBluetoothDiscoveringChanged() { |
| 765 if (!detailed_) | 767 if (!detailed_) |
| 766 return; | 768 return; |
| 767 detailed_->Update(); | 769 detailed_->Update(); |
| 768 } | 770 } |
| 769 | 771 |
| 770 } // namespace ash | 772 } // namespace ash |
| OLD | NEW |