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

Side by Side Diff: chrome/browser/extensions/api/bluetooth_socket/bluetooth_socket_api.h

Issue 246883003: Introduce chrome.bluetoothSocket API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase only Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_SOCKET_BLUETOOTH_SOCKET_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_SOCKET_BLUETOOTH_SOCKET_API_H_
7
8 #include "extensions/browser/extension_function.h"
9 #include "extensions/browser/extension_function_histogram_value.h"
10
11 namespace extensions {
12 namespace api {
13
14 class BluetoothSocketCreateFunction : public UIThreadExtensionFunction {
15 public:
16 DECLARE_EXTENSION_FUNCTION("bluetoothSocket.create", BLUETOOTHSOCKET_CREATE);
17
18 protected:
19 virtual ~BluetoothSocketCreateFunction() {}
20
21 // UIThreadExtensionFunction override:
22 virtual bool RunImpl() OVERRIDE;
23 };
24
25 class BluetoothSocketUpdateFunction : public UIThreadExtensionFunction {
26 public:
27 DECLARE_EXTENSION_FUNCTION("bluetoothSocket.update", BLUETOOTHSOCKET_UPDATE);
28
29 protected:
30 virtual ~BluetoothSocketUpdateFunction() {}
31
32 // UIThreadExtensionFunction override:
33 virtual bool RunImpl() OVERRIDE;
34 };
35
36 class BluetoothSocketSetPausedFunction : public UIThreadExtensionFunction {
37 public:
38 DECLARE_EXTENSION_FUNCTION("bluetoothSocket.setPaused",
39 BLUETOOTHSOCKET_SETPAUSED);
40
41 protected:
42 virtual ~BluetoothSocketSetPausedFunction() {}
43
44 // UIThreadExtensionFunction override:
45 virtual bool RunImpl() OVERRIDE;
46 };
47
48 class BluetoothSocketListenUsingRfcommFunction
49 : public UIThreadExtensionFunction {
50 public:
51 DECLARE_EXTENSION_FUNCTION("bluetoothSocket.listenUsingRfcomm",
52 BLUETOOTHSOCKET_LISTENUSINGRFCOMM);
53
54 protected:
55 virtual ~BluetoothSocketListenUsingRfcommFunction() {}
56
57 // UIThreadExtensionFunction override:
58 virtual bool RunImpl() OVERRIDE;
59 };
60
61 class BluetoothSocketListenUsingInsecureRfcommFunction
62 : public UIThreadExtensionFunction {
63 public:
64 DECLARE_EXTENSION_FUNCTION("bluetoothSocket.listenUsingInsecureRfcomm",
65 BLUETOOTHSOCKET_LISTENUSINGINSECURERFCOMM);
66
67 protected:
68 virtual ~BluetoothSocketListenUsingInsecureRfcommFunction() {}
69
70 // UIThreadExtensionFunction override:
71 virtual bool RunImpl() OVERRIDE;
72 };
73
74 class BluetoothSocketListenUsingL2capFunction
75 : public UIThreadExtensionFunction {
76 public:
77 DECLARE_EXTENSION_FUNCTION("bluetoothSocket.listenUsingL2cap",
78 BLUETOOTHSOCKET_LISTENUSINGL2CAP);
79
80 protected:
81 virtual ~BluetoothSocketListenUsingL2capFunction() {}
82
83 // UIThreadExtensionFunction override:
84 virtual bool RunImpl() OVERRIDE;
85 };
86
87 class BluetoothSocketConnectFunction : public UIThreadExtensionFunction {
88 public:
89 DECLARE_EXTENSION_FUNCTION("bluetoothSocket.connect",
90 BLUETOOTHSOCKET_CONNECT);
91
92 protected:
93 virtual ~BluetoothSocketConnectFunction() {}
94
95 // UIThreadExtensionFunction override:
96 virtual bool RunImpl() OVERRIDE;
97 };
98
99 class BluetoothSocketDisconnectFunction : public UIThreadExtensionFunction {
100 public:
101 DECLARE_EXTENSION_FUNCTION("bluetoothSocket.disconnect",
102 BLUETOOTHSOCKET_DISCONNECT);
103
104 protected:
105 virtual ~BluetoothSocketDisconnectFunction() {}
106
107 // UIThreadExtensionFunction override:
108 virtual bool RunImpl() OVERRIDE;
109 };
110
111 class BluetoothSocketCloseFunction : public UIThreadExtensionFunction {
112 public:
113 DECLARE_EXTENSION_FUNCTION("bluetoothSocket.close", BLUETOOTHSOCKET_CLOSE);
114
115 protected:
116 virtual ~BluetoothSocketCloseFunction() {}
117
118 // UIThreadExtensionFunction override:
119 virtual bool RunImpl() OVERRIDE;
120 };
121
122 class BluetoothSocketSendFunction : public UIThreadExtensionFunction {
123 public:
124 DECLARE_EXTENSION_FUNCTION("bluetoothSocket.send", BLUETOOTHSOCKET_SEND);
125
126 protected:
127 virtual ~BluetoothSocketSendFunction() {}
128
129 // UIThreadExtensionFunction override:
130 virtual bool RunImpl() OVERRIDE;
131 };
132
133 class BluetoothSocketGetInfoFunction : public UIThreadExtensionFunction {
134 public:
135 DECLARE_EXTENSION_FUNCTION("bluetoothSocket.getInfo",
136 BLUETOOTHSOCKET_GETINFO);
137
138 protected:
139 virtual ~BluetoothSocketGetInfoFunction() {}
140
141 // UIThreadExtensionFunction override:
142 virtual bool RunImpl() OVERRIDE;
143 };
144
145 class BluetoothSocketGetSocketsFunction : public UIThreadExtensionFunction {
146 public:
147 DECLARE_EXTENSION_FUNCTION("bluetoothSocket.getSockets",
148 BLUETOOTHSOCKET_GETSOCKETS);
149
150 protected:
151 virtual ~BluetoothSocketGetSocketsFunction() {}
152
153 // UIThreadExtensionFunction override:
154 virtual bool RunImpl() OVERRIDE;
155 };
156
157 } // namespace api
158 } // namespace extensions
159
160 #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_SOCKET_BLUETOOTH_SOCKET_API_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698