Chromium Code Reviews| Index: components/proximity_auth/ble/proximity_auth_ble_system.h |
| diff --git a/components/proximity_auth/ble/proximity_auth_ble_system.h b/components/proximity_auth/ble/proximity_auth_ble_system.h |
| index 29ba6623f1085ad8d1a89f2ef4693795b3f12154..607f4ce2c7e42d50b901631cf5cc0663fc229db7 100644 |
| --- a/components/proximity_auth/ble/proximity_auth_ble_system.h |
| +++ b/components/proximity_auth/ble/proximity_auth_ble_system.h |
| @@ -7,23 +7,50 @@ |
| #include "base/macros.h" |
| #include "base/memory/scoped_ptr.h" |
| +#include "components/proximity_auth/screenlock_bridge.h" |
| -#include "components/proximity_auth/ble/bluetooth_low_energy_connection_finder.h" |
| +namespace content { |
| +class BrowserContext; |
| +} |
| + |
| +namespace device { |
| +class BluetoothGattConnection; |
| +} |
| namespace proximity_auth { |
| +class BluetoothLowEnergyConnectionFinder; |
| + |
| // This is the main entry point to start Proximity Auth over Bluetooth Low |
| // Energy. This is the underlying system for the Smart Lock features. It will |
| // discover Bluetooth Low Energy phones and unlock the lock screen if the phone |
| // passes an authorization and authentication protocol. |
| -class ProximityAuthBleSystem { |
| +class ProximityAuthBleSystem : public ScreenlockBridge::Observer { |
| public: |
| - ProximityAuthBleSystem(); |
| - ~ProximityAuthBleSystem(); |
| + ProximityAuthBleSystem(ScreenlockBridge* screenlock_bridge, |
| + content::BrowserContext* browser_context); |
|
Ilya Sherman
2015/04/28 01:02:33
nit: Reminder: If you remove the |browser_context|
msarda
2015/04/28 12:44:59
I kept the browser_context but removed the include
Ilya Sherman
2015/04/28 23:21:25
I think it would be better to eliminate the hint o
|
| + ~ProximityAuthBleSystem() override; |
| + |
| + // ScreenlockBridge::Observer: |
| + void OnScreenDidLock( |
| + ScreenlockBridge::LockHandler::ScreenType screen_type) override; |
| + void OnScreenDidUnlock( |
| + ScreenlockBridge::LockHandler::ScreenType screen_type) override; |
| + void OnFocusedUserChanged(const std::string& user_id) override; |
| private: |
| + // Handler for a new connection found event. |
| + void OnConnectionFound( |
| + scoped_ptr<device::BluetoothGattConnection> connection); |
| + |
| + ScreenlockBridge* screenlock_bridge_; // Not owned. Must outlive this object. |
| + content::BrowserContext* |
| + browser_context_; // Not owned. Must outlive this object. |
|
Ilya Sherman
2015/04/28 01:02:33
Hmm, before, we'd discussed keeping the BLE code's
msarda
2015/04/28 12:44:59
I removed the dependency and the DEPS rule as they
|
| + |
| scoped_ptr<BluetoothLowEnergyConnectionFinder> connection_finder_; |
| + base::WeakPtrFactory<ProximityAuthBleSystem> weak_ptr_factory_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(ProximityAuthBleSystem); |
| }; |