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

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

Issue 2658723002: MD Settings: Remove some ES6 leftovers from CrOS code that break uglify. (Closed)
Patch Set: Created 3 years, 11 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 | « chrome/browser/resources/settings/languages_page/manage_input_methods_page.js ('k') | no next file » | 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 this.cameraStartInProgress_ = false; 134 this.cameraStartInProgress_ = false;
135 }, 135 },
136 136
137 /** 137 /**
138 * Stops all video tracks associated with a MediaStream object. 138 * Stops all video tracks associated with a MediaStream object.
139 * @param {!MediaStream} stream 139 * @param {!MediaStream} stream
140 * @private 140 * @private
141 */ 141 */
142 stopVideoTracks_: function(stream) { 142 stopVideoTracks_: function(stream) {
143 var tracks = stream.getVideoTracks(); 143 var tracks = stream.getVideoTracks();
144 for (var t of tracks) 144 for (var i = 0; i < tracks.length; i++)
145 t.stop(); 145 tracks[i].stop();
146 }, 146 },
147 147
148 /** 148 /**
149 * Flip the live camera stream. 149 * Flip the live camera stream.
150 * @private 150 * @private
151 */ 151 */
152 onTapFlipPhoto_: function() { 152 onTapFlipPhoto_: function() {
153 this.isFlipped_ = !this.isFlipped_; 153 this.isFlipped_ = !this.isFlipped_;
154 this.$.userImageStreamCrop.classList.toggle('flip-x', this.isFlipped_); 154 this.$.userImageStreamCrop.classList.toggle('flip-x', this.isFlipped_);
155 155
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 canvas.height = CAPTURE_SIZE.height; 200 canvas.height = CAPTURE_SIZE.height;
201 var ctx = canvas.getContext('2d'); 201 var ctx = canvas.getContext('2d');
202 ctx.translate(CAPTURE_SIZE.width, 0); 202 ctx.translate(CAPTURE_SIZE.width, 0);
203 ctx.scale(-1.0, 1.0); 203 ctx.scale(-1.0, 1.0);
204 ctx.drawImage(source, 0, 0); 204 ctx.drawImage(source, 0, 0);
205 return canvas.toDataURL('image/png'); 205 return canvas.toDataURL('image/png');
206 }, 206 },
207 }); 207 });
208 208
209 })(); 209 })();
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/languages_page/manage_input_methods_page.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698