| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 }); |
| OLD | NEW |