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

Side by Side Diff: content/test/data/web_ui_mojo.js

Issue 206923002: Adds plumbing to pass WebUI mojo::Handle from browser to renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge 2 trunk Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 define('main', [
2 'mojo/public/bindings/js/connector',
3 'content/test/data/web_ui_test_mojo_bindings.mojom',
4 ], function(connector, bindings) {
5
6 function RendererTargetTest(bindings) {
7 this.bindings_ = bindings;
8 }
9
10 // TODO(aa): It is a bummer to need this stub object in JavaScript. We should
11 // have a 'client' object that contains both the sending and receiving bits of
12 // the client side of the interface. Since JS is loosely typed, we do not need
13 // a separate base class to inherit from to receive callbacks.
14 RendererTargetTest.prototype =
15 Object.create(bindings.RendererTargetStub.prototype);
16
17 RendererTargetTest.prototype.test = function() {
darin (slow to review) 2014/03/21 00:04:52 it looks like these few lines are repeated below.
sky 2014/03/21 03:19:16 Good catch. The case is slightly different and thi
18 this.bindings_.test();
19 };
20
21 RendererTargetTest.prototype.Test = function() {
22 this.bindings_.test();
23 };
24
25 var connection;
26
27 return function(handle) {
28 connection = new connector.Connection(handle, RendererTargetTest,
29 bindings.RendererTargetProxy);
30 };
31 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698