Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1200)

Side by Side Diff: chrome/browser/resources/options/manage_profile_overlay.js

Issue 8715009: Add profile avatar to profile delete dialog. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Removed an extra ; from the css file. Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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-avatar').src = profileInfo.iconURL;
208 209
209 // Intentionally don't show the URL in the location bar as we don't want 210 // Intentionally don't show the URL in the location bar as we don't want
210 // people trying to navigate here by hand. 211 // people trying to navigate here by hand.
211 OptionsPage.showPageByName('manageProfile', false); 212 OptionsPage.showPageByName('manageProfile', false);
212 }, 213 },
213 }; 214 };
214 215
215 // Forward public APIs to private implementations. 216 // Forward public APIs to private implementations.
216 [ 217 [
217 'receiveDefaultProfileIcons', 218 'receiveDefaultProfileIcons',
218 'receiveProfileNames', 219 'receiveProfileNames',
219 'setProfileInfo', 220 'setProfileInfo',
220 'showManageDialog', 221 'showManageDialog',
221 'showDeleteDialog', 222 'showDeleteDialog',
222 ].forEach(function(name) { 223 ].forEach(function(name) {
223 ManageProfileOverlay[name] = function(value) { 224 ManageProfileOverlay[name] = function(value) {
224 ManageProfileOverlay.getInstance()[name + '_'](value); 225 ManageProfileOverlay.getInstance()[name + '_'](value);
225 }; 226 };
226 }); 227 });
227 228
228 // Export 229 // Export
229 return { 230 return {
230 ManageProfileOverlay: ManageProfileOverlay 231 ManageProfileOverlay: ManageProfileOverlay
231 }; 232 };
232 }); 233 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698