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 | 6 * @fileoverview |
7 * Class representing an entry in the host-list portion of the home screen. | 7 * Class representing an entry in the host-list portion of the home screen. |
8 */ | 8 */ |
9 | 9 |
10 'use strict'; | 10 'use strict'; |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 * @return {string} | 341 * @return {string} |
342 */ | 342 */ |
343 function formatHostOfflineReason(hostOfflineReason) { | 343 function formatHostOfflineReason(hostOfflineReason) { |
344 var knownReasonTags = [ | 344 var knownReasonTags = [ |
345 /*i18n-content*/ 'OFFLINE_REASON_INITIALIZATION_FAILED', | 345 /*i18n-content*/ 'OFFLINE_REASON_INITIALIZATION_FAILED', |
346 /*i18n-content*/ 'OFFLINE_REASON_INVALID_HOST_CONFIGURATION', | 346 /*i18n-content*/ 'OFFLINE_REASON_INVALID_HOST_CONFIGURATION', |
347 /*i18n-content*/ 'OFFLINE_REASON_INVALID_HOST_ID', | 347 /*i18n-content*/ 'OFFLINE_REASON_INVALID_HOST_ID', |
348 /*i18n-content*/ 'OFFLINE_REASON_INVALID_OAUTH_CREDENTIALS', | 348 /*i18n-content*/ 'OFFLINE_REASON_INVALID_OAUTH_CREDENTIALS', |
349 /*i18n-content*/ 'OFFLINE_REASON_INVALID_HOST_DOMAIN', | 349 /*i18n-content*/ 'OFFLINE_REASON_INVALID_HOST_DOMAIN', |
350 /*i18n-content*/ 'OFFLINE_REASON_LOGIN_SCREEN_NOT_SUPPORTED', | 350 /*i18n-content*/ 'OFFLINE_REASON_LOGIN_SCREEN_NOT_SUPPORTED', |
| 351 /*i18n-content*/ 'OFFLINE_REASON_POLICY_READ_ERROR', |
351 /*i18n-content*/ 'OFFLINE_REASON_USERNAME_MISMATCH' | 352 /*i18n-content*/ 'OFFLINE_REASON_USERNAME_MISMATCH' |
352 ]; | 353 ]; |
353 var offlineReasonTag = 'OFFLINE_REASON_' + hostOfflineReason; | 354 var offlineReasonTag = 'OFFLINE_REASON_' + hostOfflineReason; |
354 if (knownReasonTags.indexOf(offlineReasonTag) != (-1)) { | 355 if (knownReasonTags.indexOf(offlineReasonTag) != (-1)) { |
355 return chrome.i18n.getMessage(offlineReasonTag); | 356 return chrome.i18n.getMessage(offlineReasonTag); |
356 } else { | 357 } else { |
357 return chrome.i18n.getMessage( | 358 return chrome.i18n.getMessage( |
358 /*i18n-content*/ 'OFFLINE_REASON_UNKNOWN', | 359 /*i18n-content*/ 'OFFLINE_REASON_UNKNOWN', |
359 hostOfflineReason); | 360 hostOfflineReason); |
360 } | 361 } |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 var element = document.activeElement; | 447 var element = document.activeElement; |
447 while (element) { | 448 while (element) { |
448 if (element == this.tableRow) { | 449 if (element == this.tableRow) { |
449 this.tableRow.classList.add('child-focused'); | 450 this.tableRow.classList.add('child-focused'); |
450 return; | 451 return; |
451 } | 452 } |
452 element = element.parentNode; | 453 element = element.parentNode; |
453 } | 454 } |
454 this.tableRow.classList.remove('child-focused'); | 455 this.tableRow.classList.remove('child-focused'); |
455 }; | 456 }; |
OLD | NEW |