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

Side by Side Diff: content/child/bluetooth/web_bluetooth_impl.h

Issue 1172853004: Chromium side of RequestDeviceOptions implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Add an end-namespace comment 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 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 <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 #include "third_party/WebKit/public/platform/modules/bluetooth/WebBluetooth.h" 13 #include "third_party/WebKit/public/platform/modules/bluetooth/WebBluetooth.h"
14 14
15 namespace content { 15 namespace content {
16 16
17 class BluetoothDispatcher; 17 class BluetoothDispatcher;
18 class ThreadSafeSender; 18 class ThreadSafeSender;
19 19
20 // Implementation of blink::WebBluetooth. Passes calls through to the thread 20 // Implementation of blink::WebBluetooth. Passes calls through to the thread
21 // specific BluetoothDispatcher. 21 // specific BluetoothDispatcher.
22 class CONTENT_EXPORT WebBluetoothImpl 22 class CONTENT_EXPORT WebBluetoothImpl
23 : NON_EXPORTED_BASE(public blink::WebBluetooth) { 23 : NON_EXPORTED_BASE(public blink::WebBluetooth) {
24 public: 24 public:
25 explicit WebBluetoothImpl(ThreadSafeSender* thread_safe_sender); 25 explicit WebBluetoothImpl(ThreadSafeSender* thread_safe_sender);
26 ~WebBluetoothImpl(); 26 ~WebBluetoothImpl();
27 27
28 // blink::WebBluetooth interface: 28 // blink::WebBluetooth interface:
29 void requestDevice( 29 void requestDevice(
30 const blink::WebRequestDeviceOptions& options,
30 blink::WebBluetoothRequestDeviceCallbacks* callbacks) override; 31 blink::WebBluetoothRequestDeviceCallbacks* callbacks) override;
31 void connectGATT(const blink::WebString& device_instance_id, 32 void connectGATT(const blink::WebString& device_instance_id,
32 blink::WebBluetoothConnectGATTCallbacks* callbacks) override; 33 blink::WebBluetoothConnectGATTCallbacks* callbacks) override;
33 void getPrimaryService( 34 void getPrimaryService(
34 const blink::WebString& device_instance_id, 35 const blink::WebString& device_instance_id,
35 const blink::WebString& service_uuid, 36 const blink::WebString& service_uuid,
36 blink::WebBluetoothGetPrimaryServiceCallbacks* callbacks) override; 37 blink::WebBluetoothGetPrimaryServiceCallbacks* callbacks) override;
37 void getCharacteristic( 38 void getCharacteristic(
38 const blink::WebString& service_instance_id, 39 const blink::WebString& service_instance_id,
39 const blink::WebString& characteristic_uuid, 40 const blink::WebString& characteristic_uuid,
40 blink::WebBluetoothGetCharacteristicCallbacks* callbacks) override; 41 blink::WebBluetoothGetCharacteristicCallbacks* callbacks) override;
41 void readValue(const blink::WebString& characteristic_instance_id, 42 void readValue(const blink::WebString& characteristic_instance_id,
42 blink::WebBluetoothReadValueCallbacks* callbacks) override; 43 blink::WebBluetoothReadValueCallbacks* callbacks) override;
43 44
44 private: 45 private:
45 BluetoothDispatcher* GetDispatcher(); 46 BluetoothDispatcher* GetDispatcher();
46 47
47 scoped_refptr<ThreadSafeSender> thread_safe_sender_; 48 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
48 49
49 DISALLOW_COPY_AND_ASSIGN(WebBluetoothImpl); 50 DISALLOW_COPY_AND_ASSIGN(WebBluetoothImpl);
50 }; 51 };
51 52
52 } // namespace content 53 } // namespace content
53 54
54 #endif // CONTENT_CHILD_BLUETOOTH_WEB_BLUETOOTH_IMPL_H_ 55 #endif // CONTENT_CHILD_BLUETOOTH_WEB_BLUETOOTH_IMPL_H_
OLDNEW
« no previous file with comments | « content/child/bluetooth/bluetooth_dispatcher.cc ('k') | content/child/bluetooth/web_bluetooth_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698