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

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

Issue 819713002: bluetoothPrivate: Add disconnectAll function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed comment by jyasskin@ Created 5 years, 11 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 "extensions/browser/api/bluetooth/bluetooth_extension_function.h" 9 #include "extensions/browser/api/bluetooth/bluetooth_extension_function.h"
10 #include "extensions/browser/browser_context_keyed_api_factory.h" 10 #include "extensions/browser/browser_context_keyed_api_factory.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 BLUETOOTHPRIVATE_SETPAIRINGRESPONSE) 83 BLUETOOTHPRIVATE_SETPAIRINGRESPONSE)
84 BluetoothPrivateSetPairingResponseFunction(); 84 BluetoothPrivateSetPairingResponseFunction();
85 // BluetoothExtensionFunction overrides: 85 // BluetoothExtensionFunction overrides:
86 bool DoWork(scoped_refptr<device::BluetoothAdapter> adapter) override; 86 bool DoWork(scoped_refptr<device::BluetoothAdapter> adapter) override;
87 87
88 private: 88 private:
89 ~BluetoothPrivateSetPairingResponseFunction() override; 89 ~BluetoothPrivateSetPairingResponseFunction() override;
90 DISALLOW_COPY_AND_ASSIGN(BluetoothPrivateSetPairingResponseFunction); 90 DISALLOW_COPY_AND_ASSIGN(BluetoothPrivateSetPairingResponseFunction);
91 }; 91 };
92 92
93 class BluetoothPrivateDisconnectAllFunction
94 : public BluetoothExtensionFunction {
95 public:
96 DECLARE_EXTENSION_FUNCTION("bluetoothPrivate.disconnectAll",
97 BLUETOOTHPRIVATE_DISCONNECTALL);
98 BluetoothPrivateDisconnectAllFunction();
99
100 // BluetoothExtensionFunction overrides:
101 bool DoWork(scoped_refptr<device::BluetoothAdapter> adapter) override;
102
103 private:
104 ~BluetoothPrivateDisconnectAllFunction() override;
105
106 void OnSuccessCallback();
107 void OnErrorCallback(scoped_refptr<device::BluetoothAdapter> adapter,
108 const std::string& device_address);
109
110 DISALLOW_COPY_AND_ASSIGN(BluetoothPrivateDisconnectAllFunction);
111 };
112
93 } // namespace core_api 113 } // namespace core_api
94 114
95 } // namespace extensions 115 } // namespace extensions
96 116
97 #endif // EXTENSIONS_BROWSER_API_BLUETOOTH_BLUETOOTH_PRIVATE_API_H_ 117 #endif // EXTENSIONS_BROWSER_API_BLUETOOTH_BLUETOOTH_PRIVATE_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698