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_BLUETOOTH_PRIVATE_API_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_BLUETOOTH_BLUETOOTH_PRIVATE_API_H_ |
6 #define EXTENSIONS_BROWSER_API_BLUETOOTH_BLUETOOTH_PRIVATE_API_H_ | 6 #define EXTENSIONS_BROWSER_API_BLUETOOTH_BLUETOOTH_PRIVATE_API_H_ |
7 | 7 |
8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
9 #include "extensions/browser/api/bluetooth/bluetooth_extension_function.h" | 9 #include "extensions/browser/api/bluetooth/bluetooth_extension_function.h" |
10 #include "extensions/browser/browser_context_keyed_api_factory.h" | 10 #include "extensions/browser/browser_context_keyed_api_factory.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 static const char* service_name() { return "BluetoothPrivateAPI"; } | 39 static const char* service_name() { return "BluetoothPrivateAPI"; } |
40 static const bool kServiceRedirectedInIncognito = true; | 40 static const bool kServiceRedirectedInIncognito = true; |
41 static const bool kServiceIsNULLWhileTesting = true; | 41 static const bool kServiceIsNULLWhileTesting = true; |
42 | 42 |
43 private: | 43 private: |
44 friend class BrowserContextKeyedAPIFactory<BluetoothPrivateAPI>; | 44 friend class BrowserContextKeyedAPIFactory<BluetoothPrivateAPI>; |
45 | 45 |
46 content::BrowserContext* browser_context_; | 46 content::BrowserContext* browser_context_; |
47 }; | 47 }; |
48 | 48 |
49 namespace core_api { | 49 namespace api { |
50 | 50 |
51 class BluetoothPrivateSetAdapterStateFunction | 51 class BluetoothPrivateSetAdapterStateFunction |
52 : public BluetoothExtensionFunction { | 52 : public BluetoothExtensionFunction { |
53 public: | 53 public: |
54 DECLARE_EXTENSION_FUNCTION("bluetoothPrivate.setAdapterState", | 54 DECLARE_EXTENSION_FUNCTION("bluetoothPrivate.setAdapterState", |
55 BLUETOOTHPRIVATE_SETADAPTERSTATE) | 55 BLUETOOTHPRIVATE_SETADAPTERSTATE) |
56 BluetoothPrivateSetAdapterStateFunction(); | 56 BluetoothPrivateSetAdapterStateFunction(); |
57 | 57 |
58 private: | 58 private: |
59 ~BluetoothPrivateSetAdapterStateFunction() override; | 59 ~BluetoothPrivateSetAdapterStateFunction() override; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 ~BluetoothPrivateSetDiscoveryFilterFunction() override {} | 120 ~BluetoothPrivateSetDiscoveryFilterFunction() override {} |
121 | 121 |
122 // BluetoothExtensionFunction: | 122 // BluetoothExtensionFunction: |
123 bool DoWork(scoped_refptr<device::BluetoothAdapter> adapter) override; | 123 bool DoWork(scoped_refptr<device::BluetoothAdapter> adapter) override; |
124 | 124 |
125 private: | 125 private: |
126 void OnSuccessCallback(); | 126 void OnSuccessCallback(); |
127 void OnErrorCallback(); | 127 void OnErrorCallback(); |
128 }; | 128 }; |
129 | 129 |
130 } // namespace core_api | 130 } // namespace api |
131 | 131 |
132 } // namespace extensions | 132 } // namespace extensions |
133 | 133 |
134 #endif // EXTENSIONS_BROWSER_API_BLUETOOTH_BLUETOOTH_PRIVATE_API_H_ | 134 #endif // EXTENSIONS_BROWSER_API_BLUETOOTH_BLUETOOTH_PRIVATE_API_H_ |
OLD | NEW |