| 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 ArrayDataModel = cr.ui.ArrayDataModel; | 7 var ArrayDataModel = cr.ui.ArrayDataModel; |
| 8 var RepeatingButton = cr.ui.RepeatingButton; | 8 var RepeatingButton = cr.ui.RepeatingButton; |
| 9 | 9 |
| 10 // | 10 // |
| (...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 980 * filePath: "/path/to/profile/data/on/disk", | 980 * filePath: "/path/to/profile/data/on/disk", |
| 981 * isCurrentProfile: false | 981 * isCurrentProfile: false |
| 982 * }; | 982 * }; |
| 983 * @private | 983 * @private |
| 984 */ | 984 */ |
| 985 setProfilesInfo_: function(profiles) { | 985 setProfilesInfo_: function(profiles) { |
| 986 this.setProfileViewSingle_(profiles.length); | 986 this.setProfileViewSingle_(profiles.length); |
| 987 // add it to the list, even if the list is hidden so we can access it | 987 // add it to the list, even if the list is hidden so we can access it |
| 988 // later. | 988 // later. |
| 989 $('profiles-list').dataModel = new ArrayDataModel(profiles); | 989 $('profiles-list').dataModel = new ArrayDataModel(profiles); |
| 990 // We got new data, close the open overlay if it's open. |
| 991 ManageProfileOverlay.getInstance().visible = false; |
| 990 this.setProfileViewButtonsStatus_(); | 992 this.setProfileViewButtonsStatus_(); |
| 991 }, | 993 }, |
| 992 | 994 |
| 993 setGtkThemeButtonEnabled_: function(enabled) { | 995 setGtkThemeButtonEnabled_: function(enabled) { |
| 994 if (!cr.isChromeOS && navigator.platform.match(/linux|BSD/i)) | 996 if (!cr.isChromeOS && navigator.platform.match(/linux|BSD/i)) |
| 995 $('themes-GTK-button').disabled = !enabled; | 997 $('themes-GTK-button').disabled = !enabled; |
| 996 }, | 998 }, |
| 997 | 999 |
| 998 setThemesResetButtonEnabled_: function(enabled) { | 1000 setThemesResetButtonEnabled_: function(enabled) { |
| 999 $('themes-reset').disabled = !enabled; | 1001 $('themes-reset').disabled = !enabled; |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1404 BrowserOptions.getLoggedInUsername = function() { | 1406 BrowserOptions.getLoggedInUsername = function() { |
| 1405 return BrowserOptions.getInstance().username_; | 1407 return BrowserOptions.getInstance().username_; |
| 1406 }; | 1408 }; |
| 1407 } | 1409 } |
| 1408 | 1410 |
| 1409 // Export | 1411 // Export |
| 1410 return { | 1412 return { |
| 1411 BrowserOptions: BrowserOptions | 1413 BrowserOptions: BrowserOptions |
| 1412 }; | 1414 }; |
| 1413 }); | 1415 }); |
| OLD | NEW |