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

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

Issue 1775953004: bluetooth: Move writeValue to mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Moar clean up Created 4 years, 9 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 3075d1b5c3ed6918653abd8e7de1a5017412a4d8..6fbce7d6efe33ff53810fdbc983ec43f0d22549a 100644
--- a/content/renderer/bluetooth/web_bluetooth_impl.h
+++ b/content/renderer/bluetooth/web_bluetooth_impl.h
@@ -14,6 +14,7 @@
#include "base/memory/ref_counted.h"
#include "content/common/content_export.h"
#include "third_party/WebKit/public/platform/modules/bluetooth/WebBluetooth.h"
+#include "third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom.h"
namespace blink {
class WebBluetoothRemoteGATTCharacteristic;
@@ -23,14 +24,16 @@ namespace content {
class BluetoothDispatcher;
class ThreadSafeSender;
+class ServiceRegistry;
// Implementation of blink::WebBluetooth. Passes calls through to the thread
// specific BluetoothDispatcher.
class CONTENT_EXPORT WebBluetoothImpl
: NON_EXPORTED_BASE(public blink::WebBluetooth) {
public:
- explicit WebBluetoothImpl(ThreadSafeSender* thread_safe_sender);
- WebBluetoothImpl(ThreadSafeSender* thread_safe_sender, int frame_routing_id);
+ WebBluetoothImpl(ServiceRegistry* service_registry,
+ ThreadSafeSender* thread_safe_sender,
+ int frame_routing_id);
~WebBluetoothImpl() override;
// blink::WebBluetooth interface:
@@ -75,8 +78,17 @@ class CONTENT_EXPORT WebBluetoothImpl
blink::WebBluetoothRemoteGATTCharacteristic* characteristic) override;
private:
+ void OnWriteValue(
+ const blink::WebVector<uint8_t>& value,
+ scoped_ptr<blink::WebBluetoothWriteValueCallbacks> callbacks,
+ blink::mojom::WebBluetoothError error);
+
BluetoothDispatcher* GetDispatcher();
+ blink::mojom::WebBluetoothServicePtr& GetWebBluetoothService();
+ ServiceRegistry* service_registry_;
+ blink::mojom::WebBluetoothServicePtr web_bluetooth_service_;
+
const scoped_refptr<ThreadSafeSender> thread_safe_sender_;
const int frame_routing_id_;

Powered by Google App Engine
This is Rietveld 408576698