| 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 /** | 5 /** |
| 6 * @fileoverview Offline message screen implementation. | 6 * @fileoverview Offline message screen implementation. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 cr.define('login', function() { | 9 cr.define('login', function() { |
| 10 // Screens that should have offline message overlay. | 10 // Screens that should have offline message overlay. |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 | 197 |
| 198 if (isUnderCaptivePortal && !isProxyError) { | 198 if (isUnderCaptivePortal && !isProxyError) { |
| 199 // Do not bother a user with obsessive captive portal showing. This | 199 // Do not bother a user with obsessive captive portal showing. This |
| 200 // check makes captive portal being shown only once: either when error | 200 // check makes captive portal being shown only once: either when error |
| 201 // screen is shown for the first time or when switching from another | 201 // screen is shown for the first time or when switching from another |
| 202 // error screen (offline, proxy). | 202 // error screen (offline, proxy). |
| 203 if (!isShown || | 203 if (!isShown || |
| 204 !offlineMessage.classList.contains('show-captive-portal')) { | 204 !offlineMessage.classList.contains('show-captive-portal')) { |
| 205 // In case of timeout we're suspecting that network might be | 205 // In case of timeout we're suspecting that network might be |
| 206 // a captive portal but would like to check that first. | 206 // a captive portal but would like to check that first. |
| 207 // Otherwise (signal from flimflam / generate_204 got redirected) | 207 // Otherwise (signal from shill / generate_204 got redirected) |
| 208 // show dialog right away. | 208 // show dialog right away. |
| 209 if (isTimeout) | 209 if (isTimeout) |
| 210 chrome.send('fixCaptivePortal'); | 210 chrome.send('fixCaptivePortal'); |
| 211 else | 211 else |
| 212 chrome.send('showCaptivePortal'); | 212 chrome.send('showCaptivePortal'); |
| 213 } | 213 } |
| 214 } else { | 214 } else { |
| 215 chrome.send('hideCaptivePortal'); | 215 chrome.send('hideCaptivePortal'); |
| 216 } | 216 } |
| 217 | 217 |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 * via template. | 357 * via template. |
| 358 */ | 358 */ |
| 359 ErrorMessageScreen.updateLocalizedContent = function() { | 359 ErrorMessageScreen.updateLocalizedContent = function() { |
| 360 $('error-message').updateLocalizedContent_(); | 360 $('error-message').updateLocalizedContent_(); |
| 361 }; | 361 }; |
| 362 | 362 |
| 363 return { | 363 return { |
| 364 ErrorMessageScreen: ErrorMessageScreen | 364 ErrorMessageScreen: ErrorMessageScreen |
| 365 }; | 365 }; |
| 366 }); | 366 }); |
| OLD | NEW |