Index: content/browser/bluetooth/bluetooth_dispatcher_host.h |
diff --git a/content/browser/bluetooth/bluetooth_dispatcher_host.h b/content/browser/bluetooth/bluetooth_dispatcher_host.h |
index 7e3e7af45cb7d59206db6e04237ee11c962828d7..70517898a292cc24d231afefb0a86f750a547951 100644 |
--- a/content/browser/bluetooth/bluetooth_dispatcher_host.h |
+++ b/content/browser/bluetooth/bluetooth_dispatcher_host.h |
@@ -18,6 +18,10 @@ namespace device { |
class BluetoothUUID; |
} |
+namespace blink { |
+enum class WebBluetoothError; |
+} |
+ |
namespace content { |
struct BluetoothScanFilter; |
@@ -55,6 +59,23 @@ class CONTENT_EXPORT BluetoothDispatcherHost final |
struct RequestDeviceSession; |
+ enum class CacheQueryOutcome { |
+ SUCCESS = 0, |
+ BAD_RENDERER = 1, |
+ NO_DEVICE = 2, |
+ NO_SERVICE = 3, |
+ NO_CHARACTERISTIC = 4 |
+ }; |
+ |
+ blink::WebBluetoothError CacheQueryOutcomeToWebBluetoothError( |
+ CacheQueryOutcome outcome); |
+ std::pair<CacheQueryOutcome, device::BluetoothDevice*> QueryForDevice( |
+ const std::string& device_instance_id); |
+ std::pair<CacheQueryOutcome, device::BluetoothGattService*> QueryForService( |
+ const std::string& service_instance_id); |
+ std::pair<CacheQueryOutcome, device::BluetoothGattCharacteristic*> |
+ QueryForCharacteristic(const std::string& characteristic_instance_id); |
+ |
// Set |adapter_| to a BluetoothAdapter instance and register observers, |
// releasing references to previous |adapter_|. |
void set_adapter(scoped_refptr<device::BluetoothAdapter> adapter); |