| OLD | NEW |
| 1 "use strict"; | 1 "use strict"; |
| 2 | 2 |
| 3 let mockBarcodeDetectionReady = define( | 3 let mockBarcodeDetectionReady = define( |
| 4 'mockBarcodeDetection', | 4 'mockBarcodeDetection', |
| 5 ['services/shape_detection/public/interfaces/barcodedetection.mojom', | 5 ['services/shape_detection/public/interfaces/barcodedetection.mojom', |
| 6 'mojo/public/js/bindings', | 6 'mojo/public/js/bindings', |
| 7 'mojo/public/js/core', | 7 'mojo/public/js/core', |
| 8 'content/public/renderer/frame_interfaces', | 8 'content/public/renderer/interfaces', |
| 9 ], (barcodeDetection, bindings, mojo, interfaces) => { | 9 ], (barcodeDetection, bindings, mojo, interfaces) => { |
| 10 | 10 |
| 11 class MockBarcodeDetection { | 11 class MockBarcodeDetection { |
| 12 constructor() { | 12 constructor() { |
| 13 this.bindingSet_ = new bindings.BindingSet( | 13 this.bindingSet_ = new bindings.BindingSet( |
| 14 barcodeDetection.BarcodeDetection); | 14 barcodeDetection.BarcodeDetection); |
| 15 | 15 |
| 16 interfaces.addInterfaceOverrideForTesting( | 16 interfaces.addInterfaceOverrideForTesting( |
| 17 barcodeDetection.BarcodeDetection.name, | 17 barcodeDetection.BarcodeDetection.name, |
| 18 handle => this.bindingSet_.addBinding(this, handle)); | 18 handle => this.bindingSet_.addBinding(this, handle)); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 47 }); | 47 }); |
| 48 mojo.unmapBuffer(receivedStruct.buffer); | 48 mojo.unmapBuffer(receivedStruct.buffer); |
| 49 } | 49 } |
| 50 | 50 |
| 51 getFrameData() { | 51 getFrameData() { |
| 52 return this.buffer_data_; | 52 return this.buffer_data_; |
| 53 } | 53 } |
| 54 } | 54 } |
| 55 return new MockBarcodeDetection(); | 55 return new MockBarcodeDetection(); |
| 56 }); | 56 }); |
| OLD | NEW |