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

Side by Side Diff: chrome/browser/resources/settings/people_page/change_picture.js

Issue 2622973002: MD Settings People: Fix ChromeOS Change Picture Profile Icon tooltip (Closed)
Patch Set: Created 3 years, 11 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 /** 5 /**
6 * Contains the possible types of Change Picture selections. 6 * Contains the possible types of Change Picture selections.
7 * @enum {string} 7 * @enum {string}
8 */ 8 */
9 var ChangePictureSelectionTypes = { 9 var ChangePictureSelectionTypes = {
10 CAMERA: 'camera', 10 CAMERA: 'camera',
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 }, 192 },
193 193
194 /** 194 /**
195 * Handler for the 'profile-image-changed' event. 195 * Handler for the 'profile-image-changed' event.
196 * @param {string} imageUrl 196 * @param {string} imageUrl
197 * @param {boolean} selected 197 * @param {boolean} selected
198 * @private 198 * @private
199 */ 199 */
200 receiveProfileImage_: function(imageUrl, selected) { 200 receiveProfileImage_: function(imageUrl, selected) {
201 this.profileImageUrl_ = imageUrl; 201 this.profileImageUrl_ = imageUrl;
202 this.$.profileImage.alt = this.i18n('profilePhoto'); 202 this.$.profileImage.title = this.i18n('profilePhoto');
203 203
204 if (!selected) 204 if (!selected)
205 return; 205 return;
206 206
207 this.fallbackImage_ = this.$.profileImage; 207 this.fallbackImage_ = this.$.profileImage;
208 208
209 // If user is currently taking a photo, do not steal the focus. 209 // If user is currently taking a photo, do not steal the focus.
210 if (!this.selectedItem_ || 210 if (!this.selectedItem_ ||
211 this.selectedItem_.dataset.type != ChangePictureSelectionTypes.CAMERA) { 211 this.selectedItem_.dataset.type != ChangePictureSelectionTypes.CAMERA) {
212 this.$.selector.select(this.$.selector.indexOf(this.$.profileImage)); 212 this.$.selector.select(this.$.selector.indexOf(this.$.profileImage));
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 */ 434 */
435 getAuthorWebsite_: function(selectedItem, defaultImages) { 435 getAuthorWebsite_: function(selectedItem, defaultImages) {
436 if (!this.isAuthorCreditShown_(selectedItem)) 436 if (!this.isAuthorCreditShown_(selectedItem))
437 return ''; 437 return '';
438 438
439 assert(selectedItem.dataset.defaultImageIndex !== null && 439 assert(selectedItem.dataset.defaultImageIndex !== null &&
440 selectedItem.dataset.defaultImageIndex < defaultImages.length); 440 selectedItem.dataset.defaultImageIndex < defaultImages.length);
441 return defaultImages[selectedItem.dataset.defaultImageIndex].website; 441 return defaultImages[selectedItem.dataset.defaultImageIndex].website;
442 }, 442 },
443 }); 443 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698