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

Unified Diff: chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.h

Issue 813303003: Add easyUnlockPrivate.getConnection API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.h
diff --git a/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.h b/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.h
index 7192dd15bef1d321c47b1bb97d8b94a624e09eeb..919742ff558e207bfe8d7f95f44f29c857d69c67 100644
--- a/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.h
+++ b/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.h
@@ -9,6 +9,8 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
+#include "device/bluetooth/bluetooth_device.h"
+#include "extensions/browser/api/bluetooth/bluetooth_extension_function.h"
#include "extensions/browser/api/bluetooth_socket/bluetooth_socket_api.h"
#include "extensions/browser/browser_context_keyed_api_factory.h"
#include "extensions/browser/extension_function.h"
@@ -347,6 +349,25 @@ class EasyUnlockPrivateGetUserImageFunction : public SyncExtensionFunction {
DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateGetUserImageFunction);
};
+class EasyUnlockPrivateGetConnectionInfoFunction
+ : public core_api::BluetoothExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.getConnectionInfo",
+ EASYUNLOCKPRIVATE_GETCONNECTIONINFO)
+ EasyUnlockPrivateGetConnectionInfoFunction();
+
+ private:
+ ~EasyUnlockPrivateGetConnectionInfoFunction() override;
+
+ // BluetoothExtensionFunction:
+ bool DoWork(scoped_refptr<device::BluetoothAdapter> adapter) override;
+
+ void OnConnectionInfo(
+ const device::BluetoothDevice::ConnectionInfo& connection_info);
+
+ DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateGetConnectionInfoFunction);
+};
+
} // namespace api
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698