OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 EXTENSIONS_SHELL_BROWSER_SHELL_NETWORK_CONTROLLER_CHROMEOS_H_ | 5 #ifndef EXTENSIONS_SHELL_BROWSER_SHELL_NETWORK_CONTROLLER_CHROMEOS_H_ |
6 #define EXTENSIONS_SHELL_BROWSER_SHELL_NETWORK_CONTROLLER_CHROMEOS_H_ | 6 #define EXTENSIONS_SHELL_BROWSER_SHELL_NETWORK_CONTROLLER_CHROMEOS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 // This class must be instantiated after chromeos::DBusThreadManager and | 23 // This class must be instantiated after chromeos::DBusThreadManager and |
24 // destroyed before it. | 24 // destroyed before it. |
25 explicit ShellNetworkController(const std::string& preferred_network_name); | 25 explicit ShellNetworkController(const std::string& preferred_network_name); |
26 ~ShellNetworkController() override; | 26 ~ShellNetworkController() override; |
27 | 27 |
28 // chromeos::NetworkStateHandlerObserver overrides: | 28 // chromeos::NetworkStateHandlerObserver overrides: |
29 void NetworkListChanged() override; | 29 void NetworkListChanged() override; |
30 void NetworkConnectionStateChanged( | 30 void NetworkConnectionStateChanged( |
31 const chromeos::NetworkState* state) override; | 31 const chromeos::NetworkState* state) override; |
32 | 32 |
| 33 // Control whether the cellular network connection allows roaming. |
| 34 void SetCellularAllowRoaming(bool allow_roaming); |
| 35 |
33 private: | 36 private: |
34 // State of communication with the connection manager. | 37 // State of communication with the connection manager. |
35 enum State { | 38 enum State { |
36 // No in-progress requests. | 39 // No in-progress requests. |
37 STATE_IDLE = 0, | 40 STATE_IDLE = 0, |
38 // Waiting for the result of an attempt to connect to the preferred network. | 41 // Waiting for the result of an attempt to connect to the preferred network. |
39 STATE_WAITING_FOR_PREFERRED_RESULT, | 42 STATE_WAITING_FOR_PREFERRED_RESULT, |
40 // Waiting for the result of an attempt to connect to a non-preferred | 43 // Waiting for the result of an attempt to connect to a non-preferred |
41 // network. | 44 // network. |
42 STATE_WAITING_FOR_NON_PREFERRED_RESULT, | 45 STATE_WAITING_FOR_NON_PREFERRED_RESULT, |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 bool preferred_network_is_active_; | 80 bool preferred_network_is_active_; |
78 | 81 |
79 base::WeakPtrFactory<ShellNetworkController> weak_ptr_factory_; | 82 base::WeakPtrFactory<ShellNetworkController> weak_ptr_factory_; |
80 | 83 |
81 DISALLOW_COPY_AND_ASSIGN(ShellNetworkController); | 84 DISALLOW_COPY_AND_ASSIGN(ShellNetworkController); |
82 }; | 85 }; |
83 | 86 |
84 } // namespace extensions | 87 } // namespace extensions |
85 | 88 |
86 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_NETWORK_CONTROLLER_CHROMEOS_H_ | 89 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_NETWORK_CONTROLLER_CHROMEOS_H_ |
OLD | NEW |