OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 public: | 176 public: |
177 DECLARE_EXTENSION_FUNCTION("bluetooth.connect", BLUETOOTH_CONNECT) | 177 DECLARE_EXTENSION_FUNCTION("bluetooth.connect", BLUETOOTH_CONNECT) |
178 | 178 |
179 protected: | 179 protected: |
180 virtual ~BluetoothConnectFunction(); | 180 virtual ~BluetoothConnectFunction(); |
181 | 181 |
182 // BluetoothExtensionFunction: | 182 // BluetoothExtensionFunction: |
183 virtual bool DoWork(scoped_refptr<device::BluetoothAdapter> adapter) OVERRIDE; | 183 virtual bool DoWork(scoped_refptr<device::BluetoothAdapter> adapter) OVERRIDE; |
184 | 184 |
185 private: | 185 private: |
186 void OnSuccessCallback(); | 186 void OnConnectedCallback(scoped_refptr<device::BluetoothAdapter> adapter, |
| 187 const std::string& device_address); |
| 188 void OnMonitorStartedCallback(); |
187 void OnErrorCallback(const std::string& error); | 189 void OnErrorCallback(const std::string& error); |
188 }; | 190 }; |
189 | 191 |
190 class BluetoothDisconnectFunction : public AsyncExtensionFunction { | 192 class BluetoothDisconnectFunction : public AsyncExtensionFunction { |
191 public: | 193 public: |
192 DECLARE_EXTENSION_FUNCTION("bluetooth.disconnect", BLUETOOTH_DISCONNECT) | 194 DECLARE_EXTENSION_FUNCTION("bluetooth.disconnect", BLUETOOTH_DISCONNECT) |
193 | 195 |
194 protected: | 196 protected: |
195 virtual ~BluetoothDisconnectFunction() {} | 197 virtual ~BluetoothDisconnectFunction() {} |
196 | 198 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 | 316 |
315 private: | 317 private: |
316 void OnSuccessCallback(); | 318 void OnSuccessCallback(); |
317 void OnErrorCallback(); | 319 void OnErrorCallback(); |
318 }; | 320 }; |
319 | 321 |
320 } // namespace api | 322 } // namespace api |
321 } // namespace extensions | 323 } // namespace extensions |
322 | 324 |
323 #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_H_ | 325 #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_H_ |
OLD | NEW |