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

Unified Diff: content/renderer/bluetooth/web_bluetooth_impl.h

Issue 1865613002: bluetooth: Move read value to mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-separate-tests-notifications
Patch Set: Address jyasskin's comments Created 4 years, 8 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/renderer/bluetooth/web_bluetooth_impl.h
diff --git a/content/renderer/bluetooth/web_bluetooth_impl.h b/content/renderer/bluetooth/web_bluetooth_impl.h
index e236507ce9bd7f51f101dc00aeda35a94c73c008..789cbcb0f9739f74b0b4d08fed2e77ae114b1105 100644
--- a/content/renderer/bluetooth/web_bluetooth_impl.h
+++ b/content/renderer/bluetooth/web_bluetooth_impl.h
@@ -10,10 +10,12 @@
#include <memory>
#include <string>
#include <unordered_map>
+#include <vector>
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
+#include "base/thread_task_runner_handle.h"
#include "content/common/content_export.h"
#include "mojo/public/cpp/bindings/associated_binding.h"
#include "third_party/WebKit/public/platform/modules/bluetooth/WebBluetooth.h"
@@ -60,7 +62,6 @@ class CONTENT_EXPORT WebBluetoothImpl
const blink::WebString& service_instance_id,
const blink::WebString& characteristics_uuid,
blink::WebBluetoothGetCharacteristicsCallbacks* callbacks) override;
-
void readValue(const blink::WebString& characteristic_instance_id,
blink::WebBluetoothReadValueCallbacks* callbacks) override;
void writeValue(const blink::WebString& characteristic_instance_id,
@@ -86,6 +87,10 @@ class CONTENT_EXPORT WebBluetoothImpl
mojo::Array<uint8_t> value) override;
// Callbacks for WebBluetoothService calls:
+ void OnReadValueComplete(
+ std::unique_ptr<blink::WebBluetoothReadValueCallbacks> callbacks,
+ blink::mojom::WebBluetoothError error,
+ mojo::Array<uint8_t> value);
void OnWriteValueComplete(
const blink::WebVector<uint8_t>& value,
std::unique_ptr<blink::WebBluetoothWriteValueCallbacks> callbacks,
@@ -96,6 +101,10 @@ class CONTENT_EXPORT WebBluetoothImpl
void OnStopNotificationsComplete(
std::unique_ptr<blink::WebBluetoothNotificationsCallbacks> callbacks);
+ void DispatchCharacteristicValueChanged(
+ const std::string& characteristic_instance_id,
+ const std::vector<uint8_t>& value);
+
BluetoothDispatcher* GetDispatcher();
blink::mojom::WebBluetoothService& GetWebBluetoothService();
« no previous file with comments | « content/renderer/bluetooth/bluetooth_dispatcher.cc ('k') | content/renderer/bluetooth/web_bluetooth_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698