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 cr.define('options', function() { | 5 cr.define('options', function() { |
6 var OptionsPage = options.OptionsPage; | 6 var OptionsPage = options.OptionsPage; |
7 var Page = cr.ui.pageManager.Page; | 7 var Page = cr.ui.pageManager.Page; |
8 var PageManager = cr.ui.pageManager.PageManager; | 8 var PageManager = cr.ui.pageManager.PageManager; |
9 var ArrayDataModel = cr.ui.ArrayDataModel; | 9 var ArrayDataModel = cr.ui.ArrayDataModel; |
10 var RepeatingButton = cr.ui.RepeatingButton; | 10 var RepeatingButton = cr.ui.RepeatingButton; |
(...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1018 syncData.hasUnrecoverableError || | 1018 syncData.hasUnrecoverableError || |
1019 (!syncData.setupCompleted && !$('sync-action-link').hidden); | 1019 (!syncData.setupCompleted && !$('sync-action-link').hidden); |
1020 }, | 1020 }, |
1021 | 1021 |
1022 /** | 1022 /** |
1023 * Update the UI depending on whether the current profile has a pairing for | 1023 * Update the UI depending on whether the current profile has a pairing for |
1024 * Easy Unlock. | 1024 * Easy Unlock. |
1025 * @param {boolean} hasPairing True if the current profile has a pairing. | 1025 * @param {boolean} hasPairing True if the current profile has a pairing. |
1026 */ | 1026 */ |
1027 updateEasyUnlock_: function(hasPairing) { | 1027 updateEasyUnlock_: function(hasPairing) { |
1028 // Hide "Set up" UI when the language is not en-US. | |
1029 // TODO(xiyuan): Remove this after M38. | |
1030 if (loadTimeData.getBoolean('easyUnlockAllowed')) { | |
1031 $('easy-unlock-section').hidden = | |
1032 !hasPairing && navigator.language != 'en-US'; | |
1033 } | |
1034 | |
1035 $('easy-unlock-setup').hidden = hasPairing; | 1028 $('easy-unlock-setup').hidden = hasPairing; |
1036 $('easy-unlock-enable').hidden = !hasPairing; | 1029 $('easy-unlock-enable').hidden = !hasPairing; |
1037 if (!hasPairing && EasyUnlockTurnOffOverlay.getInstance().visible) { | 1030 if (!hasPairing && EasyUnlockTurnOffOverlay.getInstance().visible) { |
1038 EasyUnlockTurnOffOverlay.dismiss(); | 1031 EasyUnlockTurnOffOverlay.dismiss(); |
1039 } | 1032 } |
1040 }, | 1033 }, |
1041 | 1034 |
1042 /** | 1035 /** |
1043 * Update the UI depending on whether the current profile manages any | 1036 * Update the UI depending on whether the current profile manages any |
1044 * supervised users. | 1037 * supervised users. |
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2003 } | 1996 } |
2004 button.textContent = loadTimeData.getString(strId); | 1997 button.textContent = loadTimeData.getString(strId); |
2005 }; | 1998 }; |
2006 } | 1999 } |
2007 | 2000 |
2008 // Export | 2001 // Export |
2009 return { | 2002 return { |
2010 BrowserOptions: BrowserOptions | 2003 BrowserOptions: BrowserOptions |
2011 }; | 2004 }; |
2012 }); | 2005 }); |
OLD | NEW |