OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_NETWORK_SCREEN_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_NETWORK_SCREEN_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_NETWORK_SCREEN_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_NETWORK_SCREEN_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 | 82 |
83 void SetApplicationLocale(const std::string& locale); | 83 void SetApplicationLocale(const std::string& locale); |
84 std::string GetApplicationLocale(); | 84 std::string GetApplicationLocale(); |
85 | 85 |
86 void SetInputMethod(const std::string& input_method); | 86 void SetInputMethod(const std::string& input_method); |
87 std::string GetInputMethod() const; | 87 std::string GetInputMethod() const; |
88 | 88 |
89 void SetTimezone(const std::string& timezone_id); | 89 void SetTimezone(const std::string& timezone_id); |
90 std::string GetTimezone() const; | 90 std::string GetTimezone() const; |
91 | 91 |
92 void CreateNetworkFromOnc(const std::string& onc_spec); | 92 // Currently We can only get unsecured Wifi network configuration from shark |
| 93 // that can be applied to remora. Returns the network ONC configuration. |
| 94 void GetConnectedWifiNetwork(std::string* out_onc_spec); |
| 95 void CreateAndConnectNetworkFromOnc(const std::string& onc_spec); |
93 | 96 |
94 void AddObserver(Observer* observer); | 97 void AddObserver(Observer* observer); |
95 void RemoveObserver(Observer* observer); | 98 void RemoveObserver(Observer* observer); |
96 | 99 |
97 private: | 100 private: |
98 friend class NetworkScreenTest; | 101 friend class NetworkScreenTest; |
99 FRIEND_TEST_ALL_PREFIXES(NetworkScreenTest, Timeout); | 102 FRIEND_TEST_ALL_PREFIXES(NetworkScreenTest, Timeout); |
100 FRIEND_TEST_ALL_PREFIXES(NetworkScreenTest, CanConnect); | 103 FRIEND_TEST_ALL_PREFIXES(NetworkScreenTest, CanConnect); |
101 | 104 |
102 // Subscribe to timezone changes. | 105 // Subscribe to timezone changes. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 scoped_ptr<locale_util::LanguageSwitchResult> language_switch_result); | 147 scoped_ptr<locale_util::LanguageSwitchResult> language_switch_result); |
145 | 148 |
146 // Callback for chromeos::ResolveUILanguageList() (from l10n_util). | 149 // Callback for chromeos::ResolveUILanguageList() (from l10n_util). |
147 void OnLanguageListResolved(scoped_ptr<base::ListValue> new_language_list, | 150 void OnLanguageListResolved(scoped_ptr<base::ListValue> new_language_list, |
148 const std::string& new_language_list_locale, | 151 const std::string& new_language_list_locale, |
149 const std::string& new_selected_language); | 152 const std::string& new_selected_language); |
150 | 153 |
151 // Callback when the system timezone settings is changed. | 154 // Callback when the system timezone settings is changed. |
152 void OnSystemTimezoneChanged(); | 155 void OnSystemTimezoneChanged(); |
153 | 156 |
| 157 // Called when connection the network from ONC failed. |
| 158 void OnConnectNetworkFromOncFailed(); |
| 159 |
154 // True if subscribed to network change notification. | 160 // True if subscribed to network change notification. |
155 bool is_network_subscribed_; | 161 bool is_network_subscribed_; |
156 | 162 |
157 // ID of the the network that we are waiting for. | 163 // ID of the the network that we are waiting for. |
158 base::string16 network_id_; | 164 base::string16 network_id_; |
159 | 165 |
160 // True if user pressed continue button so we should proceed with OOBE | 166 // True if user pressed continue button so we should proceed with OOBE |
161 // as soon as we are connected. | 167 // as soon as we are connected. |
162 bool continue_pressed_; | 168 bool continue_pressed_; |
163 | 169 |
(...skipping 20 matching lines...) Expand all Loading... |
184 base::ObserverList<Observer> observers_; | 190 base::ObserverList<Observer> observers_; |
185 | 191 |
186 base::WeakPtrFactory<NetworkScreen> weak_factory_; | 192 base::WeakPtrFactory<NetworkScreen> weak_factory_; |
187 | 193 |
188 DISALLOW_COPY_AND_ASSIGN(NetworkScreen); | 194 DISALLOW_COPY_AND_ASSIGN(NetworkScreen); |
189 }; | 195 }; |
190 | 196 |
191 } // namespace chromeos | 197 } // namespace chromeos |
192 | 198 |
193 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_NETWORK_SCREEN_H_ | 199 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_NETWORK_SCREEN_H_ |
OLD | NEW |