| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CHROMEOS_COMPONENTS_TETHER_INITIALIZER_H_ | 5 #ifndef CHROMEOS_COMPONENTS_TETHER_INITIALIZER_H_ |
| 6 #define CHROMEOS_COMPONENTS_TETHER_INITIALIZER_H_ | 6 #define CHROMEOS_COMPONENTS_TETHER_INITIALIZER_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/weak_ptr.h" |
| 13 #include "device/bluetooth/bluetooth_adapter.h" |
| 14 |
| 15 class PrefService; |
| 9 | 16 |
| 10 namespace cryptauth { | 17 namespace cryptauth { |
| 11 class CryptAuthService; | 18 class CryptAuthService; |
| 19 class RemoteBeaconSeedFetcher; |
| 12 } | 20 } |
| 13 | 21 |
| 14 namespace chromeos { | 22 namespace chromeos { |
| 15 | 23 |
| 16 namespace tether { | 24 namespace tether { |
| 17 | 25 |
| 26 class ActiveHost; |
| 27 class ActiveHostNetworkStateUpdater; |
| 28 class BleConnectionManager; |
| 29 class DeviceIdTetherNetworkGuidMap; |
| 30 class HostScanner; |
| 31 class HostScanDevicePrioritizer; |
| 32 class LocalDeviceDataProvider; |
| 33 class NotificationPresenter; |
| 34 class TetherConnector; |
| 35 class TetherHostFetcher; |
| 36 class WifiHotspotConnector; |
| 37 |
| 18 // Initializes the Tether Chrome OS component. | 38 // Initializes the Tether Chrome OS component. |
| 19 // TODO(khorimoto): Implement. | |
| 20 class Initializer { | 39 class Initializer { |
| 21 public: | 40 public: |
| 22 static void Initialize(cryptauth::CryptAuthService* cryptauth_service); | 41 static void Initialize( |
| 42 cryptauth::CryptAuthService* cryptauth_service, |
| 43 std::unique_ptr<NotificationPresenter> notification_presenter, |
| 44 PrefService* pref_service); |
| 23 | 45 |
| 24 private: | 46 private: |
| 25 static Initializer* instance_; | 47 static Initializer* instance_; |
| 26 | 48 |
| 27 explicit Initializer(cryptauth::CryptAuthService* cryptauth_service); | 49 Initializer(cryptauth::CryptAuthService* cryptauth_service, |
| 50 std::unique_ptr<NotificationPresenter> notification_presenter, |
| 51 PrefService* pref_service); |
| 28 ~Initializer(); | 52 ~Initializer(); |
| 29 | 53 |
| 54 void OnBluetoothAdapterFetched( |
| 55 scoped_refptr<device::BluetoothAdapter> adapter); |
| 56 |
| 30 cryptauth::CryptAuthService* cryptauth_service_; | 57 cryptauth::CryptAuthService* cryptauth_service_; |
| 58 std::unique_ptr<NotificationPresenter> notification_presenter_; |
| 59 PrefService* pref_service_; |
| 60 |
| 61 std::unique_ptr<TetherHostFetcher> tether_host_fetcher_; |
| 62 std::unique_ptr<LocalDeviceDataProvider> local_device_data_provider_; |
| 63 std::unique_ptr<cryptauth::RemoteBeaconSeedFetcher> |
| 64 remote_beacon_seed_fetcher_; |
| 65 std::unique_ptr<BleConnectionManager> ble_connection_manager_; |
| 66 std::unique_ptr<HostScanDevicePrioritizer> host_scan_device_prioritizer_; |
| 67 std::unique_ptr<WifiHotspotConnector> wifi_hotspot_connector_; |
| 68 std::unique_ptr<ActiveHost> active_host_; |
| 69 std::unique_ptr<ActiveHostNetworkStateUpdater> |
| 70 active_host_network_state_updater_; |
| 71 std::unique_ptr<DeviceIdTetherNetworkGuidMap> |
| 72 device_id_tether_network_guid_map_; |
| 73 std::unique_ptr<TetherConnector> tether_connector_; |
| 74 std::unique_ptr<HostScanner> host_scanner_; |
| 75 |
| 76 base::WeakPtrFactory<Initializer> weak_ptr_factory_; |
| 31 | 77 |
| 32 DISALLOW_COPY_AND_ASSIGN(Initializer); | 78 DISALLOW_COPY_AND_ASSIGN(Initializer); |
| 33 }; | 79 }; |
| 34 | 80 |
| 35 } // namespace tether | 81 } // namespace tether |
| 36 | 82 |
| 37 } // namespace chromeos | 83 } // namespace chromeos |
| 38 | 84 |
| 39 #endif // CHROMEOS_COMPONENTS_TETHER_INITIALIZER_H_ | 85 #endif // CHROMEOS_COMPONENTS_TETHER_INITIALIZER_H_ |
| OLD | NEW |