| OLD | NEW |
| 1 "use strict"; | 1 "use strict"; |
| 2 | 2 |
| 3 let mockImageCaptureReady = define( | 3 let mockImageCaptureReady = define( |
| 4 'mockImageCapture', | 4 'mockImageCapture', |
| 5 ['media/capture/mojo/image_capture.mojom', | 5 ['media/capture/mojo/image_capture.mojom', |
| 6 'mojo/public/js/bindings', | 6 'mojo/public/js/bindings', |
| 7 'content/public/renderer/interfaces', | 7 'content/public/renderer/interfaces', |
| 8 ], (imageCapture, bindings, interfaces) => { | 8 ], (imageCapture, bindings, interfaces) => { |
| 9 | 9 |
| 10 class MockImageCapture { | 10 class MockImageCapture { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 fill_light_mode : [ imageCapture.FillLightMode.AUTO, | 26 fill_light_mode : [ imageCapture.FillLightMode.AUTO, |
| 27 imageCapture.FillLightMode.FLASH], | 27 imageCapture.FillLightMode.FLASH], |
| 28 red_eye_reduction : imageCapture.RedEyeReduction.CONTROLLABLE, | 28 red_eye_reduction : imageCapture.RedEyeReduction.CONTROLLABLE, |
| 29 torch : false, | 29 torch : false, |
| 30 color_temperature : | 30 color_temperature : |
| 31 { min : 2500.0, max : 6500.0, current : 6000.0, step : 1000.0 }, | 31 { min : 2500.0, max : 6500.0, current : 6000.0, step : 1000.0 }, |
| 32 brightness : { min : 1.0, max : 10.0, current : 5.0, step : 1.0 }, | 32 brightness : { min : 1.0, max : 10.0, current : 5.0, step : 1.0 }, |
| 33 contrast : { min : 2.0, max : 9.0, current : 5.0, step : 1.0 }, | 33 contrast : { min : 2.0, max : 9.0, current : 5.0, step : 1.0 }, |
| 34 saturation : { min : 3.0, max : 8.0, current : 6.0, step : 1.0 }, | 34 saturation : { min : 3.0, max : 8.0, current : 6.0, step : 1.0 }, |
| 35 sharpness : { min : 4.0, max : 7.0, current : 7.0, step : 1.0 }, | 35 sharpness : { min : 4.0, max : 7.0, current : 7.0, step : 1.0 }, |
| 36 points_of_interest : [], | 36 points_of_interest : [{x : 0.4, y : 0.6}], |
| 37 }}; | 37 }}; |
| 38 this.settings_ = null; | 38 this.settings_ = null; |
| 39 this.bindingSet_ = new bindings.BindingSet(imageCapture.ImageCapture); | 39 this.bindingSet_ = new bindings.BindingSet(imageCapture.ImageCapture); |
| 40 } | 40 } |
| 41 | 41 |
| 42 getCapabilities(source_id) { | 42 getCapabilities(source_id) { |
| 43 return Promise.resolve(this.state_); | 43 return Promise.resolve(this.state_); |
| 44 } | 44 } |
| 45 | 45 |
| 46 setOptions(source_id, settings) { | 46 setOptions(source_id, settings) { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 return this.state_.capabilities; | 104 return this.state_.capabilities; |
| 105 } | 105 } |
| 106 | 106 |
| 107 options() { | 107 options() { |
| 108 return this.settings_; | 108 return this.settings_; |
| 109 } | 109 } |
| 110 | 110 |
| 111 } | 111 } |
| 112 return new MockImageCapture(); | 112 return new MockImageCapture(); |
| 113 }); | 113 }); |
| OLD | NEW |