Index: chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h |
diff --git a/chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h b/chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h |
index b93858acd9943e434d52af68d934e05f268c9b89..df83be2825302432a15bfa6813dd5b5110bb1e2f 100644 |
--- a/chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h |
+++ b/chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h |
@@ -11,6 +11,7 @@ |
#include "base/memory/scoped_vector.h" |
#include "chrome/common/extensions/api/bluetooth.h" |
#include "device/bluetooth/bluetooth_adapter.h" |
+#include "device/bluetooth/bluetooth_adapter_factory.h" |
#include "device/bluetooth/bluetooth_socket.h" |
class Profile; |
@@ -23,9 +24,10 @@ class ExtensionBluetoothEventRouter |
explicit ExtensionBluetoothEventRouter(Profile* profile); |
virtual ~ExtensionBluetoothEventRouter(); |
- // GetAdapter will return NULL if the bluetooth adapter is not |
- // supported in the current platform. |
- scoped_refptr<device::BluetoothAdapter> GetAdapter(); |
+ // |callback| will not be run if the bluetooth is not supported in the current |
bryeung
2013/01/08 22:24:27
This seems like a frustrating API. Can we have th
youngki
2013/01/09 15:12:03
Done.
|
+ // platform. |
+ void RunCallbackOnAdapterReady( |
+ const device::BluetoothAdapterFactory::AdapterCallback& callback); |
// Called when a bluetooth event listener is added. |
void OnListenerAdded(); |
@@ -74,6 +76,7 @@ class ExtensionBluetoothEventRouter |
} |
private: |
void InitializeAdapterIfNeeded(); |
+ bool InitializeAdapter(scoped_refptr<device::BluetoothAdapter> adapter); |
void MaybeReleaseAdapter(); |
void DispatchAdapterStateEvent(); |