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/fixed_sized_scroll_view.h" | 8 #include "ash/system/tray/fixed_sized_scroll_view.h" |
9 #include "ash/system/tray/hover_highlight_view.h" | 9 #include "ash/system/tray/hover_highlight_view.h" |
10 #include "ash/system/tray/system_tray.h" | 10 #include "ash/system/tray/system_tray.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 paired_not_connected_devices_.clear(); | 131 paired_not_connected_devices_.clear(); |
132 discovered_not_paired_devices_.clear(); | 132 discovered_not_paired_devices_.clear(); |
133 BluetoothDeviceList list; | 133 BluetoothDeviceList list; |
134 Shell::GetInstance()->system_tray_delegate()-> | 134 Shell::GetInstance()->system_tray_delegate()-> |
135 GetAvailableBluetoothDevices(&list); | 135 GetAvailableBluetoothDevices(&list); |
136 for (size_t i = 0; i < list.size(); ++i) { | 136 for (size_t i = 0; i < list.size(); ++i) { |
137 if (list[i].connected) | 137 if (list[i].connected) |
138 connected_devices_.push_back(list[i]); | 138 connected_devices_.push_back(list[i]); |
139 else if (list[i].paired) | 139 else if (list[i].paired) |
140 paired_not_connected_devices_.push_back(list[i]); | 140 paired_not_connected_devices_.push_back(list[i]); |
141 else if (list[i].visible) | 141 else |
142 discovered_not_paired_devices_.push_back(list[i]); | 142 discovered_not_paired_devices_.push_back(list[i]); |
143 } | 143 } |
144 } | 144 } |
145 | 145 |
146 void AppendHeaderEntry() { | 146 void AppendHeaderEntry() { |
147 CreateSpecialRow(IDS_ASH_STATUS_TRAY_BLUETOOTH, this); | 147 CreateSpecialRow(IDS_ASH_STATUS_TRAY_BLUETOOTH, this); |
148 | 148 |
149 if (login_ == user::LOGGED_IN_LOCKED) | 149 if (login_ == user::LOGGED_IN_LOCKED) |
150 return; | 150 return; |
151 | 151 |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 } | 401 } |
402 | 402 |
403 void TrayBluetooth::OnBluetoothDiscoveringChanged() { | 403 void TrayBluetooth::OnBluetoothDiscoveringChanged() { |
404 if (!detailed_) | 404 if (!detailed_) |
405 return; | 405 return; |
406 detailed_->Update(); | 406 detailed_->Update(); |
407 } | 407 } |
408 | 408 |
409 } // namespace internal | 409 } // namespace internal |
410 } // namespace ash | 410 } // namespace ash |
OLD | NEW |