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

Side by Side Diff: extensions/browser/api/bluetooth/bluetooth_private_api.h

Issue 2017113002: [Extensions] DCHECK that ExtensionFunctions respond (and only once) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
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 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 "base/macros.h" 9 #include "base/macros.h"
10 #include "device/bluetooth/bluetooth_device.h" 10 #include "device/bluetooth/bluetooth_device.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 // BluetoothExtensionFunction overrides: 69 // BluetoothExtensionFunction overrides:
70 bool DoWork(scoped_refptr<device::BluetoothAdapter> adapter) override; 70 bool DoWork(scoped_refptr<device::BluetoothAdapter> adapter) override;
71 71
72 // Set of expected adapter properties to be changed. 72 // Set of expected adapter properties to be changed.
73 std::set<std::string> pending_properties_; 73 std::set<std::string> pending_properties_;
74 74
75 // Set of adapter properties that were not set successfully. 75 // Set of adapter properties that were not set successfully.
76 std::set<std::string> failed_properties_; 76 std::set<std::string> failed_properties_;
77 77
78 // Whether or not the function has finished parsing the arguments and queuing
79 // up state requests.
80 bool parsed_ = false;
81
78 DISALLOW_COPY_AND_ASSIGN(BluetoothPrivateSetAdapterStateFunction); 82 DISALLOW_COPY_AND_ASSIGN(BluetoothPrivateSetAdapterStateFunction);
79 }; 83 };
80 84
81 class BluetoothPrivateSetPairingResponseFunction 85 class BluetoothPrivateSetPairingResponseFunction
82 : public BluetoothExtensionFunction { 86 : public BluetoothExtensionFunction {
83 public: 87 public:
84 DECLARE_EXTENSION_FUNCTION("bluetoothPrivate.setPairingResponse", 88 DECLARE_EXTENSION_FUNCTION("bluetoothPrivate.setPairingResponse",
85 BLUETOOTHPRIVATE_SETPAIRINGRESPONSE) 89 BLUETOOTHPRIVATE_SETPAIRINGRESPONSE)
86 BluetoothPrivateSetPairingResponseFunction(); 90 BluetoothPrivateSetPairingResponseFunction();
87 // BluetoothExtensionFunction overrides: 91 // BluetoothExtensionFunction overrides:
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 void OnErrorCallback(device::BluetoothDevice::ConnectErrorCode error); 185 void OnErrorCallback(device::BluetoothDevice::ConnectErrorCode error);
182 186
183 DISALLOW_COPY_AND_ASSIGN(BluetoothPrivatePairFunction); 187 DISALLOW_COPY_AND_ASSIGN(BluetoothPrivatePairFunction);
184 }; 188 };
185 189
186 } // namespace api 190 } // namespace api
187 191
188 } // namespace extensions 192 } // namespace extensions
189 193
190 #endif // EXTENSIONS_BROWSER_API_BLUETOOTH_BLUETOOTH_PRIVATE_API_H_ 194 #endif // EXTENSIONS_BROWSER_API_BLUETOOTH_BLUETOOTH_PRIVATE_API_H_
OLDNEW
« no previous file with comments | « chrome/test/ppapi/ppapi_browsertest.cc ('k') | extensions/browser/api/bluetooth/bluetooth_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698