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

Unified Diff: device/bluetooth/bluetooth_adapter_win.h

Issue 12018024: Implemented Asynchronous Initialization of BluetoothAdapter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renamed RunCallbackOnAdapterReady to GetAdapter. 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
Index: device/bluetooth/bluetooth_adapter_win.h
diff --git a/device/bluetooth/bluetooth_adapter_win.h b/device/bluetooth/bluetooth_adapter_win.h
index 56abf6db35ad53a4ef263f570c94f997b682da6a..286319d4485962df5be73edf38d58c4ae3f5a5a5 100644
--- a/device/bluetooth/bluetooth_adapter_win.h
+++ b/device/bluetooth/bluetooth_adapter_win.h
@@ -22,6 +22,8 @@ class BluetoothDevice;
class BluetoothAdapterWin : public BluetoothAdapter,
public BluetoothTaskManagerWin::Observer {
public:
+ typedef base::Callback<void()> InitCallback;
+
// BluetoothAdapter override
virtual void AddObserver(BluetoothAdapter::Observer* observer) OVERRIDE;
virtual void RemoveObserver(BluetoothAdapter::Observer* observer) OVERRIDE;
@@ -52,7 +54,7 @@ class BluetoothAdapterWin : public BluetoothAdapter,
protected:
friend class BluetoothAdapterWinTest;
- BluetoothAdapterWin();
+ BluetoothAdapterWin(const InitCallback& init_callback);
virtual ~BluetoothAdapterWin();
private:
@@ -60,6 +62,8 @@ class BluetoothAdapterWin : public BluetoothAdapter,
void TrackDefaultAdapter();
+ InitCallback init_callback_;
+ bool initialized_;
bool powered_;
scoped_refptr<BluetoothTaskManagerWin> task_manager_;

Powered by Google App Engine
This is Rietveld 408576698