Chromium Code Reviews| 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 172 | 172 |
| 173 // Users section. | 173 // Users section. |
| 174 if (loadTimeData.valueExists('profilesInfo')) { | 174 if (loadTimeData.valueExists('profilesInfo')) { |
| 175 $('profiles-section').hidden = false; | 175 $('profiles-section').hidden = false; |
| 176 | 176 |
| 177 var profilesList = $('profiles-list'); | 177 var profilesList = $('profiles-list'); |
| 178 options.browser_options.ProfileList.decorate(profilesList); | 178 options.browser_options.ProfileList.decorate(profilesList); |
| 179 profilesList.autoExpands = true; | 179 profilesList.autoExpands = true; |
| 180 | 180 |
| 181 this.setProfilesInfo_(loadTimeData.getValue('profilesInfo')); | 181 this.setProfilesInfo_(loadTimeData.getValue('profilesInfo')); |
| 182 chrome.send('requestProfilesInfo'); | |
|
Bernhard Bauer
2013/08/09 15:42:21
Maybe add a comment now that the data we have in l
ibra
2013/08/09 16:29:55
Done.
| |
| 182 | 183 |
| 183 profilesList.addEventListener('change', | 184 profilesList.addEventListener('change', |
| 184 this.setProfileViewButtonsStatus_); | 185 this.setProfileViewButtonsStatus_); |
| 185 $('profiles-create').onclick = function(event) { | 186 $('profiles-create').onclick = function(event) { |
| 186 ManageProfileOverlay.showCreateDialog(); | 187 ManageProfileOverlay.showCreateDialog(); |
| 187 }; | 188 }; |
| 188 if (OptionsPage.isSettingsApp()) { | 189 if (OptionsPage.isSettingsApp()) { |
| 189 $('profiles-app-list-switch').onclick = function(event) { | 190 $('profiles-app-list-switch').onclick = function(event) { |
| 190 var selectedProfile = self.getSelectedProfileItem_(); | 191 var selectedProfile = self.getSelectedProfileItem_(); |
| 191 chrome.send('switchAppListProfile', [selectedProfile.filePath]); | 192 chrome.send('switchAppListProfile', [selectedProfile.filePath]); |
| (...skipping 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1504 BrowserOptions.getLoggedInUsername = function() { | 1505 BrowserOptions.getLoggedInUsername = function() { |
| 1505 return BrowserOptions.getInstance().username_; | 1506 return BrowserOptions.getInstance().username_; |
| 1506 }; | 1507 }; |
| 1507 } | 1508 } |
| 1508 | 1509 |
| 1509 // Export | 1510 // Export |
| 1510 return { | 1511 return { |
| 1511 BrowserOptions: BrowserOptions | 1512 BrowserOptions: BrowserOptions |
| 1512 }; | 1513 }; |
| 1513 }); | 1514 }); |
| OLD | NEW |