Index: chrome/browser/chromeos/extensions/bluetooth_event_router.h |
diff --git a/chrome/browser/chromeos/extensions/bluetooth_event_router.h b/chrome/browser/chromeos/extensions/bluetooth_event_router.h |
index 6715c4e374c1ca2c5e311f959463ff7f88f919d5..73181d3d14cb9b09a0fa77828e6ccb7bce9669b0 100644 |
--- a/chrome/browser/chromeos/extensions/bluetooth_event_router.h |
+++ b/chrome/browser/chromeos/extensions/bluetooth_event_router.h |
@@ -16,24 +16,30 @@ |
namespace chromeos { |
+class BluetoothDevice; |
+ |
class ExtensionBluetoothEventRouter |
: public chromeos::BluetoothAdapter::Observer { |
public: |
explicit ExtensionBluetoothEventRouter(Profile* profile); |
virtual ~ExtensionBluetoothEventRouter(); |
- const chromeos::BluetoothAdapter& adapter() const { return *adapter_.get(); } |
+ const chromeos::BluetoothAdapter& adapter() const { |
+ return *adapter_.get(); |
+ } |
// GetMutableAdapter will never return NULL. |
- chromeos::BluetoothAdapter* GetMutableAdapter() { return adapter_.get(); } |
+ chromeos::BluetoothAdapter* GetMutableAdapter() { |
+ return adapter_.get(); |
+ } |
// Register the BluetoothSocket |socket| for use by the extensions system. |
// This class will hold onto the socket for its lifetime, or until |
// ReleaseSocket is called for the socket. Returns an id for the socket. |
int RegisterSocket(scoped_refptr<BluetoothSocket> socket); |
- // Release the BluetoothSocket corresponding to |id|. Returns true if |
- // the socket was found and released, false otherwise. |
+ // Release the BluetoothSocket corresponding to |id|. Returns true if the |
+ // socket was found and released, false otherwise. |
bool ReleaseSocket(int id); |
// Get the BluetoothSocket corresponding to |id|. |
@@ -53,14 +59,20 @@ class ExtensionBluetoothEventRouter |
const extensions::api::experimental_bluetooth::Device& device); |
// Override from chromeos::BluetoothAdapter::Observer |
- virtual void AdapterPresentChanged(chromeos::BluetoothAdapter* adapter, |
- bool present) OVERRIDE; |
- virtual void AdapterPoweredChanged(chromeos::BluetoothAdapter* adapter, |
- bool has_power) OVERRIDE; |
- virtual void AdapterDiscoveringChanged(chromeos::BluetoothAdapter* adapter, |
- bool discovering) OVERRIDE; |
- virtual void DeviceAdded(chromeos::BluetoothAdapter* adapter, |
- chromeos::BluetoothDevice* device) OVERRIDE; |
+ virtual void AdapterPresentChanged( |
+ chromeos::BluetoothAdapter* adapter, bool present) OVERRIDE; |
+ virtual void AdapterPoweredChanged( |
+ chromeos::BluetoothAdapter* adapter, bool has_power) OVERRIDE; |
+ virtual void AdapterDiscoveringChanged( |
+ chromeos::BluetoothAdapter* adapter, bool discovering) 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; |
// Exposed for testing. |
void SetAdapterForTest(chromeos::BluetoothAdapter* adapter) { |
@@ -75,9 +87,9 @@ class ExtensionBluetoothEventRouter |
Profile* profile_; |
scoped_refptr<chromeos::BluetoothAdapter> adapter_; |
- // The next id to use for referring to a BluetoothSocket. We avoid using |
- // the fd of the socket because we don't want to leak that information to |
- // the extension javascript. |
+ // The next id to use for referring to a BluetoothSocket. We avoid using the |
+ // fd of the socket because we don't want to leak that information to the |
+ // extension javascript. |
int next_socket_id_; |
typedef std::map<int, scoped_refptr<BluetoothSocket> > SocketMap; |