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

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

Issue 10986046: Merge 158045 - [cros] Avatar picker: various fixes for web camera problems. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1271/src/
Patch Set: 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
===================================================================
--- chrome/browser/resources/options/chromeos/change_picture_options.js (revision 158765)
+++ chrome/browser/resources/options/chromeos/change_picture_options.js (working copy)
@@ -392,8 +392,9 @@
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.
@@ -402,8 +403,7 @@
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