| 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_UPDATE_SCREEN_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_UPDATE_SCREEN_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_UPDATE_SCREEN_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_UPDATE_SCREEN_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 | 109 |
| 110 // Returns an instance of the error screen. | 110 // Returns an instance of the error screen. |
| 111 ErrorScreen* GetErrorScreen(); | 111 ErrorScreen* GetErrorScreen(); |
| 112 | 112 |
| 113 void StartUpdateCheck(); | 113 void StartUpdateCheck(); |
| 114 void ShowErrorMessage(); | 114 void ShowErrorMessage(); |
| 115 void HideErrorMessage(); | 115 void HideErrorMessage(); |
| 116 void UpdateErrorMessage( | 116 void UpdateErrorMessage( |
| 117 const NetworkState* network, | 117 const NetworkState* network, |
| 118 const NetworkPortalDetector::CaptivePortalStatus status); | 118 const NetworkPortalDetector::CaptivePortalStatus status); |
| 119 |
| 120 void DelayErrorMessage(); |
| 121 |
| 119 // Timer for the interval to wait for the reboot. | 122 // Timer for the interval to wait for the reboot. |
| 120 // If reboot didn't happen - ask user to reboot manually. | 123 // If reboot didn't happen - ask user to reboot manually. |
| 121 base::OneShotTimer<UpdateScreen> reboot_timer_; | 124 base::OneShotTimer<UpdateScreen> reboot_timer_; |
| 122 | 125 |
| 123 // Returns a static InstanceSet. | 126 // Returns a static InstanceSet. |
| 124 typedef std::set<UpdateScreen*> InstanceSet; | 127 typedef std::set<UpdateScreen*> InstanceSet; |
| 125 static InstanceSet& GetInstanceSet(); | 128 static InstanceSet& GetInstanceSet(); |
| 126 | 129 |
| 127 // Current state of the update screen. | 130 // Current state of the update screen. |
| 128 State state_; | 131 State state_; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 // True if there was no notification from NetworkPortalDetector | 166 // True if there was no notification from NetworkPortalDetector |
| 164 // about state for the default network. | 167 // about state for the default network. |
| 165 bool is_first_detection_notification_; | 168 bool is_first_detection_notification_; |
| 166 | 169 |
| 167 // True if there was no notification about captive portal state for | 170 // True if there was no notification about captive portal state for |
| 168 // the default network. | 171 // the default network. |
| 169 bool is_first_portal_notification_; | 172 bool is_first_portal_notification_; |
| 170 | 173 |
| 171 scoped_ptr<ErrorScreensHistogramHelper> histogram_helper_; | 174 scoped_ptr<ErrorScreensHistogramHelper> histogram_helper_; |
| 172 | 175 |
| 176 // Timer for the captive portal detector to show portal login page. |
| 177 // If redirect did not happen during this delay, error message is shown |
| 178 // instead. |
| 179 base::OneShotTimer<UpdateScreen> error_message_timer_; |
| 180 |
| 173 base::WeakPtrFactory<UpdateScreen> weak_factory_; | 181 base::WeakPtrFactory<UpdateScreen> weak_factory_; |
| 174 | 182 |
| 175 DISALLOW_COPY_AND_ASSIGN(UpdateScreen); | 183 DISALLOW_COPY_AND_ASSIGN(UpdateScreen); |
| 176 }; | 184 }; |
| 177 | 185 |
| 178 } // namespace chromeos | 186 } // namespace chromeos |
| 179 | 187 |
| 180 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_UPDATE_SCREEN_H_ | 188 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_UPDATE_SCREEN_H_ |
| OLD | NEW |