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

Side by Side Diff: components/proximity_auth/ble/bluetooth_low_energy_connection_finder.h

Issue 1102473003: Unlock Chrome when a phone with Smart Lock service is found. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_screen_lock
Patch Set: Nits Created 5 years, 7 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 COMPONENTS_PROXIMITY_AUTH_BLE_BLUETOOTH_LOW_ENERGY_CONNECTION_FINDER_H 5 #ifndef COMPONENTS_PROXIMITY_AUTH_BLE_BLUETOOTH_LOW_ENERGY_CONNECTION_FINDER_H
6 #define COMPONENTS_PROXIMITY_AUTH_BLE_BLUETOOTH_LOW_ENERGY_CONNECTION_FINDER_H 6 #define COMPONENTS_PROXIMITY_AUTH_BLE_BLUETOOTH_LOW_ENERGY_CONNECTION_FINDER_H
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 11 matching lines...) Expand all
22 22
23 // This ConnectionFinder implementation is specialized in finding a Bluetooth 23 // This ConnectionFinder implementation is specialized in finding a Bluetooth
24 // Low Energy remote device. 24 // Low Energy remote device.
25 class BluetoothLowEnergyConnectionFinder 25 class BluetoothLowEnergyConnectionFinder
26 : public ConnectionFinder, 26 : public ConnectionFinder,
27 public device::BluetoothAdapter::Observer { 27 public device::BluetoothAdapter::Observer {
28 public: 28 public:
29 BluetoothLowEnergyConnectionFinder(const std::string& remote_service_uuid); 29 BluetoothLowEnergyConnectionFinder(const std::string& remote_service_uuid);
30 ~BluetoothLowEnergyConnectionFinder() override; 30 ~BluetoothLowEnergyConnectionFinder() override;
31 31
32 // Finds a connection the remote device, only the first one is functional. 32 // Finds a connection to the remote device. Only the first one is functional.
33 void Find(const device::BluetoothDevice::GattConnectionCallback& 33 void Find(const device::BluetoothDevice::GattConnectionCallback&
34 connection_callback); 34 connection_callback);
35 void Find(const ConnectionCallback& connection_callback) override; 35 void Find(const ConnectionCallback& connection_callback) override;
36 36
37 protected: 37 protected:
38 // device::BluetoothAdapter::Observer: 38 // device::BluetoothAdapter::Observer:
39 void DeviceAdded(device::BluetoothAdapter* adapter, 39 void DeviceAdded(device::BluetoothAdapter* adapter,
40 device::BluetoothDevice* device) override; 40 device::BluetoothDevice* device) override;
41 41
42 private: 42 private:
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 device::BluetoothDevice::GattConnectionCallback connection_callback_; 97 device::BluetoothDevice::GattConnectionCallback connection_callback_;
98 98
99 base::WeakPtrFactory<BluetoothLowEnergyConnectionFinder> weak_ptr_factory_; 99 base::WeakPtrFactory<BluetoothLowEnergyConnectionFinder> weak_ptr_factory_;
100 100
101 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyConnectionFinder); 101 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyConnectionFinder);
102 }; 102 };
103 103
104 } // namespace proximity_auth 104 } // namespace proximity_auth
105 105
106 #endif // COMPONENTS_PROXIMITY_AUTH_BLE_BLUETOOTH_CONNECTION_FINDER_H 106 #endif // COMPONENTS_PROXIMITY_AUTH_BLE_BLUETOOTH_CONNECTION_FINDER_H
OLDNEW
« no previous file with comments | « components/proximity_auth.gypi ('k') | components/proximity_auth/ble/bluetooth_low_energy_connection_finder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698