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

Side by Side Diff: third_party/WebKit/LayoutTests/imagecapture/resources/mock-imagecapture.js

Issue 2375543004: ImageCapture: wire |colorTemperature| set/get for Linux/Cros (Closed)
Patch Set: Created 4 years, 2 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
OLDNEW
1 "use strict"; 1 "use strict";
2 2
3 let mockImageCaptureReady = define( 3 let mockImageCaptureReady = define(
4 'mockImageCapture', 4 'mockImageCapture',
5 ['media/mojo/interfaces/image_capture.mojom', 5 ['media/mojo/interfaces/image_capture.mojom',
6 'mojo/public/js/bindings', 6 'mojo/public/js/bindings',
7 'mojo/public/js/connection', 7 'mojo/public/js/connection',
8 'content/public/renderer/interfaces', 8 'content/public/renderer/interfaces',
9 ], (imageCapture, bindings, connection, interfaces) => { 9 ], (imageCapture, bindings, connection, interfaces) => {
10 10
11 class MockImageCapture { 11 class MockImageCapture {
12 constructor() { 12 constructor() {
13 interfaces.addInterfaceOverrideForTesting( 13 interfaces.addInterfaceOverrideForTesting(
14 imageCapture.ImageCapture.name, 14 imageCapture.ImageCapture.name,
15 pipe => this.bindToPipe(pipe)); 15 pipe => this.bindToPipe(pipe));
16 16
17 this.capabilities_ = { capabilities : { 17 this.capabilities_ = { capabilities : {
18 iso : { min : 100, max : 12000, current : 400 }, 18 iso : { min : 100, max : 12000, current : 400 },
19 height : { min : 240, max : 2448, current : 240 }, 19 height : { min : 240, max : 2448, current : 240 },
20 width : { min : 320, max : 3264, current : 320 }, 20 width : { min : 320, max : 3264, current : 320 },
21 width : { min : 320, max : 3264, current : 320 }, 21 width : { min : 320, max : 3264, current : 320 },
22 zoom : { min : 0, max : 10, current : 5 }, 22 zoom : { min : 0, max : 10, current : 5 },
23 focus_mode : imageCapture.MeteringMode.MANUAL, 23 focus_mode : imageCapture.MeteringMode.MANUAL,
24 exposure_mode : imageCapture.MeteringMode.SINGLE_SHOT, 24 exposure_mode : imageCapture.MeteringMode.SINGLE_SHOT,
25 exposure_compensation : { min : -200, max : 200, current : 33}, 25 exposure_compensation : { min : -200, max : 200, current : 33},
26 white_balance_mode : imageCapture.MeteringMode.CONTINUOUS, 26 white_balance_mode : imageCapture.MeteringMode.CONTINUOUS,
27 fill_light_mode : imageCapture.FillLightMode.AUTO, 27 fill_light_mode : imageCapture.FillLightMode.AUTO,
28 red_eye_reduction : true, 28 red_eye_reduction : true,
29 color_temperature : { min : 2500, max : 6500, current : 6000 },
29 }}; 30 }};
30 this.settings_ = null; 31 this.settings_ = null;
31 } 32 }
32 33
33 bindToPipe(pipe) { 34 bindToPipe(pipe) {
34 this.stub_ = connection.bindHandleToStub(pipe, imageCapture.ImageCapture); 35 this.stub_ = connection.bindHandleToStub(pipe, imageCapture.ImageCapture);
35 bindings.StubBindings(this.stub_).delegate = this; 36 bindings.StubBindings(this.stub_).delegate = this;
36 } 37 }
37 38
38 getCapabilities(source_id) { 39 getCapabilities(source_id) {
(...skipping 14 matching lines...) Expand all
53 return this.capabilities_.capabilities; 54 return this.capabilities_.capabilities;
54 } 55 }
55 56
56 options() { 57 options() {
57 return this.settings_; 58 return this.settings_;
58 } 59 }
59 60
60 } 61 }
61 return new MockImageCapture(); 62 return new MockImageCapture();
62 }); 63 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698