OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_NETWORK_NETWORK_HANDLER_H_ | 5 #ifndef CHROMEOS_NETWORK_NETWORK_HANDLER_H_ |
6 #define CHROMEOS_NETWORK_NETWORK_HANDLER_H_ | 6 #define CHROMEOS_NETWORK_NETWORK_HANDLER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/message_loop/message_loop_proxy.h" | 11 #include "base/message_loop/message_loop_proxy.h" |
12 #include "chromeos/chromeos_export.h" | 12 #include "chromeos/chromeos_export.h" |
13 | 13 |
14 namespace chromeos { | 14 namespace chromeos { |
15 | 15 |
16 class ClientCertResolver; | 16 class ClientCertResolver; |
17 class GeolocationHandler; | 17 class GeolocationHandler; |
18 class ManagedNetworkConfigurationHandler; | 18 class ManagedNetworkConfigurationHandler; |
| 19 class NetworkActivationHandler; |
19 class NetworkCertMigrator; | 20 class NetworkCertMigrator; |
20 class NetworkConfigurationHandler; | 21 class NetworkConfigurationHandler; |
21 class NetworkConnectionHandler; | 22 class NetworkConnectionHandler; |
22 class NetworkDeviceHandler; | 23 class NetworkDeviceHandler; |
23 class NetworkProfileHandler; | 24 class NetworkProfileHandler; |
24 class NetworkStateHandler; | 25 class NetworkStateHandler; |
25 class NetworkSmsHandler; | 26 class NetworkSmsHandler; |
26 | 27 |
27 // Class for handling initialization and access to chromeos network handlers. | 28 // Class for handling initialization and access to chromeos network handlers. |
28 // This class should NOT be used in unit tests. Instead, construct individual | 29 // This class should NOT be used in unit tests. Instead, construct individual |
(...skipping 17 matching lines...) Expand all Loading... |
46 base::MessageLoopProxy* message_loop() { return message_loop_.get(); } | 47 base::MessageLoopProxy* message_loop() { return message_loop_.get(); } |
47 | 48 |
48 // Do not use these accessors within this module; all dependencies should be | 49 // Do not use these accessors within this module; all dependencies should be |
49 // explicit so that classes can be constructed explicitly in tests without | 50 // explicit so that classes can be constructed explicitly in tests without |
50 // NetworkHandler. | 51 // NetworkHandler. |
51 NetworkStateHandler* network_state_handler(); | 52 NetworkStateHandler* network_state_handler(); |
52 NetworkDeviceHandler* network_device_handler(); | 53 NetworkDeviceHandler* network_device_handler(); |
53 NetworkProfileHandler* network_profile_handler(); | 54 NetworkProfileHandler* network_profile_handler(); |
54 NetworkConfigurationHandler* network_configuration_handler(); | 55 NetworkConfigurationHandler* network_configuration_handler(); |
55 ManagedNetworkConfigurationHandler* managed_network_configuration_handler(); | 56 ManagedNetworkConfigurationHandler* managed_network_configuration_handler(); |
| 57 NetworkActivationHandler* network_activation_handler(); |
56 NetworkConnectionHandler* network_connection_handler(); | 58 NetworkConnectionHandler* network_connection_handler(); |
57 NetworkSmsHandler* network_sms_handler(); | 59 NetworkSmsHandler* network_sms_handler(); |
58 GeolocationHandler* geolocation_handler(); | 60 GeolocationHandler* geolocation_handler(); |
59 | 61 |
60 private: | 62 private: |
61 NetworkHandler(); | 63 NetworkHandler(); |
62 virtual ~NetworkHandler(); | 64 virtual ~NetworkHandler(); |
63 | 65 |
64 void Init(); | 66 void Init(); |
65 | 67 |
66 // The order of these determines the (inverse) destruction order. | 68 // The order of these determines the (inverse) destruction order. |
67 scoped_refptr<base::MessageLoopProxy> message_loop_; | 69 scoped_refptr<base::MessageLoopProxy> message_loop_; |
68 scoped_ptr<NetworkStateHandler> network_state_handler_; | 70 scoped_ptr<NetworkStateHandler> network_state_handler_; |
69 scoped_ptr<NetworkDeviceHandler> network_device_handler_; | 71 scoped_ptr<NetworkDeviceHandler> network_device_handler_; |
70 scoped_ptr<NetworkProfileHandler> network_profile_handler_; | 72 scoped_ptr<NetworkProfileHandler> network_profile_handler_; |
71 scoped_ptr<NetworkConfigurationHandler> network_configuration_handler_; | 73 scoped_ptr<NetworkConfigurationHandler> network_configuration_handler_; |
72 scoped_ptr<ManagedNetworkConfigurationHandler> | 74 scoped_ptr<ManagedNetworkConfigurationHandler> |
73 managed_network_configuration_handler_; | 75 managed_network_configuration_handler_; |
74 scoped_ptr<NetworkCertMigrator> network_cert_migrator_; | 76 scoped_ptr<NetworkCertMigrator> network_cert_migrator_; |
75 scoped_ptr<ClientCertResolver> client_cert_resolver_; | 77 scoped_ptr<ClientCertResolver> client_cert_resolver_; |
| 78 scoped_ptr<NetworkActivationHandler> network_activation_handler_; |
76 scoped_ptr<NetworkConnectionHandler> network_connection_handler_; | 79 scoped_ptr<NetworkConnectionHandler> network_connection_handler_; |
77 scoped_ptr<NetworkSmsHandler> network_sms_handler_; | 80 scoped_ptr<NetworkSmsHandler> network_sms_handler_; |
78 scoped_ptr<GeolocationHandler> geolocation_handler_; | 81 scoped_ptr<GeolocationHandler> geolocation_handler_; |
79 | 82 |
80 DISALLOW_COPY_AND_ASSIGN(NetworkHandler); | 83 DISALLOW_COPY_AND_ASSIGN(NetworkHandler); |
81 }; | 84 }; |
82 | 85 |
83 } // namespace chromeos | 86 } // namespace chromeos |
84 | 87 |
85 #endif // CHROMEOS_NETWORK_NETWORK_HANDLER_H_ | 88 #endif // CHROMEOS_NETWORK_NETWORK_HANDLER_H_ |
OLD | NEW |