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

Unified Diff: device/bluetooth/adapter.h

Issue 2448713002: bluetooth: Add Device connection logic and accompanying user interface. (Closed)
Patch Set: Remove binding variable in Device.Create Created 4 years, 1 month 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
« no previous file with comments | « device/bluetooth/BUILD.gn ('k') | device/bluetooth/adapter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/adapter.h
diff --git a/device/bluetooth/adapter.h b/device/bluetooth/adapter.h
index f6a051fec252b6fb3e4a69cca02981cb2071c9b3..bea9621de77d0d90bbfa20eff0714e142e8aac14 100644
--- a/device/bluetooth/adapter.h
+++ b/device/bluetooth/adapter.h
@@ -5,11 +5,13 @@
#ifndef DEVICE_BLUETOOTH_ADAPTER_H_
#define DEVICE_BLUETOOTH_ADAPTER_H_
+#include <memory>
#include <string>
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "device/bluetooth/bluetooth_adapter.h"
+#include "device/bluetooth/bluetooth_gatt_connection.h"
#include "device/bluetooth/public/interfaces/adapter.mojom.h"
#include "device/bluetooth/public/interfaces/device.mojom.h"
@@ -27,8 +29,8 @@ class Adapter : public mojom::Adapter,
// mojom::Adapter overrides:
void GetInfo(const GetInfoCallback& callback) override;
- void GetDevice(const std::string& address,
- const GetDeviceCallback& callback) override;
+ void ConnectToDevice(const std::string& address,
+ const ConnectToDeviceCallback& callback) override;
void GetDevices(const GetDevicesCallback& callback) override;
void SetClient(mojom::AdapterClientPtr client) override;
@@ -41,6 +43,13 @@ class Adapter : public mojom::Adapter,
device::BluetoothDevice* device) override;
private:
+ void OnGattConnected(
+ const ConnectToDeviceCallback& callback,
+ std::unique_ptr<device::BluetoothGattConnection> connection);
+
+ void OnConnectError(const ConnectToDeviceCallback& callback,
+ device::BluetoothDevice::ConnectErrorCode error_code);
+
// The current Bluetooth adapter.
scoped_refptr<device::BluetoothAdapter> adapter_;
« no previous file with comments | « device/bluetooth/BUILD.gn ('k') | device/bluetooth/adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698