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

Unified Diff: device/bluetooth/bluetooth_device_chromeos.h

Issue 273953002: Hook up RSSI and host transmit power Bluetooth device properties for ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Start connection monitor when connected through chrome.bluetooth API Created 6 years, 7 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_device_chromeos.h
diff --git a/device/bluetooth/bluetooth_device_chromeos.h b/device/bluetooth/bluetooth_device_chromeos.h
index 41327899e4545975e962c974cdb462c125e4b00f..78f11d6a4fb4fa00b97e1b8e5667237908513009 100644
--- a/device/bluetooth/bluetooth_device_chromeos.h
+++ b/device/bluetooth/bluetooth_device_chromeos.h
@@ -82,6 +82,12 @@ class BluetoothDeviceChromeOS
virtual void ClearOutOfBandPairingData(
const base::Closure& callback,
const ErrorCallback& error_callback) OVERRIDE;
+ virtual void StartConnectionMonitor(
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) OVERRIDE;
+ virtual void StopConnectionMonitor(
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) OVERRIDE;
// Creates a pairing object with the given delegate |pairing_delegate| and
// establishes it as the pairing context for this device. All pairing-related
@@ -170,6 +176,13 @@ class BluetoothDeviceChromeOS
const std::string& error_name,
const std::string& error_message);
+ // Called by dbus:: on completion of the D-Bus method call to start the
+ // connection monitor.
+ void OnStartConnectionMonitor(const base::Closure& callback);
+ void OnStartConnectionMonitorError(const ErrorCallback& error_callback,
+ const std::string& error_name,
+ const std::string& error_message);
+
// Returns the object path of the device; used by BluetoothAdapterChromeOS
const dbus::ObjectPath& object_path() const { return object_path_; }
@@ -185,6 +198,10 @@ class BluetoothDeviceChromeOS
// Number of ongoing calls to Connect().
int num_connecting_calls_;
+ // True if the connection monitor has been started, tracking the connection
+ // RSSI and TX power.
+ bool connection_monitor_started_;
+
// UI thread task runner and socket thread object used to create sockets.
scoped_refptr<base::SequencedTaskRunner> ui_task_runner_;
scoped_refptr<device::BluetoothSocketThread> socket_thread_;

Powered by Google App Engine
This is Rietveld 408576698