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

Unified Diff: mojo/public/js/bindings.js

Issue 2405093003: [WIP] Mojo native bindings interface.
Patch Set: fixes webui tests Created 3 years, 10 months 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
« no previous file with comments | « extensions/test/data/api_test_base_unittest.js ('k') | mojo/public/js/connector.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/js/bindings.js
diff --git a/mojo/public/js/bindings.js b/mojo/public/js/bindings.js
index f3e40d293ebb025f4bf3c8a3c4e01c81626b5aa4..1f7fba74d7ddd7ed3c4622f68c00218075c8c12b 100644
--- a/mojo/public/js/bindings.js
+++ b/mojo/public/js/bindings.js
@@ -3,16 +3,15 @@
// found in the LICENSE file.
define("mojo/public/js/bindings", [
- "mojo/public/js/core",
"mojo/public/js/lib/control_message_proxy",
"mojo/public/js/interface_types",
"mojo/public/js/router",
-], function(core, controlMessageProxy, types, router) {
+], function(controlMessageProxy, types, router) {
// ---------------------------------------------------------------------------
function makeRequest(interfacePtr) {
- var pipe = core.createMessagePipe();
+ var pipe = Mojo.createMessagePipe();
interfacePtr.ptr.bind(new types.InterfacePtrInfo(pipe.handle0, 0));
return new types.InterfaceRequest(pipe.handle1);
}
@@ -64,7 +63,7 @@ define("mojo/public/js/bindings", [
this.proxy_ = null;
}
if (this.handle_) {
- core.close(this.handle_);
+ this.handle_.close();
this.handle_ = null;
}
};
@@ -181,7 +180,7 @@ define("mojo/public/js/bindings", [
var handle = requestOrHandle instanceof types.InterfaceRequest ?
requestOrHandle.handle : requestOrHandle;
- if (!core.isHandle(handle))
+ if (!(handle instanceof MojoHandle))
return;
this.stub_ = new this.interfaceType_.stubClass(this.impl_);
« no previous file with comments | « extensions/test/data/api_test_base_unittest.js ('k') | mojo/public/js/connector.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698