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

Side by Side Diff: chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.h

Issue 297003004: chrome.bluetoothLowEnergy: Implement readDescriptorValue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git cl format Created 6 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 : public BluetoothLowEnergyExtensionFunction { 212 : public BluetoothLowEnergyExtensionFunction {
213 public: 213 public:
214 DECLARE_EXTENSION_FUNCTION("bluetoothLowEnergy.readDescriptorValue", 214 DECLARE_EXTENSION_FUNCTION("bluetoothLowEnergy.readDescriptorValue",
215 BLUETOOTHLOWENERGY_READDESCRIPTORVALUE); 215 BLUETOOTHLOWENERGY_READDESCRIPTORVALUE);
216 216
217 protected: 217 protected:
218 virtual ~BluetoothLowEnergyReadDescriptorValueFunction() {} 218 virtual ~BluetoothLowEnergyReadDescriptorValueFunction() {}
219 219
220 // BluetoothLowEnergyExtensionFunction override. 220 // BluetoothLowEnergyExtensionFunction override.
221 virtual bool DoWork() OVERRIDE; 221 virtual bool DoWork() OVERRIDE;
222
223 private:
224 // Success and error callbacks, called by
225 // BluetoothLowEnergyEventRouter::ReadDescriptorValue.
226 void SuccessCallback();
227 void ErrorCallback();
228
229 // The instance ID of the requested descriptor.
230 std::string instance_id_;
222 }; 231 };
223 232
224 class BluetoothLowEnergyWriteDescriptorValueFunction 233 class BluetoothLowEnergyWriteDescriptorValueFunction
225 : public BluetoothLowEnergyExtensionFunction { 234 : public BluetoothLowEnergyExtensionFunction {
226 public: 235 public:
227 DECLARE_EXTENSION_FUNCTION("bluetoothLowEnergy.writeDescriptorValue", 236 DECLARE_EXTENSION_FUNCTION("bluetoothLowEnergy.writeDescriptorValue",
228 BLUETOOTHLOWENERGY_WRITEDESCRIPTORVALUE); 237 BLUETOOTHLOWENERGY_WRITEDESCRIPTORVALUE);
229 238
230 protected: 239 protected:
231 virtual ~BluetoothLowEnergyWriteDescriptorValueFunction() {} 240 virtual ~BluetoothLowEnergyWriteDescriptorValueFunction() {}
232 241
233 // BluetoothLowEnergyExtensionFunction override. 242 // BluetoothLowEnergyExtensionFunction override.
234 virtual bool DoWork() OVERRIDE; 243 virtual bool DoWork() OVERRIDE;
235 }; 244 };
236 245
237 } // namespace api 246 } // namespace api
238 } // namespace extensions 247 } // namespace extensions
239 248
240 #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENER GY_API_H_ 249 #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENER GY_API_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698