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

Unified Diff: device/bluetooth/bluetooth_adapter_win.h

Issue 11345037: Implemented BluetoothAdapterWin::IsPresent(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Match the definition order to the declaration order Created 8 years, 1 month 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
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_adapter_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_adapter_win.h
diff --git a/device/bluetooth/bluetooth_adapter_win.h b/device/bluetooth/bluetooth_adapter_win.h
index de76b18e8eb7719b0994d5c782dd90685655601f..61a2e5ca7b24f3208a257b97dd2c23c42b0b28b9 100644
--- a/device/bluetooth/bluetooth_adapter_win.h
+++ b/device/bluetooth/bluetooth_adapter_win.h
@@ -13,9 +13,11 @@
namespace device {
class BluetoothAdapterFactory;
+class BluetoothAdapterWinTest;
class BluetoothDevice;
class BluetoothAdapterWin : public BluetoothAdapter {
+ public:
// BluetoothAdapter override
virtual void AddObserver(BluetoothAdapter::Observer* observer) OVERRIDE;
virtual void RemoveObserver(BluetoothAdapter::Observer* observer) OVERRIDE;
@@ -38,12 +40,24 @@ class BluetoothAdapterWin : public BluetoothAdapter {
const BluetoothOutOfBandPairingDataCallback& callback,
const ErrorCallback& error_callback) OVERRIDE;
- private:
- friend class device::BluetoothAdapterFactory;
-
+ 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.
+ void TrackDefaultAdapter();
+
+ void PollAdapterState();
+
+ static const int kPollIntervalMs;
+
// NOTE: This should remain the last member so it'll be destroyed and
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothAdapterWin> weak_ptr_factory_;
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_adapter_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698