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

Unified Diff: content/public/browser/bluetooth_chooser.h

Issue 2210873003: bluetooth: Allow updates on chooser items. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-fix-advertised-services
Patch Set: Make const Created 4 years, 4 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: content/public/browser/bluetooth_chooser.h
diff --git a/content/public/browser/bluetooth_chooser.h b/content/public/browser/bluetooth_chooser.h
index aec3c2f19415c7606f2c6fe578d36aca43334318..ea2b4f554f95288f8e66a579e469629c9b7810b9 100644
--- a/content/public/browser/bluetooth_chooser.h
+++ b/content/public/browser/bluetooth_chooser.h
@@ -68,9 +68,15 @@ class CONTENT_EXPORT BluetoothChooser {
enum class DiscoveryState { FAILED_TO_START, DISCOVERING, IDLE };
virtual void ShowDiscoveryState(DiscoveryState state) {}
- // Shows a new device in the chooser.
- virtual void AddDevice(const std::string& device_id,
- const base::string16& device_name) {}
+ // Adds a new device to the chooser or updates the information of an existing
+ // device. Passing nullptr for |rssi| means that the device doesn't not have
+ // RSSI which happens when the device is already connected.
+ virtual void AddOrUpdateDevice(const std::string& device_id,
+ bool should_update_name,
+ const base::string16& device_name,
+ bool is_gatt_connected,
+ bool is_paired,
+ const int8_t* rssi) {}
// Tells the chooser that a device is no longer available. The chooser should
// not call DeviceSelected() for a device that's been removed.

Powered by Google App Engine
This is Rietveld 408576698