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

Unified Diff: content/browser/bluetooth/bluetooth_dispatcher_host.h

Issue 1149883011: bluetooth: Browser-side implementation of readValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-get-characteristic-initial
Patch Set: Fix merge conflicts Created 5 years, 6 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
« no previous file with comments | « content/browser/bad_message.h ('k') | content/browser/bluetooth/bluetooth_dispatcher_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 fff36712a7d6e60c3afb851c8b89d6359d6bd00b..94d225123000240bf7a9d4c498487396255ac350 100644
--- a/content/browser/bluetooth/bluetooth_dispatcher_host.h
+++ b/content/browser/bluetooth/bluetooth_dispatcher_host.h
@@ -11,6 +11,7 @@
#include "content/public/browser/browser_message_filter.h"
#include "device/bluetooth/bluetooth_adapter.h"
#include "device/bluetooth/bluetooth_gatt_connection.h"
+#include "device/bluetooth/bluetooth_gatt_service.h"
namespace content {
@@ -61,6 +62,9 @@ class CONTENT_EXPORT BluetoothDispatcherHost final
int request_id,
const std::string& service_instance_id,
const std::string& characteristic_uuid);
+ void OnReadValue(int thread_id,
+ int request_id,
+ const std::string& characteristic_instance_id);
// Callbacks for BluetoothAdapter::StartDiscoverySession.
void OnDiscoverySessionStarted(
@@ -79,7 +83,7 @@ class CONTENT_EXPORT BluetoothDispatcherHost final
void OnDiscoverySessionStopped(int thread_id, int request_id);
void OnDiscoverySessionStoppedError(int thread_id, int request_id);
- // Callbacks for BluetoothDevice::CreateGattConnection
+ // Callbacks for BluetoothDevice::CreateGattConnection.
void OnGATTConnectionCreated(
int thread_id,
int request_id,
@@ -99,9 +103,20 @@ class CONTENT_EXPORT BluetoothDispatcherHost final
const std::string& device_instance_id,
const std::string& service_uuid);
+ // Callbacks for BluetoothGattCharacteristic::ReadRemoteCharacteristic.
+ void OnCharacteristicValueRead(int thread_id,
+ int request_id,
+ const std::vector<uint8>& value);
+ void OnCharacteristicReadValueError(
+ int thread_id,
+ int request_id,
+ device::BluetoothGattService::GattErrorCode);
+
// Maps to get the object's parent based on it's instanceID
// Map of service_instance_id to device_instance_id.
std::map<std::string, std::string> service_to_device_;
+ // Map of characteristic_instance_id to service_instance_id.
+ std::map<std::string, std::string> characteristic_to_service_;
// Defines how long to scan for and how long to discover services for.
int current_delay_time_;
« no previous file with comments | « content/browser/bad_message.h ('k') | content/browser/bluetooth/bluetooth_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698