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

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: fix ambiguity of listen functions 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 (c) 2012 The Chromium Authors. All rights reserved.
rpaquay 2014/04/22 15:47:55 nit: Copyright 2014
keybuk 2014/04/24 11:46:45 Done.
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
not at google - send to devlin 2014/04/22 17:27:05 make sure you run git cl format before submitting
keybuk 2014/04/24 11:46:45 Done.
15 : public UIThreadExtensionFunction {
16 public:
17 DECLARE_EXTENSION_FUNCTION("bluetoothSocket.create",
18 BLUETOOTHSOCKET_CREATE);
19
20 protected:
21 virtual ~BluetoothSocketCreateFunction() {}
22
23 // UIThreadExtensionFunction override:
24 virtual bool RunImpl() OVERRIDE;
25 };
26
27 class BluetoothSocketUpdateFunction
28 : public UIThreadExtensionFunction {
29 public:
30 DECLARE_EXTENSION_FUNCTION("bluetoothSocket.update",
31 BLUETOOTHSOCKET_UPDATE);
32
33 protected:
34 virtual ~BluetoothSocketUpdateFunction() {}
35
36 // UIThreadExtensionFunction override:
37 virtual bool RunImpl() OVERRIDE;
38 };
39
40 class BluetoothSocketSetPausedFunction
41 : public UIThreadExtensionFunction {
42 public:
43 DECLARE_EXTENSION_FUNCTION("bluetoothSocket.setPaused",
44 BLUETOOTHSOCKET_SETPAUSED);
45
46 protected:
47 virtual ~BluetoothSocketSetPausedFunction() {}
48
49 // UIThreadExtensionFunction override:
50 virtual bool RunImpl() OVERRIDE;
51 };
52
53 class BluetoothSocketListenUsingRfcommFunction
54 : public UIThreadExtensionFunction {
55 public:
56 DECLARE_EXTENSION_FUNCTION("bluetoothSocket.listenUsingRfcomm",
57 BLUETOOTHSOCKET_LISTENUSINGRFCOMM);
58
59 protected:
60 virtual ~BluetoothSocketListenUsingRfcommFunction() {}
61
62 // UIThreadExtensionFunction override:
63 virtual bool RunImpl() OVERRIDE;
64 };
65
66 class BluetoothSocketListenUsingInsecureRfcommFunction
67 : public UIThreadExtensionFunction {
68 public:
69 DECLARE_EXTENSION_FUNCTION("bluetoothSocket.listenUsingInsecureRfcomm",
70 BLUETOOTHSOCKET_LISTENUSINGINSECURERFCOMM);
71
72 protected:
73 virtual ~BluetoothSocketListenUsingInsecureRfcommFunction() {}
74
75 // UIThreadExtensionFunction override:
76 virtual bool RunImpl() OVERRIDE;
77 };
78
79 class BluetoothSocketListenUsingL2capFunction
80 : public UIThreadExtensionFunction {
81 public:
82 DECLARE_EXTENSION_FUNCTION("bluetoothSocket.listenUsingL2cap",
83 BLUETOOTHSOCKET_LISTENUSINGL2CAP);
84
85 protected:
86 virtual ~BluetoothSocketListenUsingL2capFunction() {}
87
88 // UIThreadExtensionFunction override:
89 virtual bool RunImpl() OVERRIDE;
90 };
91
92 class BluetoothSocketConnectFunction
93 : public UIThreadExtensionFunction {
94 public:
95 DECLARE_EXTENSION_FUNCTION("bluetoothSocket.connect",
96 BLUETOOTHSOCKET_CONNECT);
97
98 protected:
99 virtual ~BluetoothSocketConnectFunction() {}
100
101 // UIThreadExtensionFunction override:
102 virtual bool RunImpl() OVERRIDE;
103 };
104
105 class BluetoothSocketDisconnectFunction
106 : public UIThreadExtensionFunction {
107 public:
108 DECLARE_EXTENSION_FUNCTION("bluetoothSocket.disconnect",
109 BLUETOOTHSOCKET_DISCONNECT);
110
111 protected:
112 virtual ~BluetoothSocketDisconnectFunction() {}
113
114 // UIThreadExtensionFunction override:
115 virtual bool RunImpl() OVERRIDE;
116 };
117
118 class BluetoothSocketCloseFunction
119 : public UIThreadExtensionFunction {
120 public:
121 DECLARE_EXTENSION_FUNCTION("bluetoothSocket.close",
122 BLUETOOTHSOCKET_CLOSE);
123
124 protected:
125 virtual ~BluetoothSocketCloseFunction() {}
126
127 // UIThreadExtensionFunction override:
128 virtual bool RunImpl() OVERRIDE;
129 };
130
131 class BluetoothSocketSendFunction
132 : public UIThreadExtensionFunction {
133 public:
134 DECLARE_EXTENSION_FUNCTION("bluetoothSocket.send",
135 BLUETOOTHSOCKET_SEND);
136
137 protected:
138 virtual ~BluetoothSocketSendFunction() {}
139
140 // UIThreadExtensionFunction override:
141 virtual bool RunImpl() OVERRIDE;
142 };
143
144 class BluetoothSocketGetInfoFunction
145 : public UIThreadExtensionFunction {
146 public:
147 DECLARE_EXTENSION_FUNCTION("bluetoothSocket.getInfo",
148 BLUETOOTHSOCKET_GETINFO);
149
150 protected:
151 virtual ~BluetoothSocketGetInfoFunction() {}
152
153 // UIThreadExtensionFunction override:
154 virtual bool RunImpl() OVERRIDE;
155 };
156
157 class BluetoothSocketGetSocketsFunction
158 : public UIThreadExtensionFunction {
159 public:
160 DECLARE_EXTENSION_FUNCTION("bluetoothSocket.getSockets",
161 BLUETOOTHSOCKET_GETSOCKETS);
162
163 protected:
164 virtual ~BluetoothSocketGetSocketsFunction() {}
165
166 // UIThreadExtensionFunction override:
167 virtual bool RunImpl() OVERRIDE;
168 };
169
170 } // namespace api
171 } // namespace extensions
172
173 #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_SOCKET_BLUETOOTH_SOCKET_API_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698