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 <memory> | 8 #include <memory> |
9 | 9 |
| 10 #include "base/callback_forward.h" |
10 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
11 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
12 #include "base/macros.h" | 13 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
14 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
15 #include "base/observer_list.h" | 16 #include "base/observer_list.h" |
16 #include "base/strings/string16.h" | 17 #include "base/strings/string16.h" |
17 #include "base/timer/timer.h" | 18 #include "base/timer/timer.h" |
18 #include "chrome/browser/chromeos/login/screens/base_screen.h" | 19 #include "chrome/browser/chromeos/login/screens/base_screen.h" |
19 #include "chrome/browser/chromeos/settings/cros_settings.h" | 20 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 21 #include "chromeos/network/network_handler_callbacks.h" |
20 #include "chromeos/network/network_state_handler_observer.h" | 22 #include "chromeos/network/network_state_handler_observer.h" |
21 #include "ui/base/ime/chromeos/input_method_manager.h" | 23 #include "ui/base/ime/chromeos/input_method_manager.h" |
22 | 24 |
23 namespace chromeos { | 25 namespace chromeos { |
24 | 26 |
25 class InputEventsBlocker; | 27 class InputEventsBlocker; |
26 class NetworkView; | 28 class NetworkView; |
27 class ScreenManager; | 29 class ScreenManager; |
28 | 30 |
29 namespace locale_util { | 31 namespace locale_util { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 const std::string& input_method); | 81 const std::string& input_method); |
80 std::string GetApplicationLocale(); | 82 std::string GetApplicationLocale(); |
81 std::string GetInputMethod() const; | 83 std::string GetInputMethod() const; |
82 | 84 |
83 void SetTimezone(const std::string& timezone_id); | 85 void SetTimezone(const std::string& timezone_id); |
84 std::string GetTimezone() const; | 86 std::string GetTimezone() const; |
85 | 87 |
86 // Currently We can only get unsecured Wifi network configuration from shark | 88 // Currently We can only get unsecured Wifi network configuration from shark |
87 // that can be applied to remora. Returns the network ONC configuration. | 89 // that can be applied to remora. Returns the network ONC configuration. |
88 void GetConnectedWifiNetwork(std::string* out_onc_spec); | 90 void GetConnectedWifiNetwork(std::string* out_onc_spec); |
89 void CreateAndConnectNetworkFromOnc(const std::string& onc_spec, | 91 void CreateAndConnectNetworkFromOnc( |
90 const base::Closure& success_callback, | 92 const std::string& onc_spec, |
91 const base::Closure& failed_callback); | 93 const base::Closure& success_callback, |
| 94 const network_handler::ErrorCallback& error_callback); |
92 | 95 |
93 void AddObserver(Observer* observer); | 96 void AddObserver(Observer* observer); |
94 void RemoveObserver(Observer* observer); | 97 void RemoveObserver(Observer* observer); |
95 | 98 |
96 private: | 99 private: |
97 friend class NetworkScreenTest; | 100 friend class NetworkScreenTest; |
98 friend class NetworkScreenUnitTest; | 101 friend class NetworkScreenUnitTest; |
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 FRIEND_TEST_ALL_PREFIXES(NetworkScreenUnitTest, ContinuesAutomatically); | 104 FRIEND_TEST_ALL_PREFIXES(NetworkScreenUnitTest, ContinuesAutomatically); |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 base::ObserverList<Observer> observers_; | 216 base::ObserverList<Observer> observers_; |
214 | 217 |
215 base::WeakPtrFactory<NetworkScreen> weak_factory_; | 218 base::WeakPtrFactory<NetworkScreen> weak_factory_; |
216 | 219 |
217 DISALLOW_COPY_AND_ASSIGN(NetworkScreen); | 220 DISALLOW_COPY_AND_ASSIGN(NetworkScreen); |
218 }; | 221 }; |
219 | 222 |
220 } // namespace chromeos | 223 } // namespace chromeos |
221 | 224 |
222 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_NETWORK_SCREEN_H_ | 225 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_NETWORK_SCREEN_H_ |
OLD | NEW |