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

Side by Side 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 cleanup 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_CHILD_BLUETOOTH_WEB_BLUETOOTH_IMPL_H_ 5 #ifndef CONTENT_CHILD_BLUETOOTH_WEB_BLUETOOTH_IMPL_H_
6 #define CONTENT_CHILD_BLUETOOTH_WEB_BLUETOOTH_IMPL_H_ 6 #define CONTENT_CHILD_BLUETOOTH_WEB_BLUETOOTH_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "content/common/content_export.h" 15 #include "content/common/content_export.h"
16 #include "third_party/WebKit/public/platform/modules/bluetooth/WebBluetooth.h" 16 #include "third_party/WebKit/public/platform/modules/bluetooth/WebBluetooth.h"
17 17
18 namespace blink { 18 namespace blink {
19 class WebBluetoothRemoteGATTCharacteristic; 19 class WebBluetoothRemoteGATTCharacteristic;
20 } 20 }
21 21
22 namespace content { 22 namespace content {
23 23
24 class BluetoothDispatcher; 24 class BluetoothDispatcher;
25 class ThreadSafeSender; 25 class ThreadSafeSender;
26 class ServiceRegistry;
26 27
27 // Implementation of blink::WebBluetooth. Passes calls through to the thread 28 // Implementation of blink::WebBluetooth. Passes calls through to the thread
28 // specific BluetoothDispatcher. 29 // specific BluetoothDispatcher.
29 class CONTENT_EXPORT WebBluetoothImpl 30 class CONTENT_EXPORT WebBluetoothImpl
30 : NON_EXPORTED_BASE(public blink::WebBluetooth) { 31 : NON_EXPORTED_BASE(public blink::WebBluetooth) {
31 public: 32 public:
32 explicit WebBluetoothImpl(ThreadSafeSender* thread_safe_sender); 33 WebBluetoothImpl(ThreadSafeSender* thread_safe_sender,
33 WebBluetoothImpl(ThreadSafeSender* thread_safe_sender, int frame_routing_id); 34 ServiceRegistry* service_registry,
35 int frame_routing_id);
34 ~WebBluetoothImpl() override; 36 ~WebBluetoothImpl() override;
35 37
36 // blink::WebBluetooth interface: 38 // blink::WebBluetooth interface:
37 void requestDevice( 39 void requestDevice(
38 const blink::WebRequestDeviceOptions& options, 40 const blink::WebRequestDeviceOptions& options,
39 blink::WebBluetoothRequestDeviceCallbacks* callbacks) override; 41 blink::WebBluetoothRequestDeviceCallbacks* callbacks) override;
40 void connect( 42 void connect(
41 const blink::WebString& device_id, 43 const blink::WebString& device_id,
42 blink::WebBluetoothRemoteGATTServerConnectCallbacks* callbacks) override; 44 blink::WebBluetoothRemoteGATTServerConnectCallbacks* callbacks) override;
43 void disconnect(const blink::WebString& device_id) override; 45 void disconnect(const blink::WebString& device_id) override;
(...skipping 28 matching lines...) Expand all
72 blink::WebBluetoothRemoteGATTCharacteristic* characteristic) override; 74 blink::WebBluetoothRemoteGATTCharacteristic* characteristic) override;
73 void registerCharacteristicObject( 75 void registerCharacteristicObject(
74 const blink::WebString& characteristic_instance_id, 76 const blink::WebString& characteristic_instance_id,
75 blink::WebBluetoothRemoteGATTCharacteristic* characteristic) override; 77 blink::WebBluetoothRemoteGATTCharacteristic* characteristic) override;
76 78
77 private: 79 private:
78 BluetoothDispatcher* GetDispatcher(); 80 BluetoothDispatcher* GetDispatcher();
79 81
80 const scoped_refptr<ThreadSafeSender> thread_safe_sender_; 82 const scoped_refptr<ThreadSafeSender> thread_safe_sender_;
81 const int frame_routing_id_; 83 const int frame_routing_id_;
84 ServiceRegistry* service_registry_;
82 85
83 DISALLOW_COPY_AND_ASSIGN(WebBluetoothImpl); 86 DISALLOW_COPY_AND_ASSIGN(WebBluetoothImpl);
84 }; 87 };
85 88
86 } // namespace content 89 } // namespace content
87 90
88 #endif // CONTENT_CHILD_BLUETOOTH_WEB_BLUETOOTH_IMPL_H_ 91 #endif // CONTENT_CHILD_BLUETOOTH_WEB_BLUETOOTH_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698