Index: device/bluetooth/bluetooth_adapter_win.h |
diff --git a/device/bluetooth/bluetooth_adapter_win.h b/device/bluetooth/bluetooth_adapter_win.h |
index 0cad233abad3ad9484f822705659f0329f10d531..0e35040ec7b3a8d68c98fe9c0612b3ebaf05e1b0 100644 |
--- a/device/bluetooth/bluetooth_adapter_win.h |
+++ b/device/bluetooth/bluetooth_adapter_win.h |
@@ -7,8 +7,11 @@ |
#include <string> |
+#include "base/memory/ref_counted.h" |
#include "base/memory/weak_ptr.h" |
+#include "base/threading/thread_checker.h" |
#include "device/bluetooth/bluetooth_adapter.h" |
+#include "device/bluetooth/bluetooth_task_manager_win.h" |
namespace device { |
@@ -16,7 +19,8 @@ class BluetoothAdapterFactory; |
class BluetoothAdapterWinTest; |
class BluetoothDevice; |
-class BluetoothAdapterWin : public BluetoothAdapter { |
+class BluetoothAdapterWin : public BluetoothAdapter, |
+ public BluetoothTaskManagerWin::Observer { |
public: |
// BluetoothAdapter override |
virtual void AddObserver(BluetoothAdapter::Observer* observer) OVERRIDE; |
@@ -40,25 +44,25 @@ class BluetoothAdapterWin : public BluetoothAdapter { |
const BluetoothOutOfBandPairingDataCallback& callback, |
const ErrorCallback& error_callback) OVERRIDE; |
+ // BluetoothTaskManagerWin::Observer override |
+ virtual void AdapterStateChanged( |
+ const BluetoothTaskManagerWin::AdapterState& state) OVERRIDE; |
+ |
protected: |
BluetoothAdapterWin(); |
virtual ~BluetoothAdapterWin(); |
- virtual void UpdateAdapterState(); |
- |
private: |
friend class BluetoothAdapterFactory; |
- friend class BluetoothAdapterWinTest; |
- // Obtains the default adapter info (the first bluetooth radio info found on |
- // the system) and tracks future changes to it. |
+ // Starts BluetoothPollingThreadWin thread to obtain the default adapter info. |
brettw
2013/01/09 20:06:04
I think this comment is out of date.
youngki
2013/01/09 22:20:14
I just removed the comment.
|
void TrackDefaultAdapter(); |
- void PollAdapterState(); |
+ bool powered_; |
- static const int kPollIntervalMs; |
+ scoped_refptr<BluetoothTaskManagerWin> task_manager_; |
- bool powered_; |
+ base::ThreadChecker thread_checker_; |
// NOTE: This should remain the last member so it'll be destroyed and |
// invalidate its weak pointers before any other members are destroyed. |