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

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

Issue 263333003: chrome.bluetoothLowEnergy: Implement writeCharacteristicValue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 : public BluetoothLowEnergyExtensionFunction { 181 : public BluetoothLowEnergyExtensionFunction {
182 public: 182 public:
183 DECLARE_EXTENSION_FUNCTION("bluetoothLowEnergy.writeCharacteristicValue", 183 DECLARE_EXTENSION_FUNCTION("bluetoothLowEnergy.writeCharacteristicValue",
184 BLUETOOTHLOWENERGY_WRITECHARACTERISTICVALUE); 184 BLUETOOTHLOWENERGY_WRITECHARACTERISTICVALUE);
185 185
186 protected: 186 protected:
187 virtual ~BluetoothLowEnergyWriteCharacteristicValueFunction() {} 187 virtual ~BluetoothLowEnergyWriteCharacteristicValueFunction() {}
188 188
189 // BluetoothLowEnergyExtensionFunction override. 189 // BluetoothLowEnergyExtensionFunction override.
190 virtual bool DoWork() OVERRIDE; 190 virtual bool DoWork() OVERRIDE;
191
192 private:
193 // Success and error callbacks, called by
194 // BluetoothLowEnergyEventRouter::WriteCharacteristicValue.
195 void SuccessCallback();
196 void ErrorCallback();
197
198 // The instance ID of the requested characteristic.
199 std::string instance_id_;
191 }; 200 };
192 201
193 class BluetoothLowEnergyReadDescriptorValueFunction 202 class BluetoothLowEnergyReadDescriptorValueFunction
194 : public BluetoothLowEnergyExtensionFunction { 203 : public BluetoothLowEnergyExtensionFunction {
195 public: 204 public:
196 DECLARE_EXTENSION_FUNCTION("bluetoothLowEnergy.readDescriptorValue", 205 DECLARE_EXTENSION_FUNCTION("bluetoothLowEnergy.readDescriptorValue",
197 BLUETOOTHLOWENERGY_READDESCRIPTORVALUE); 206 BLUETOOTHLOWENERGY_READDESCRIPTORVALUE);
198 207
199 protected: 208 protected:
200 virtual ~BluetoothLowEnergyReadDescriptorValueFunction() {} 209 virtual ~BluetoothLowEnergyReadDescriptorValueFunction() {}
(...skipping 12 matching lines...) Expand all
213 virtual ~BluetoothLowEnergyWriteDescriptorValueFunction() {} 222 virtual ~BluetoothLowEnergyWriteDescriptorValueFunction() {}
214 223
215 // BluetoothLowEnergyExtensionFunction override. 224 // BluetoothLowEnergyExtensionFunction override.
216 virtual bool DoWork() OVERRIDE; 225 virtual bool DoWork() OVERRIDE;
217 }; 226 };
218 227
219 } // namespace api 228 } // namespace api
220 } // namespace extensions 229 } // namespace extensions
221 230
222 #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENER GY_API_H_ 231 #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENER GY_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698