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

Unified Diff: third_party/WebKit/LayoutTests/shapedetection/resources/mock-barcodedetection.js

Issue 2571903003: Mojo JS bindings: switch most usage of "connection"/"router" module to "bindings". (Closed)
Patch Set: remove the changes to web_ui_mojo.js which seemed to cause flakiness. Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/shapedetection/resources/mock-barcodedetection.js
diff --git a/third_party/WebKit/LayoutTests/shapedetection/resources/mock-barcodedetection.js b/third_party/WebKit/LayoutTests/shapedetection/resources/mock-barcodedetection.js
index ed870babd3f34f07c3743cc48a72a75c2af133d2..8395550f40c19562c312e7f1b9839afffc3bf72f 100644
--- a/third_party/WebKit/LayoutTests/shapedetection/resources/mock-barcodedetection.js
+++ b/third_party/WebKit/LayoutTests/shapedetection/resources/mock-barcodedetection.js
@@ -4,22 +4,18 @@ let mockBarcodeDetectionReady = define(
'mockBarcodeDetection',
['third_party/WebKit/public/platform/modules/shapedetection/barcodedetection.mojom',
'mojo/public/js/bindings',
- 'mojo/public/js/connection',
'mojo/public/js/core',
'content/public/renderer/frame_interfaces',
- ], (barcodeDetection, bindings, connection, mojo, interfaces) => {
+ ], (barcodeDetection, bindings, mojo, interfaces) => {
class MockBarcodeDetection {
constructor() {
+ this.bindingSet_ = new bindings.BindingSet(
+ barcodeDetection.BarcodeDetection);
+
interfaces.addInterfaceOverrideForTesting(
barcodeDetection.BarcodeDetection.name,
- pipe => this.bindToPipe(pipe));
- }
-
- bindToPipe(pipe) {
- this.stub_ = connection.bindHandleToStub(pipe,
- barcodeDetection.BarcodeDetection);
- bindings.StubBindings(this.stub_).delegate = this;
+ handle => this.bindingSet_.addBinding(this, handle));
}
detect(frame_data, width, height) {

Powered by Google App Engine
This is Rietveld 408576698