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 "chrome/browser/chromeos/system/ash_system_tray_delegate.h" | 5 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart(); | 520 DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart(); |
521 } | 521 } |
522 | 522 |
523 virtual void GetAvailableBluetoothDevices( | 523 virtual void GetAvailableBluetoothDevices( |
524 ash::BluetoothDeviceList* list) OVERRIDE { | 524 ash::BluetoothDeviceList* list) OVERRIDE { |
525 device::BluetoothAdapter::DeviceList devices = | 525 device::BluetoothAdapter::DeviceList devices = |
526 bluetooth_adapter_->GetDevices(); | 526 bluetooth_adapter_->GetDevices(); |
527 for (size_t i = 0; i < devices.size(); ++i) { | 527 for (size_t i = 0; i < devices.size(); ++i) { |
528 device::BluetoothDevice* device = devices[i]; | 528 device::BluetoothDevice* device = devices[i]; |
529 ash::BluetoothDeviceInfo info; | 529 ash::BluetoothDeviceInfo info; |
530 info.address = device->address(); | 530 info.address = device->GetAddress(); |
531 info.display_name = device->GetName(); | 531 info.display_name = device->GetName(); |
532 info.connected = device->IsConnected(); | 532 info.connected = device->IsConnected(); |
533 info.paired = device->IsPaired(); | 533 info.paired = device->IsPaired(); |
534 info.visible = device->IsVisible(); | |
535 list->push_back(info); | 534 list->push_back(info); |
536 } | 535 } |
537 } | 536 } |
538 | 537 |
539 virtual void BluetoothStartDiscovering() OVERRIDE { | 538 virtual void BluetoothStartDiscovering() OVERRIDE { |
540 bluetooth_adapter_->StartDiscovering( | 539 bluetooth_adapter_->StartDiscovering( |
541 base::Bind(&base::DoNothing), | 540 base::Bind(&base::DoNothing), |
542 base::Bind(&BluetoothSetDiscoveringError)); | 541 base::Bind(&BluetoothSetDiscoveringError)); |
543 } | 542 } |
544 | 543 |
(...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1525 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1524 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
1526 }; | 1525 }; |
1527 | 1526 |
1528 } // namespace | 1527 } // namespace |
1529 | 1528 |
1530 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1529 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
1531 return new chromeos::SystemTrayDelegate(); | 1530 return new chromeos::SystemTrayDelegate(); |
1532 } | 1531 } |
1533 | 1532 |
1534 } // namespace chromeos | 1533 } // namespace chromeos |
OLD | NEW |