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

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

Issue 2357383002: bluetooth: Add device list retrieval for chrome://bluetooth-internals (Closed)
Patch Set: Created 4 years, 3 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
Index: mojo/public/js/connection.js
diff --git a/mojo/public/js/connection.js b/mojo/public/js/connection.js
index 3f7e8392b3bb785e3cae8927e7abd261ca80cdd3..75104f7f167cc7bcaa6e373e65707b145d2aef25 100644
--- a/mojo/public/js/connection.js
+++ b/mojo/public/js/connection.js
@@ -98,6 +98,25 @@ define("mojo/public/js/connection", [
return messagePipe.handle1;
}
+ // Return a handle and a proxy for a message pipe that's connected to a proxy
+ // for |remoteInterface|. Used by generated code for outgoing interface&
+ // (request) parameters.
+ function bindProxy2(remoteInterface) {
scheib 2016/09/23 20:53:52 Let's separate out this change to be stand-alone.
+ var messagePipe = core.createMessagePipe();
+ if (messagePipe.result != core.RESULT_OK)
+ throw new Error("createMessagePipe failed " + messagePipe.result);
+
+ var proxy = new remoteInterface.proxyClass;
+ var router = new Router(messagePipe.handle0);
+ var connection = new BaseConnection(undefined, proxy, router);
+ ProxyBindings(proxy).connection = connection;
+
+ return {
+ handle: messagePipe.handle1,
+ proxy: proxy
+ };
+ }
+
// Return a handle for a message pipe that's connected to a stub for
// localInterface. Used by generated code for outgoing interface
// parameters: the caller is given the generated stub via
@@ -168,6 +187,7 @@ define("mojo/public/js/connection", [
exports.TestConnection = TestConnection;
exports.bindProxy = bindProxy;
+ exports.bindProxy2 = bindProxy2;
exports.bindImpl = bindImpl;
exports.bindHandleToProxy = bindHandleToProxy;
exports.bindHandleToStub = bindHandleToStub;

Powered by Google App Engine
This is Rietveld 408576698