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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 | 189 |
190 var profilesList = $('profiles-list'); | 190 var profilesList = $('profiles-list'); |
191 options.browser_options.ProfileList.decorate(profilesList); | 191 options.browser_options.ProfileList.decorate(profilesList); |
192 profilesList.autoExpands = true; | 192 profilesList.autoExpands = true; |
193 | 193 |
194 this.setProfilesInfo_(loadTimeData.getValue('profilesInfo')); | 194 this.setProfilesInfo_(loadTimeData.getValue('profilesInfo')); |
195 | 195 |
196 profilesList.addEventListener('change', | 196 profilesList.addEventListener('change', |
197 this.setProfileViewButtonsStatus_); | 197 this.setProfileViewButtonsStatus_); |
198 $('profiles-create').onclick = function(event) { | 198 $('profiles-create').onclick = function(event) { |
199 chrome.send('createProfileInfo'); | 199 ManageProfileOverlay.showCreateDialog(); |
200 }; | 200 }; |
201 $('profiles-manage').onclick = function(event) { | 201 $('profiles-manage').onclick = function(event) { |
202 ManageProfileOverlay.showManageDialog(); | 202 ManageProfileOverlay.showManageDialog(); |
203 }; | 203 }; |
204 $('profiles-delete').onclick = function(event) { | 204 $('profiles-delete').onclick = function(event) { |
205 var selectedProfile = self.getSelectedProfileItem_(); | 205 var selectedProfile = self.getSelectedProfileItem_(); |
206 if (selectedProfile) | 206 if (selectedProfile) |
207 ManageProfileOverlay.showDeleteDialog(selectedProfile); | 207 ManageProfileOverlay.showDeleteDialog(selectedProfile); |
208 }; | 208 }; |
209 } | 209 } |
(...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1345 BrowserOptions.getLoggedInUsername = function() { | 1345 BrowserOptions.getLoggedInUsername = function() { |
1346 return BrowserOptions.getInstance().username_; | 1346 return BrowserOptions.getInstance().username_; |
1347 }; | 1347 }; |
1348 } | 1348 } |
1349 | 1349 |
1350 // Export | 1350 // Export |
1351 return { | 1351 return { |
1352 BrowserOptions: BrowserOptions | 1352 BrowserOptions: BrowserOptions |
1353 }; | 1353 }; |
1354 }); | 1354 }); |
OLD | NEW |