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

Unified Diff: chrome/browser/chromeos/system/ash_system_tray_delegate.cc

Issue 11748023: M26 new bluetooth UI. List all bluetooth devices in detailed view and automatically discover all BT… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and nit. Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/tray/tray_views.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/system/ash_system_tray_delegate.cc
diff --git a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
index eb45ab3b52e8b80e5ff0d1cff74263402808f111..64ef92c61d8c01a46d949570c467563157749761 100644
--- a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
+++ b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
@@ -175,6 +175,10 @@ void BluetoothDeviceDisconnectError() {
// TODO(sad): Do something?
}
+void BluetoothSetDiscoveringError() {
+ LOG(ERROR) << "BluetoothSetDiscovering failed.";
+}
+
void BluetoothDeviceConnectError(
device::BluetoothDevice::ConnectErrorCode error_code) {
// TODO(sad): Do something?
@@ -477,16 +481,22 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate,
bluetooth_adapter_->GetDevices();
for (size_t i = 0; i < devices.size(); ++i) {
device::BluetoothDevice* device = devices[i];
- if (!device->IsPaired())
- continue;
ash::BluetoothDeviceInfo info;
info.address = device->address();
info.display_name = device->GetName();
info.connected = device->IsConnected();
+ info.paired = device->IsPaired();
+ info.visible = device->IsVisible();
list->push_back(info);
}
}
+ virtual void BluetoothSetDiscovering(bool value) OVERRIDE {
+ bluetooth_adapter_->SetDiscovering(value,
+ base::Bind(&base::DoNothing),
+ base::Bind(&BluetoothSetDiscoveringError));
+ }
+
virtual void ToggleBluetoothConnection(const std::string& address) OVERRIDE {
device::BluetoothDevice* device = bluetooth_adapter_->GetDevice(address);
if (!device)
« no previous file with comments | « ash/system/tray/tray_views.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698