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

Unified Diff: chromeos/dbus/fake_bluetooth_device_client.h

Issue 735893002: Add GetConnectionInfo function for BluetoothDevice, replacing the existing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
Index: chromeos/dbus/fake_bluetooth_device_client.h
diff --git a/chromeos/dbus/fake_bluetooth_device_client.h b/chromeos/dbus/fake_bluetooth_device_client.h
index 8d476cffa4c2b4447fd4648d332e00e9d31da77f..a125a351f416b93ca6d8e504e5e5fad9db154cad 100644
--- a/chromeos/dbus/fake_bluetooth_device_client.h
+++ b/chromeos/dbus/fake_bluetooth_device_client.h
@@ -69,14 +69,9 @@ class CHROMEOS_EXPORT FakeBluetoothDeviceClient
virtual void CancelPairing(const dbus::ObjectPath& object_path,
const base::Closure& callback,
const ErrorCallback& error_callback) override;
- virtual void StartConnectionMonitor(
- const dbus::ObjectPath& object_path,
- const base::Closure& callback,
- const ErrorCallback& error_callback) override;
- virtual void StopConnectionMonitor(
- const dbus::ObjectPath& object_path,
- const base::Closure& callback,
- const ErrorCallback& error_callback) override;
+ virtual void GetConnInfo(const dbus::ObjectPath& object_path,
+ const ConnInfoCallback& callback,
+ const ErrorCallback& error_callback) override;
void SetSimulationIntervalMs(int interval_ms);
@@ -105,6 +100,12 @@ class CHROMEOS_EXPORT FakeBluetoothDeviceClient
const base::Closure& callback,
const ErrorCallback& error_callback);
+ // Updates the connection properties of the fake device that will be returned
+ // by GetConnInfo.
+ void UpdateConnectionInfo(uint16 connection_rssi,
+ uint16 transmit_power,
+ uint16 max_transmit_power);
+
// Object paths, names, addresses and bluetooth classes of the devices
// we can emulate.
static const char kPairedDevicePath[];
@@ -250,7 +251,10 @@ class CHROMEOS_EXPORT FakeBluetoothDeviceClient
uint32_t discovery_simulation_step_;
uint32_t incoming_pairing_simulation_step_;
bool pairing_cancelled_;
- bool connection_monitor_started_;
+
+ int16 connection_rssi_;
+ int16 transmit_power_;
+ int16 max_transmit_power_;
};
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698