OLD | NEW |
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 EXTENSIONS_BROWSER_API_BLUETOOTH_SOCKET_BLUETOOTH_SOCKET_API_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_BLUETOOTH_SOCKET_BLUETOOTH_SOCKET_API_H_ |
6 #define EXTENSIONS_BROWSER_API_BLUETOOTH_SOCKET_BLUETOOTH_SOCKET_API_H_ | 6 #define EXTENSIONS_BROWSER_API_BLUETOOTH_SOCKET_BLUETOOTH_SOCKET_API_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 namespace device { | 21 namespace device { |
22 class BluetoothSocket; | 22 class BluetoothSocket; |
23 } | 23 } |
24 | 24 |
25 namespace net { | 25 namespace net { |
26 class IOBuffer; | 26 class IOBuffer; |
27 } | 27 } |
28 | 28 |
29 namespace extensions { | 29 namespace extensions { |
30 | 30 |
31 namespace core_api { | 31 namespace api { |
32 | 32 |
33 class BluetoothSocketEventDispatcher; | 33 class BluetoothSocketEventDispatcher; |
34 | 34 |
35 // Asynchronous API function that performs its work on the BluetoothApiSocket | 35 // Asynchronous API function that performs its work on the BluetoothApiSocket |
36 // thread while providing methods to manage resources of that class. This | 36 // thread while providing methods to manage resources of that class. This |
37 // follows the pattern of AsyncApiFunction, but does not derive from it, | 37 // follows the pattern of AsyncApiFunction, but does not derive from it, |
38 // because BluetoothApiSocket methods must be called on the UI Thread. | 38 // because BluetoothApiSocket methods must be called on the UI Thread. |
39 class BluetoothSocketAsyncApiFunction : public AsyncExtensionFunction { | 39 class BluetoothSocketAsyncApiFunction : public AsyncExtensionFunction { |
40 public: | 40 public: |
41 BluetoothSocketAsyncApiFunction(); | 41 BluetoothSocketAsyncApiFunction(); |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 BluetoothSocketGetSocketsFunction(); | 339 BluetoothSocketGetSocketsFunction(); |
340 | 340 |
341 protected: | 341 protected: |
342 ~BluetoothSocketGetSocketsFunction() override; | 342 ~BluetoothSocketGetSocketsFunction() override; |
343 | 343 |
344 // BluetoothSocketAsyncApiFunction: | 344 // BluetoothSocketAsyncApiFunction: |
345 bool Prepare() override; | 345 bool Prepare() override; |
346 void Work() override; | 346 void Work() override; |
347 }; | 347 }; |
348 | 348 |
349 } // namespace core_api | 349 } // namespace api |
350 } // namespace extensions | 350 } // namespace extensions |
351 | 351 |
352 #endif // EXTENSIONS_BROWSER_API_BLUETOOTH_SOCKET_BLUETOOTH_SOCKET_API_H_ | 352 #endif // EXTENSIONS_BROWSER_API_BLUETOOTH_SOCKET_BLUETOOTH_SOCKET_API_H_ |
OLD | NEW |