diff options
author | hansmuller <hansmuller@chromium.org> | 2014-10-07 10:03:47 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-07 17:04:10 +0000 |
commit | 39b01de0b16d731ce3fe33d0f7f5a0973d98729f (patch) | |
tree | 33f226ab6456fc47b47fb5c2c4660179d9c36988 /extensions/test/data/data_sender_unittest.js | |
parent | 4e85c87d5af985dce6c9d3b3cda865e818adac76 (diff) | |
download | chromium_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 'extensions/test/data/data_sender_unittest.js')
-rw-r--r-- | extensions/test/data/data_sender_unittest.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extensions/test/data/data_sender_unittest.js b/extensions/test/data/data_sender_unittest.js index 46db710..0b6a5cf 100644 --- a/extensions/test/data/data_sender_unittest.js +++ b/extensions/test/data/data_sender_unittest.js @@ -32,7 +32,7 @@ function createSender() { var dataSender = modules[1]; var dataStream = modules[2]; return new dataSender.DataSender( - serviceProvider.connectToService(dataStream.DataSinkProxy.NAME_), + serviceProvider.connectToService(dataStream.DataSink.name), BUFFER_SIZE, FATAL_ERROR); }); |