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

Side by Side Diff: chrome/browser/resources/settings/people_page/camera.js

Issue 1871073004: Settings People Revamp: Simplify Change Picture browsertests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@0138-settings-people-manage-profile-browser-tests
Patch Set: fix hitting the check (and merge origin/master) Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/settings/people_page/change_picture.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 'settings-camera' is the Polymer control used to take a picture from the 7 * 'settings-camera' is the Polymer control used to take a picture from the
8 * user webcam to use as a ChromeOS profile picture. 8 * user webcam to use as a ChromeOS profile picture.
9 */ 9 */
10 (function() { 10 (function() {
(...skipping 15 matching lines...) Expand all
26 ], 26 ],
27 27
28 properties: { 28 properties: {
29 /** 29 /**
30 * True if the user has selected the camera as the user image source. 30 * True if the user has selected the camera as the user image source.
31 * @type {boolean} 31 * @type {boolean}
32 */ 32 */
33 cameraActive: { 33 cameraActive: {
34 type: Boolean, 34 type: Boolean,
35 observer: 'cameraActiveChanged_', 35 observer: 'cameraActiveChanged_',
36 value: false,
36 }, 37 },
37 38
38 /** 39 /**
39 * True when the camera is actually streaming video. May be false even when 40 * True when the camera is actually streaming video. May be false even when
40 * the camera is present and shown, but still initializing. 41 * the camera is present and shown, but still initializing.
41 * @private {boolean} 42 * @private {boolean}
42 */ 43 */
43 cameraOnline_: { 44 cameraOnline_: {
44 type: Boolean, 45 type: Boolean,
45 value: false, 46 value: false,
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 canvas.height = CAPTURE_SIZE.height; 204 canvas.height = CAPTURE_SIZE.height;
204 var ctx = canvas.getContext('2d'); 205 var ctx = canvas.getContext('2d');
205 ctx.translate(CAPTURE_SIZE.width, 0); 206 ctx.translate(CAPTURE_SIZE.width, 0);
206 ctx.scale(-1.0, 1.0); 207 ctx.scale(-1.0, 1.0);
207 ctx.drawImage(source, 0, 0); 208 ctx.drawImage(source, 0, 0);
208 return canvas.toDataURL('image/png'); 209 return canvas.toDataURL('image/png');
209 }, 210 },
210 }); 211 });
211 212
212 })(); 213 })();
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/settings/people_page/change_picture.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698