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

Unified Diff: chrome/browser/resources/options/chromeos/change_picture_options.js

Issue 10969032: [cros] Avatar picker: various fixes for web camera problems. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/chromeos/user_images_grid.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/options/chromeos/change_picture_options.js
diff --git a/chrome/browser/resources/options/chromeos/change_picture_options.js b/chrome/browser/resources/options/chromeos/change_picture_options.js
index b70d55c1ebb7c65ed68710f260dc4db619939fde..38dff087d780856a13511ef9c399b791ad7340ac 100644
--- a/chrome/browser/resources/options/chromeos/change_picture_options.js
+++ b/chrome/browser/resources/options/chromeos/change_picture_options.js
@@ -393,8 +393,9 @@ cr.define('options', function() {
chrome.send('selectImage', [url]);
}
// 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') {
imageGrid.checkCameraPresence(
function() { // When present.
// Start capture if camera is still the selected item.
@@ -403,8 +404,7 @@ cr.define('options', function() {
function() { // When absent.
return true; // Check again after some time.
});
- } else if (imageGrid.selectionType != 'camera' &&
- imageGrid.cameraOnline) {
+ } else {
imageGrid.stopCamera();
}
}
« no previous file with comments | « chrome/browser/resources/chromeos/user_images_grid.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698