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

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

Issue 10899037: Refactoring bluetooth API code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing styles and tess. Created 8 years, 3 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
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 0f089e25c96cd16ca8722e8900ec9945164ec3e5..9aa5a6575c056b1fc9d2eade6953086c19ae3d1e 100644
--- a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
+++ b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
@@ -32,7 +32,9 @@
#include "chrome/browser/chromeos/accessibility/accessibility_util.h"
#include "chrome/browser/chromeos/audio/audio_handler.h"
#include "chrome/browser/chromeos/bluetooth/bluetooth_adapter.h"
+#include "chrome/browser/chromeos/bluetooth/bluetooth_adapter_dbus.h"
#include "chrome/browser/chromeos/bluetooth/bluetooth_device.h"
+#include "chrome/browser/chromeos/bluetooth/bluetooth_device_dbus.h"
#include "chrome/browser/chromeos/cros/cros_library.h"
#include "chrome/browser/chromeos/cros/network_library.h"
#include "chrome/browser/chromeos/gdata/drive_service_interface.h"
@@ -218,7 +220,7 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate,
network_icon_->SetResourceColorTheme(NetworkMenuIcon::COLOR_LIGHT);
network_icon_dark_->SetResourceColorTheme(NetworkMenuIcon::COLOR_DARK);
- bluetooth_adapter_ = BluetoothAdapter::DefaultAdapter();
+ bluetooth_adapter_ = BluetoothAdapterDBus::DefaultAdapter();
bluetooth_adapter_->AddObserver(this);
}
@@ -379,7 +381,9 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate,
}
virtual void ToggleBluetoothConnection(const std::string& address) OVERRIDE {
- BluetoothDevice* device = bluetooth_adapter_->GetDevice(address);
+ BluetoothDeviceDBus* device =
+ static_cast<BluetoothDeviceDBus *>(
+ bluetooth_adapter_->GetDevice(address));
bryeung 2012/09/13 19:52:57 why can't this be a call on the interface?
youngki 2012/09/17 21:53:02 Done.
if (!device)
return;
if (device->IsConnected()) {

Powered by Google App Engine
This is Rietveld 408576698