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

Unified Diff: chrome/browser/resources/chromeos/user_images_grid.js

Issue 543493002: Compile chrome://settings, part 2: reduce from 950 to 400 errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@F_settings
Patch Set: rebase? rebase! Created 6 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 | « no previous file | chrome/browser/resources/options/autofill_edit_address_overlay.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/user_images_grid.js
diff --git a/chrome/browser/resources/chromeos/user_images_grid.js b/chrome/browser/resources/chromeos/user_images_grid.js
index c89d159f0aec301f301b3ad998c10cae24e56061..6bbc5a516ba98987cdae31716fe979e1534c435c 100644
--- a/chrome/browser/resources/chromeos/user_images_grid.js
+++ b/chrome/browser/resources/chromeos/user_images_grid.js
@@ -26,9 +26,10 @@ cr.define('options', function() {
/**
* Creates a new user images grid item.
- * @param {{url: string, title: string=, decorateFn: function=,
- * clickHandler: function=}} imageInfo User image URL, optional title,
- * decorator callback and click handler.
+ * @param {{url: string, title: (string|undefined),
+ * decorateFn: (!Function|undefined),
+ * clickHandler: (!Function|undefined)}} imageInfo User image URL,
+ * optional title, decorator callback and click handler.
* @constructor
* @extends {cr.ui.GridItem}
*/
@@ -241,7 +242,7 @@ cr.define('options', function() {
* Handles successful camera check.
* @param {function(): boolean} onAvailable Callback to call. If it returns
* |true|, capture is started immediately.
- * @param {MediaStream} stream Stream object as returned by getUserMedia.
+ * @param {!MediaStream} stream Stream object as returned by getUserMedia.
* @private
*/
handleCameraAvailable_: function(onAvailable, stream) {
@@ -312,7 +313,7 @@ cr.define('options', function() {
/**
* Current image captured from camera as data URL. Setting to null will
* return to the live camera stream.
- * @type {string=}
+ * @type {(string|undefined)}
*/
get cameraImage() {
return this.cameraImage_;
@@ -460,7 +461,8 @@ cr.define('options', function() {
takePhoto: function() {
if (!this.cameraOnline)
return false;
- var canvas = document.createElement('canvas');
+ var canvas = /** @type {HTMLCanvasElement} */(
+ document.createElement('canvas'));
canvas.width = CAPTURE_SIZE.width;
canvas.height = CAPTURE_SIZE.height;
this.captureFrame_(
@@ -591,7 +593,7 @@ cr.define('options', function() {
imageIndex,
imageInfo.decorateFn);
// Update image data with the reset of the keys from the old data.
- for (k in imageInfo) {
+ for (var k in imageInfo) {
if (!(k in newInfo))
newInfo[k] = imageInfo[k];
}
« no previous file with comments | « no previous file | chrome/browser/resources/options/autofill_edit_address_overlay.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698