OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 | 8 |
9 const localStrings = new LocalStrings(); | 9 const localStrings = new LocalStrings(); |
10 | 10 |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 * Display the "Delete Profile" dialog. | 198 * Display the "Delete Profile" dialog. |
199 * @param {Object} profileInfo The profile object of the profile to delete. | 199 * @param {Object} profileInfo The profile object of the profile to delete. |
200 * @private | 200 * @private |
201 */ | 201 */ |
202 showDeleteDialog_: function(profileInfo) { | 202 showDeleteDialog_: function(profileInfo) { |
203 ManageProfileOverlay.setProfileInfo(profileInfo); | 203 ManageProfileOverlay.setProfileInfo(profileInfo); |
204 $('manage-profile-overlay-manage').hidden = true; | 204 $('manage-profile-overlay-manage').hidden = true; |
205 $('manage-profile-overlay-delete').hidden = false; | 205 $('manage-profile-overlay-delete').hidden = false; |
206 $('delete-profile-message').textContent = | 206 $('delete-profile-message').textContent = |
207 localStrings.getStringF('deleteProfileMessage', profileInfo.name); | 207 localStrings.getStringF('deleteProfileMessage', profileInfo.name); |
| 208 $('delete-profile-message').style.backgroundImage = 'url("' + |
| 209 profileInfo.iconURL + '")'; |
208 | 210 |
209 // Intentionally don't show the URL in the location bar as we don't want | 211 // Intentionally don't show the URL in the location bar as we don't want |
210 // people trying to navigate here by hand. | 212 // people trying to navigate here by hand. |
211 OptionsPage.showPageByName('manageProfile', false); | 213 OptionsPage.showPageByName('manageProfile', false); |
212 }, | 214 }, |
213 }; | 215 }; |
214 | 216 |
215 // Forward public APIs to private implementations. | 217 // Forward public APIs to private implementations. |
216 [ | 218 [ |
217 'receiveDefaultProfileIcons', | 219 'receiveDefaultProfileIcons', |
218 'receiveProfileNames', | 220 'receiveProfileNames', |
219 'setProfileInfo', | 221 'setProfileInfo', |
220 'showManageDialog', | 222 'showManageDialog', |
221 'showDeleteDialog', | 223 'showDeleteDialog', |
222 ].forEach(function(name) { | 224 ].forEach(function(name) { |
223 ManageProfileOverlay[name] = function(value) { | 225 ManageProfileOverlay[name] = function(value) { |
224 ManageProfileOverlay.getInstance()[name + '_'](value); | 226 ManageProfileOverlay.getInstance()[name + '_'](value); |
225 }; | 227 }; |
226 }); | 228 }); |
227 | 229 |
228 // Export | 230 // Export |
229 return { | 231 return { |
230 ManageProfileOverlay: ManageProfileOverlay | 232 ManageProfileOverlay: ManageProfileOverlay |
231 }; | 233 }; |
232 }); | 234 }); |
OLD | NEW |