| Index: chrome/browser/resources/options/manage_profile_overlay.js
|
| diff --git a/chrome/browser/resources/options/manage_profile_overlay.js b/chrome/browser/resources/options/manage_profile_overlay.js
|
| index 5a931a9e6007d0df769557b5b8bbd9b0f46dc23d..d36be4bb26e6b0b13abef89d20c9f28601cf0a05 100644
|
| --- a/chrome/browser/resources/options/manage_profile_overlay.js
|
| +++ b/chrome/browser/resources/options/manage_profile_overlay.js
|
| @@ -43,6 +43,9 @@ cr.define('options', function() {
|
| var self = this;
|
| var iconGrid = $('manage-profile-icon-grid');
|
| options.ProfilesIconGrid.decorate(iconGrid);
|
| + iconGrid.addEventListener('change', function(e) {
|
| + self.onIconGridSelectionChanged_();
|
| + });
|
|
|
| $('manage-profile-name').oninput = this.onNameChanged_.bind(this);
|
| $('manage-profile-cancel').onclick =
|
| @@ -94,6 +97,16 @@ cr.define('options', function() {
|
| },
|
|
|
| /**
|
| + * Sets the name of the currently edited profile.
|
| + * @private
|
| + */
|
| + setProfileName_: function(name) {
|
| + if (this.profileInfo_)
|
| + this.profileInfo_.name = name;
|
| + $('manage-profile-name').value = name;
|
| + },
|
| +
|
| + /**
|
| * Set an array of default icon URLs. These will be added to the grid that
|
| * the user will use to choose their profile icon.
|
| * @param {Array.<string>} iconURLs An array of icon URLs.
|
| @@ -179,6 +192,16 @@ cr.define('options', function() {
|
| },
|
|
|
| /**
|
| + * Called when the selected icon in the icon grid changes.
|
| + * @private
|
| + */
|
| + onIconGridSelectionChanged_: function() {
|
| + var iconURL = $('manage-profile-icon-grid').selectedItem;
|
| + chrome.send('profileIconSelectionChanged',
|
| + [this.profileInfo_.filePath, iconURL]);
|
| + },
|
| +
|
| + /**
|
| * Display the "Manage Profile" dialog.
|
| * @param {Object} profileInfo The profile object of the profile to manage.
|
| * @private
|
| @@ -217,6 +240,7 @@ cr.define('options', function() {
|
| 'receiveDefaultProfileIcons',
|
| 'receiveProfileNames',
|
| 'setProfileInfo',
|
| + 'setProfileName',
|
| 'showManageDialog',
|
| 'showDeleteDialog',
|
| ].forEach(function(name) {
|
|
|