| Index: chrome/browser/resources/chromeos/login/oobe_screen_user_image.js
|
| ===================================================================
|
| --- chrome/browser/resources/chromeos/login/oobe_screen_user_image.js (revision 158765)
|
| +++ chrome/browser/resources/chromeos/login/oobe_screen_user_image.js (working copy)
|
| @@ -475,9 +475,10 @@
|
|
|
| /**
|
| * Handles selection change.
|
| + * @param {cr.Event} e Selection change event.
|
| * @private
|
| */
|
| - handleSelect_: function() {
|
| + handleSelect_: function(e) {
|
| var imageGrid = $('user-image-grid');
|
| if (imageGrid.selectionType == 'camera' && imageGrid.cameraLive) {
|
| // No current image selected.
|
| @@ -487,8 +488,9 @@
|
| chrome.send('selectImage', [imageGrid.selectedItemUrl]);
|
| }
|
| // Start/stop camera on (de)selection.
|
| - if (!imageGrid.inProgramSelection) {
|
| - if (imageGrid.selectionType == 'camera' && !imageGrid.cameraOnline) {
|
| + if (!imageGrid.inProgramSelection &&
|
| + imageGrid.selectionType != e.oldSelectionType) {
|
| + if (imageGrid.selectionType == 'camera') {
|
| // Programmatic selection of camera item is done in
|
| // checkCameraPresence callback where streaming is started by itself.
|
| imageGrid.checkCameraPresence(
|
| @@ -499,8 +501,7 @@
|
| function() { // When absent.
|
| return true; // Check again after some time.
|
| });
|
| - } else if (imageGrid.selectionType != 'camera' &&
|
| - imageGrid.cameraOnline) {
|
| + } else {
|
| imageGrid.stopCamera();
|
| }
|
| }
|
|
|