| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 cr.define('options', function() { | 5 cr.define('options', function() { |
| 6 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; | 6 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; |
| 7 /** @const */ var Grid = cr.ui.Grid; | 7 /** @const */ var Grid = cr.ui.Grid; |
| 8 /** @const */ var GridItem = cr.ui.GridItem; | 8 /** @const */ var GridItem = cr.ui.GridItem; |
| 9 /** @const */ var GridSelectionController = cr.ui.GridSelectionController; | 9 /** @const */ var GridSelectionController = cr.ui.GridSelectionController; |
| 10 /** @const */ var ListSingleSelectionModel = cr.ui.ListSingleSelectionModel; | 10 /** @const */ var ListSingleSelectionModel = cr.ui.ListSingleSelectionModel; |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 // Cancel any pending getUserMedia() checks. | 239 // Cancel any pending getUserMedia() checks. |
| 240 this.cameraStartInProgress_ = false; | 240 this.cameraStartInProgress_ = false; |
| 241 }, | 241 }, |
| 242 | 242 |
| 243 /** | 243 /** |
| 244 * Handles successful camera check. | 244 * Handles successful camera check. |
| 245 * @param {function(): boolean} onAvailable Callback to call. If it returns | 245 * @param {function(): boolean} onAvailable Callback to call. If it returns |
| 246 * |true|, capture is started immediately. | 246 * |true|, capture is started immediately. |
| 247 * @param {!MediaStream} stream Stream object as returned by getUserMedia. | 247 * @param {!MediaStream} stream Stream object as returned by getUserMedia. |
| 248 * @private | 248 * @private |
| 249 * @suppress {deprecated} |
| 249 */ | 250 */ |
| 250 handleCameraAvailable_: function(onAvailable, stream) { | 251 handleCameraAvailable_: function(onAvailable, stream) { |
| 251 if (this.cameraStartInProgress_ && onAvailable()) { | 252 if (this.cameraStartInProgress_ && onAvailable()) { |
| 252 this.cameraVideo_.src = URL.createObjectURL(stream); | 253 this.cameraVideo_.src = URL.createObjectURL(stream); |
| 253 this.cameraStream_ = stream; | 254 this.cameraStream_ = stream; |
| 254 } else { | 255 } else { |
| 255 stream.stop(); | 256 stream.stop(); |
| 256 } | 257 } |
| 257 this.cameraStartInProgress_ = false; | 258 this.cameraStartInProgress_ = false; |
| 258 }, | 259 }, |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 644 UserImagesGrid.ButtonImages = { | 645 UserImagesGrid.ButtonImages = { |
| 645 TAKE_PHOTO: 'chrome://theme/IDR_BUTTON_USER_IMAGE_TAKE_PHOTO', | 646 TAKE_PHOTO: 'chrome://theme/IDR_BUTTON_USER_IMAGE_TAKE_PHOTO', |
| 646 CHOOSE_FILE: 'chrome://theme/IDR_BUTTON_USER_IMAGE_CHOOSE_FILE', | 647 CHOOSE_FILE: 'chrome://theme/IDR_BUTTON_USER_IMAGE_CHOOSE_FILE', |
| 647 PROFILE_PICTURE: 'chrome://theme/IDR_PROFILE_PICTURE_LOADING' | 648 PROFILE_PICTURE: 'chrome://theme/IDR_PROFILE_PICTURE_LOADING' |
| 648 }; | 649 }; |
| 649 | 650 |
| 650 return { | 651 return { |
| 651 UserImagesGrid: UserImagesGrid | 652 UserImagesGrid: UserImagesGrid |
| 652 }; | 653 }; |
| 653 }); | 654 }); |
| OLD | NEW |