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

Side by Side Diff: chromeos/components/tether/initializer.h

Issue 2801353002: [CrOS Tether] Fill out the Initializer class. Tether will now initialize fully once the flag is ena… (Closed)
Patch Set: Created 3 years, 8 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 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. 39 // TODO(khorimoto): Implement.
20 class Initializer { 40 class Initializer {
21 public: 41 public:
22 static void Initialize(cryptauth::CryptAuthService* cryptauth_service); 42 static void Initialize(
43 cryptauth::CryptAuthService* cryptauth_service,
44 std::unique_ptr<NotificationPresenter> notification_presenter,
45 PrefService* pref_service);
23 46
24 private: 47 private:
25 static Initializer* instance_; 48 static Initializer* instance_;
26 49
27 explicit Initializer(cryptauth::CryptAuthService* cryptauth_service); 50 Initializer(cryptauth::CryptAuthService* cryptauth_service,
51 std::unique_ptr<NotificationPresenter> notification_presenter,
52 PrefService* pref_service);
28 ~Initializer(); 53 ~Initializer();
29 54
55 void OnBluetoothAdapterFetched(
56 scoped_refptr<device::BluetoothAdapter> adapter);
57
30 cryptauth::CryptAuthService* cryptauth_service_; 58 cryptauth::CryptAuthService* cryptauth_service_;
59 std::unique_ptr<NotificationPresenter> notification_presenter_;
60 PrefService* pref_service_;
61
62 std::unique_ptr<TetherHostFetcher> tether_host_fetcher_;
63 std::unique_ptr<LocalDeviceDataProvider> local_device_data_provider_;
64 std::unique_ptr<cryptauth::RemoteBeaconSeedFetcher>
65 remote_beacon_seed_fetcher_;
66 std::unique_ptr<BleConnectionManager> ble_connection_manager_;
67 std::unique_ptr<HostScanDevicePrioritizer> host_scan_device_prioritizer_;
68 std::unique_ptr<WifiHotspotConnector> wifi_hotspot_connector_;
69 std::unique_ptr<ActiveHost> active_host_;
70 std::unique_ptr<ActiveHostNetworkStateUpdater>
71 active_host_network_state_updater_;
72 std::unique_ptr<DeviceIdTetherNetworkGuidMap>
73 device_id_tether_network_guid_map_;
74 std::unique_ptr<TetherConnector> tether_connector_;
75 std::unique_ptr<HostScanner> host_scanner_;
76
77 base::WeakPtrFactory<Initializer> weak_ptr_factory_;
31 78
32 DISALLOW_COPY_AND_ASSIGN(Initializer); 79 DISALLOW_COPY_AND_ASSIGN(Initializer);
33 }; 80 };
34 81
35 } // namespace tether 82 } // namespace tether
36 83
37 } // namespace chromeos 84 } // namespace chromeos
38 85
39 #endif // CHROMEOS_COMPONENTS_TETHER_INITIALIZER_H_ 86 #endif // CHROMEOS_COMPONENTS_TETHER_INITIALIZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698