Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 }); | |
| OLD | NEW |