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_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_API_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_API_H_ |
6 #define EXTENSIONS_BROWSER_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_API_H_ | 6 #define EXTENSIONS_BROWSER_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_API_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "device/bluetooth/bluetooth_advertisement.h" | 9 #include "device/bluetooth/bluetooth_advertisement.h" |
10 #include "extensions/browser/api/api_resource_manager.h" | 10 #include "extensions/browser/api/api_resource_manager.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 static const bool kServiceIsNULLWhileTesting = true; | 43 static const bool kServiceIsNULLWhileTesting = true; |
44 | 44 |
45 private: | 45 private: |
46 friend class BrowserContextKeyedAPIFactory<BluetoothLowEnergyAPI>; | 46 friend class BrowserContextKeyedAPIFactory<BluetoothLowEnergyAPI>; |
47 | 47 |
48 scoped_ptr<BluetoothLowEnergyEventRouter> event_router_; | 48 scoped_ptr<BluetoothLowEnergyEventRouter> event_router_; |
49 | 49 |
50 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyAPI); | 50 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyAPI); |
51 }; | 51 }; |
52 | 52 |
53 namespace core_api { | 53 namespace api { |
54 | 54 |
55 // Base class for bluetoothLowEnergy API functions. This class handles some of | 55 // Base class for bluetoothLowEnergy API functions. This class handles some of |
56 // the common logic involved in all API functions, such as checking for | 56 // the common logic involved in all API functions, such as checking for |
57 // platform support and returning the correct error. | 57 // platform support and returning the correct error. |
58 class BluetoothLowEnergyExtensionFunction : public AsyncExtensionFunction { | 58 class BluetoothLowEnergyExtensionFunction : public AsyncExtensionFunction { |
59 public: | 59 public: |
60 BluetoothLowEnergyExtensionFunction(); | 60 BluetoothLowEnergyExtensionFunction(); |
61 | 61 |
62 protected: | 62 protected: |
63 ~BluetoothLowEnergyExtensionFunction() override; | 63 ~BluetoothLowEnergyExtensionFunction() override; |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 | 390 |
391 private: | 391 private: |
392 void SuccessCallback(int advertisement_id); | 392 void SuccessCallback(int advertisement_id); |
393 void ErrorCallback(int advertisement_id, | 393 void ErrorCallback(int advertisement_id, |
394 device::BluetoothAdvertisement::ErrorCode status); | 394 device::BluetoothAdvertisement::ErrorCode status); |
395 | 395 |
396 // The instance ID of the requested descriptor. | 396 // The instance ID of the requested descriptor. |
397 std::string instance_id_; | 397 std::string instance_id_; |
398 }; | 398 }; |
399 | 399 |
400 } // namespace core_api | 400 } // namespace api |
401 } // namespace extensions | 401 } // namespace extensions |
402 | 402 |
403 #endif // EXTENSIONS_BROWSER_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_API_
H_ | 403 #endif // EXTENSIONS_BROWSER_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_API_
H_ |
OLD | NEW |