Index: chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.h |
diff --git a/chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.h b/chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.h |
index f27d4c4537ce0863107e8f01e32056b81cf920d1..6984777e71e44c19a4cd8239248297d7b13cf573 100644 |
--- a/chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.h |
+++ b/chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.h |
@@ -10,8 +10,8 @@ |
#include "base/callback.h" |
#include "base/compiler_specific.h" |
#include "base/memory/scoped_ptr.h" |
-#include "chrome/browser/chromeos/bluetooth/bluetooth_adapter.h" |
-#include "chrome/browser/chromeos/bluetooth/bluetooth_device.h" |
+#include "chrome/browser/chromeos/bluetooth/bluetooth_adapter_dbus.h" |
bryeung
2012/09/07 18:35:57
should be using the interface
youngki
2012/09/13 18:05:02
Done.
|
+#include "chrome/browser/chromeos/bluetooth/bluetooth_device_dbus.h" |
#include "chrome/browser/ui/webui/options/options_ui.h" |
namespace base { |
@@ -22,9 +22,10 @@ namespace chromeos { |
namespace options { |
// Handler for Bluetooth options on the system options page. |
-class BluetoothOptionsHandler : public ::options::OptionsPageUIHandler, |
- public chromeos::BluetoothAdapter::Observer, |
- public BluetoothDevice::PairingDelegate { |
+class BluetoothOptionsHandler |
+ : public ::options::OptionsPageUIHandler, |
+ public chromeos::BluetoothAdapterDBus::Observer, |
+ public BluetoothDeviceDBus::PairingDelegate { |
public: |
BluetoothOptionsHandler(); |
virtual ~BluetoothOptionsHandler(); |
@@ -39,10 +40,10 @@ class BluetoothOptionsHandler : public ::options::OptionsPageUIHandler, |
// Sends a notification to the Web UI of the status of a Bluetooth device. |
// |device| is the Bluetooth device. |
// |params| is an optional set of parameters. |
- void SendDeviceNotification(const BluetoothDevice* device, |
+ void SendDeviceNotification(const BluetoothDeviceInterface* device, |
base::DictionaryValue* params); |
- // BluetoothDevice::PairingDelegate override. |
+ // BluetoothDeviceDBus::PairingDelegate override. |
// |
// This method will be called when the Bluetooth daemon requires a |
// PIN Code for authentication of the device |device|, the UI will display |
@@ -50,9 +51,9 @@ class BluetoothOptionsHandler : public ::options::OptionsPageUIHandler, |
// |
// PIN Codes are generally required for Bluetooth 2.0 and earlier devices |
// for which there is no automatic pairing or special handling. |
- virtual void RequestPinCode(BluetoothDevice* device) OVERRIDE; |
+ virtual void RequestPinCode(BluetoothDeviceDBus* device) OVERRIDE; |
- // BluetoothDevice::PairingDelegate override. |
+ // BluetoothDeviceDBus::PairingDelegate override. |
// |
// This method will be called when the Bluetooth daemon requires a |
// Passkey for authentication of the device |device|, the UI will display |
@@ -62,9 +63,9 @@ class BluetoothOptionsHandler : public ::options::OptionsPageUIHandler, |
// Passkeys are generally required for Bluetooth 2.1 and later devices |
// which cannot provide input or display on their own, and don't accept |
// passkey-less pairing. |
- virtual void RequestPasskey(BluetoothDevice* device) OVERRIDE; |
+ virtual void RequestPasskey(BluetoothDeviceDBus* device) OVERRIDE; |
- // BluetoothDevice::PairingDelegate override. |
+ // BluetoothDeviceDBus::PairingDelegate override. |
// |
// This method will be called when the Bluetooth daemon requires that the |
// user enter the PIN code |pincode| into the device |device| so that it |
@@ -74,10 +75,10 @@ class BluetoothOptionsHandler : public ::options::OptionsPageUIHandler, |
// This is used for Bluetooth 2.0 and earlier keyboard devices, the |
// |pincode| will always be a six-digit numeric in the range 000000-999999 |
// for compatibilty with later specifications. |
- virtual void DisplayPinCode(BluetoothDevice* device, |
+ virtual void DisplayPinCode(BluetoothDeviceDBus* device, |
const std::string& pincode) OVERRIDE; |
- // BluetoothDevice::PairingDelegate override. |
+ // BluetoothDeviceDBus::PairingDelegate override. |
// |
// This method will be called when the Bluetooth daemon requires that the |
// user enter the Passkey |passkey| into the device |device| so that it |
@@ -88,10 +89,10 @@ class BluetoothOptionsHandler : public ::options::OptionsPageUIHandler, |
// but not display, such as keyboards. The Passkey is a numeric in the |
// range 0-999999 and should be always presented zero-padded to six |
// digits. |
- virtual void DisplayPasskey(BluetoothDevice* device, |
+ virtual void DisplayPasskey(BluetoothDeviceDBus* device, |
uint32 passkey) OVERRIDE; |
- // BluetoothDevice::PairingDelegate override. |
+ // BluetoothDeviceDBus::PairingDelegate override. |
// |
// This method will be called when the Bluetooth daemon requires that the |
// user confirm that the Passkey |passkey| is displayed on the screen |
@@ -102,10 +103,10 @@ class BluetoothOptionsHandler : public ::options::OptionsPageUIHandler, |
// such as other computers or phones. The Passkey is a numeric in the |
// range 0-999999 and should be always present zero-padded to six |
// digits. |
- virtual void ConfirmPasskey(BluetoothDevice* device, |
+ virtual void ConfirmPasskey(BluetoothDeviceDBus* device, |
uint32 passkey) OVERRIDE; |
- // BluetoothDevice::PairingDelegate override. |
+ // BluetoothDeviceDBus::PairingDelegate override. |
// |
// This method will be called when any previous DisplayPinCode(), |
// DisplayPasskey() or ConfirmPasskey() request should be concluded |
@@ -118,40 +119,40 @@ class BluetoothOptionsHandler : public ::options::OptionsPageUIHandler, |
// string if the error is not specific to a single device. |
void ReportError(const std::string& error, const std::string& address); |
- // BluetoothAdapter::Observer implementation. |
- virtual void AdapterPresentChanged(BluetoothAdapter* adapter, |
+ // BluetoothAdapterDBus::Observer implementation. |
+ virtual void AdapterPresentChanged(BluetoothAdapterDBus* adapter, |
bool present) OVERRIDE; |
- virtual void AdapterPoweredChanged(BluetoothAdapter* adapter, |
+ virtual void AdapterPoweredChanged(BluetoothAdapterDBus* adapter, |
bool powered) OVERRIDE; |
- virtual void DeviceAdded(BluetoothAdapter* adapter, |
- BluetoothDevice* device) OVERRIDE; |
- virtual void DeviceChanged(BluetoothAdapter* adapter, |
- BluetoothDevice* device) OVERRIDE; |
- virtual void DeviceRemoved(BluetoothAdapter* adapter, |
- BluetoothDevice* device) OVERRIDE; |
+ virtual void DeviceAdded(BluetoothAdapterDBus* adapter, |
+ BluetoothDeviceDBus* device) OVERRIDE; |
+ virtual void DeviceChanged(BluetoothAdapterDBus* adapter, |
+ BluetoothDeviceDBus* device) OVERRIDE; |
+ virtual void DeviceRemoved(BluetoothAdapterDBus* adapter, |
+ BluetoothDeviceDBus* device) OVERRIDE; |
private: |
- // Called by BluetoothAdapter in response to a failure to change the |
+ // Called by BluetoothAdapterDBus in response to a failure to change the |
// power status of the adapter. |
void EnableChangeError(); |
- // Called by BluetoothAdapter in response to a failure to set the adapter |
+ // Called by BluetoothAdapterDBus in response to a failure to set the adapter |
// into discovery mode. |
void FindDevicesError(); |
- // Called by BluetoothAdapter in response to a failure to remove the adapter |
- // from discovery mode. |
+ // Called by BluetoothAdapterDBus in response to a failure to remove the |
+ // adapter from discovery mode. |
void StopDiscoveryError(); |
- // Called by BluetoothDevice in response to a failure to connect to the |
+ // Called by BluetoothDeviceDBus in response to a failure to connect to the |
// device with bluetooth address |address|. |
void ConnectError(const std::string& address); |
- // Called by BluetoothDevice in response to a failure to disconnect the |
+ // Called by BluetoothDeviceDBus in response to a failure to disconnect the |
// device with bluetooth address |address|. |
void DisconnectError(const std::string& address); |
- // Called by BluetoothDevice in response to a failure to disconnect and |
+ // Called by BluetoothDeviceDBus in response to a failure to disconnect and |
// unpair the device with bluetooth address |address|. |
void ForgetError(const std::string& address); |
@@ -183,7 +184,7 @@ class BluetoothOptionsHandler : public ::options::OptionsPageUIHandler, |
void GetPairedDevicesCallback(const base::ListValue* args); |
// Default bluetooth adapter, used for all operations. |
- scoped_refptr<BluetoothAdapter> adapter_; |
+ scoped_refptr<BluetoothAdapterDBus> adapter_; |
// Weak pointer factory for generating 'this' pointers that might live longer |
// than this object does. |