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

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: Ran update_extension_functions.py Created 6 years 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 BluetoothPrivateDisconnectFunction : public BluetoothExtensionFunction {
94 public:
95 DECLARE_EXTENSION_FUNCTION("bluetoothPrivate.disconnect",
96 BLUETOOTHPRIVATE_DISCONNECT);
97 BluetoothPrivateDisconnectFunction();
98
99 // BluetoothExtensionFunction overrides:
100 bool DoWork(scoped_refptr<device::BluetoothAdapter> adapter) override;
101
102 private:
103 ~BluetoothPrivateDisconnectFunction() override;
104
105 void OnSuccessCallback();
106 void OnErrorCallback();
107
108 DISALLOW_COPY_AND_ASSIGN(BluetoothPrivateDisconnectFunction);
109 };
110
93 } // namespace core_api 111 } // namespace core_api
94 112
95 } // namespace extensions 113 } // namespace extensions
96 114
97 #endif // EXTENSIONS_BROWSER_API_BLUETOOTH_BLUETOOTH_PRIVATE_API_H_ 115 #endif // EXTENSIONS_BROWSER_API_BLUETOOTH_BLUETOOTH_PRIVATE_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698