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

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

Issue 2751333005: MD Settings: changePicture: focus container after photo. (Closed)
Patch Set: Created 3 years, 9 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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 this.selectImage_(image); 335 this.selectImage_(image);
336 }, 336 },
337 337
338 /** 338 /**
339 * Handle photo captured event, which contains the data URL of the image. 339 * Handle photo captured event, which contains the data URL of the image.
340 * @param {!{detail: !{photoDataUrl: string}}} event 340 * @param {!{detail: !{photoDataUrl: string}}} event
341 * containing a data URL. 341 * containing a data URL.
342 */ 342 */
343 onPhotoTaken_: function(event) { 343 onPhotoTaken_: function(event) {
344 this.browserProxy_.photoTaken(event.detail.photoDataUrl); 344 this.browserProxy_.photoTaken(event.detail.photoDataUrl);
345 this.$.container.focus();
345 }, 346 },
346 347
347 /** 348 /**
348 * Discard currently selected Old image. Selects the first default icon. 349 * Discard currently selected Old image. Selects the first default icon.
349 * Returns to the camera stream if the user had just taken a picture. 350 * Returns to the camera stream if the user had just taken a picture.
350 * @private 351 * @private
351 */ 352 */
352 onTapDiscardOldImage_: function() { 353 onTapDiscardOldImage_: function() {
353 this.oldImageUrl_ = ''; 354 this.oldImageUrl_ = '';
354 355
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 */ 448 */
448 getAuthorWebsite_: function(selectedItem, defaultImages) { 449 getAuthorWebsite_: function(selectedItem, defaultImages) {
449 if (!this.isAuthorCreditShown_(selectedItem)) 450 if (!this.isAuthorCreditShown_(selectedItem))
450 return ''; 451 return '';
451 452
452 assert(selectedItem.dataset.defaultImageIndex !== null && 453 assert(selectedItem.dataset.defaultImageIndex !== null &&
453 selectedItem.dataset.defaultImageIndex < defaultImages.length); 454 selectedItem.dataset.defaultImageIndex < defaultImages.length);
454 return defaultImages[selectedItem.dataset.defaultImageIndex].website; 455 return defaultImages[selectedItem.dataset.defaultImageIndex].website;
455 }, 456 },
456 }); 457 });
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