summaryrefslogtreecommitdiffstats
path: root/mojo/apps/js/test/js_to_cpp_unittest.js
diff options
context:
space:
mode:
authorhansmuller <hansmuller@chromium.org>2014-10-07 10:03:47 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-07 17:04:10 +0000
commit39b01de0b16d731ce3fe33d0f7f5a0973d98729f (patch)
tree33f226ab6456fc47b47fb5c2c4660179d9c36988 /mojo/apps/js/test/js_to_cpp_unittest.js
parent4e85c87d5af985dce6c9d3b3cda865e818adac76 (diff)
downloadchromium_src-39b01de0b16d731ce3fe33d0f7f5a0973d98729f.zip
chromium_src-39b01de0b16d731ce3fe33d0f7f5a0973d98729f.tar.gz
chromium_src-39b01de0b16d731ce3fe33d0f7f5a0973d98729f.tar.bz2
Mojo JS bindings: simplify mojo.connectToService() usage - Part 1
This is an incremental step towards the goals listed in crbug.com/419160 The Mojo JS bindings now export an object for each interface. The object itemizes the interface values needed at runtime. Here's an example: exports.Service = { name: 'sample::Service', proxyClass: ServiceProxy, stubClass: ServiceStub, validateRequest: validateServiceRequest, validateResponse: null, }; I've removed the individual exports of the proxy and stub class names as well as the interface "NAME_" property that was added to proxy and stub classes. When possible, the object for an interface's client is added. For example: exports.Service.client = exports.ServiceClient; The next step (next patch) will automatically create a stub client object that delegates to a user supplied object. BUG=419160 Review URL: https://codereview.chromium.org/628763002 Cr-Commit-Position: refs/heads/master@{#298509}
Diffstat (limited to 'mojo/apps/js/test/js_to_cpp_unittest.js')
-rw-r--r--mojo/apps/js/test/js_to_cpp_unittest.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/mojo/apps/js/test/js_to_cpp_unittest.js b/mojo/apps/js/test/js_to_cpp_unittest.js
index b1073c8..ed57603 100644
--- a/mojo/apps/js/test/js_to_cpp_unittest.js
+++ b/mojo/apps/js/test/js_to_cpp_unittest.js
@@ -24,7 +24,8 @@ define('mojo/apps/js/test/js_to_cpp_unittest', [
cppSide.startTest();
}
- JsSideConnection.prototype = Object.create(jsToCpp.JsSideStub.prototype);
+ JsSideConnection.prototype =
+ Object.create(jsToCpp.JsSide.stubClass.prototype);
JsSideConnection.prototype.ping = function (arg) {
this.cppSide_.pingResponse();
@@ -215,6 +216,6 @@ define('mojo/apps/js/test/js_to_cpp_unittest', [
sampleMessage[i] = 255 - i;
}
retainedConnection = new connection.Connection(handle, JsSideConnection,
- jsToCpp.CppSideProxy);
+ jsToCpp.CppSide.proxyClass);
};
});