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

Side by Side Diff: ash/common/system/chromeos/bluetooth/tray_bluetooth.cc

Issue 2622143002: MD system tray: Avoid adding separator as the first item of Bluetooth device list. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | no next file » | 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/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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698