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

Unified Diff: ios/web/test/data/mojo_test.js

Issue 2556353004: Mojo JS bindings: code generator maps interface ptr and request to InterfacePtr and InterfaceReques… (Closed)
Patch Set: . 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: ios/web/test/data/mojo_test.js
diff --git a/ios/web/test/data/mojo_test.js b/ios/web/test/data/mojo_test.js
index a41a743ea5c628bcfd8561f498552b2568239989..7b3a9e4cb8ac82f6ef89a2b58df6d5c143c3f6d4 100644
--- a/ios/web/test/data/mojo_test.js
+++ b/ios/web/test/data/mojo_test.js
@@ -12,18 +12,19 @@
function getBrowserProxy() {
return new Promise(function(resolve, reject) {
define([
+ 'mojo/public/js/bindings',
'mojo/public/js/connection',
'ios/web/test/mojo_test.mojom',
'content/public/renderer/frame_interfaces',
- ], function(connection, mojom, frameInterfaces) {
+ ], function(bindings, connection, mojom, frameInterfaces) {
var pageImpl, browserProxy;
/** @constructor */
- function TestPageImpl() {};
+ function TestPageImpl() {
+ this.binding = new bindings.Binding(mojom.TestPage, this);
+ }
TestPageImpl.prototype = {
- __proto__: mojom.TestPage.stubClass.prototype,
-
/** @override */
handleNativeMessage: function(result) {
if (result.message == 'ack') {
@@ -39,7 +40,7 @@ function getBrowserProxy() {
mojom.TestUIHandlerMojo);
pageImpl = new TestPageImpl();
- browserProxy.setClientPage(connection.bindStubDerivedImpl(pageImpl));
+ browserProxy.setClientPage(pageImpl.binding.createInterfacePtrAndBind());
resolve(browserProxy);
});
});

Powered by Google App Engine
This is Rietveld 408576698