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

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

Issue 420663003: Extensions: Move bluetooth APIs to extensions/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android, gn Created 6 years, 3 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
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 CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_SOCKET_BLUETOOTH_SOCKET_API_H_ 5 #ifndef EXTENSIONS_BROWSER_API_BLUETOOTH_SOCKET_BLUETOOTH_SOCKET_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_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"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "chrome/browser/extensions/api/bluetooth_socket/bluetooth_api_socket.h"
14 #include "chrome/common/extensions/api/bluetooth_socket.h"
15 #include "device/bluetooth/bluetooth_adapter.h" 13 #include "device/bluetooth/bluetooth_adapter.h"
16 #include "extensions/browser/api/api_resource_manager.h" 14 #include "extensions/browser/api/api_resource_manager.h"
17 #include "extensions/browser/api/async_api_function.h" 15 #include "extensions/browser/api/async_api_function.h"
16 #include "extensions/browser/api/bluetooth_socket/bluetooth_api_socket.h"
18 #include "extensions/browser/extension_function.h" 17 #include "extensions/browser/extension_function.h"
19 #include "extensions/browser/extension_function_histogram_value.h" 18 #include "extensions/browser/extension_function_histogram_value.h"
19 #include "extensions/common/api/bluetooth_socket.h"
20 20
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 api { 31 namespace core_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
339 BluetoothSocketGetSocketsFunction(); 339 BluetoothSocketGetSocketsFunction();
340 340
341 protected: 341 protected:
342 virtual ~BluetoothSocketGetSocketsFunction(); 342 virtual ~BluetoothSocketGetSocketsFunction();
343 343
344 // BluetoothSocketAsyncApiFunction: 344 // BluetoothSocketAsyncApiFunction:
345 virtual bool Prepare() OVERRIDE; 345 virtual bool Prepare() OVERRIDE;
346 virtual void Work() OVERRIDE; 346 virtual void Work() OVERRIDE;
347 }; 347 };
348 348
349 } // namespace api 349 } // namespace core_api
350 } // namespace extensions 350 } // namespace extensions
351 351
352 #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_SOCKET_BLUETOOTH_SOCKET_API_H _ 352 #endif // EXTENSIONS_BROWSER_API_BLUETOOTH_SOCKET_BLUETOOTH_SOCKET_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698