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

Unified Diff: chrome/browser/chromeos/bluetooth/bluetooth_adapter.h

Issue 9694054: bluetooth: implement device pairing support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: [clang] use POD for constants to avoid exit-time destructor error Created 8 years, 9 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: chrome/browser/chromeos/bluetooth/bluetooth_adapter.h
diff --git a/chrome/browser/chromeos/bluetooth/bluetooth_adapter.h b/chrome/browser/chromeos/bluetooth/bluetooth_adapter.h
index 6a007b52326d5cb9161042632b04d4251b261a62..da898778fa5d51fd29f7c6182066d36687d141d5 100644
--- a/chrome/browser/chromeos/bluetooth/bluetooth_adapter.h
+++ b/chrome/browser/chromeos/bluetooth/bluetooth_adapter.h
@@ -31,9 +31,9 @@ class BluetoothDevice;
//
// The class may be instantiated for either a specific adapter, or for the
// generic "default adapter" which may change depending on availability.
-class BluetoothAdapter : public BluetoothManagerClient::Observer,
- public BluetoothAdapterClient::Observer,
- public BluetoothDeviceClient::Observer {
+class BluetoothAdapter : private BluetoothManagerClient::Observer,
+ private BluetoothAdapterClient::Observer,
+ private BluetoothDeviceClient::Observer {
public:
// Interface for observing changes from bluetooth adapters.
class Observer {
@@ -121,6 +121,10 @@ class BluetoothAdapter : public BluetoothManagerClient::Observer,
typedef std::vector<BluetoothDevice*> DeviceList;
DeviceList GetDevices();
+ // Returns a pointer to the device with the given address |address| or
+ // NULL if no such device is known.
+ BluetoothDevice* GetDevice(const std::string& address);
+
// Creates the instance for the default adapter, whichever that may
// be at the time. Use IsPresent() and the AdapterPresentChanged() observer
// method to determine whether an adapter is actually available or not.
@@ -132,6 +136,8 @@ class BluetoothAdapter : public BluetoothManagerClient::Observer,
static BluetoothAdapter* Create(const std::string& address);
private:
+ friend class BluetoothDevice;
+
BluetoothAdapter();
// Obtains the default adapter object path from the Bluetooth Daemon

Powered by Google App Engine
This is Rietveld 408576698