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 CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_
API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_
API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_
API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_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 "extensions/browser/browser_context_keyed_api_factory.h" | 9 #include "extensions/browser/browser_context_keyed_api_factory.h" |
10 #include "extensions/browser/extension_function.h" | 10 #include "extensions/browser/extension_function.h" |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 : public BluetoothLowEnergyExtensionFunction { | 234 : public BluetoothLowEnergyExtensionFunction { |
235 public: | 235 public: |
236 DECLARE_EXTENSION_FUNCTION("bluetoothLowEnergy.writeDescriptorValue", | 236 DECLARE_EXTENSION_FUNCTION("bluetoothLowEnergy.writeDescriptorValue", |
237 BLUETOOTHLOWENERGY_WRITEDESCRIPTORVALUE); | 237 BLUETOOTHLOWENERGY_WRITEDESCRIPTORVALUE); |
238 | 238 |
239 protected: | 239 protected: |
240 virtual ~BluetoothLowEnergyWriteDescriptorValueFunction() {} | 240 virtual ~BluetoothLowEnergyWriteDescriptorValueFunction() {} |
241 | 241 |
242 // BluetoothLowEnergyExtensionFunction override. | 242 // BluetoothLowEnergyExtensionFunction override. |
243 virtual bool DoWork() OVERRIDE; | 243 virtual bool DoWork() OVERRIDE; |
| 244 |
| 245 private: |
| 246 // Success and error callbacks, called by |
| 247 // BluetoothLowEnergyEventRouter::WriteDescriptorValue. |
| 248 void SuccessCallback(); |
| 249 void ErrorCallback(); |
| 250 |
| 251 // The instance ID of the requested descriptor. |
| 252 std::string instance_id_; |
244 }; | 253 }; |
245 | 254 |
246 } // namespace api | 255 } // namespace api |
247 } // namespace extensions | 256 } // namespace extensions |
248 | 257 |
249 #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENER
GY_API_H_ | 258 #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENER
GY_API_H_ |
OLD | NEW |