| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 define("mojo/services/public/js/application", [ | 5 define("mojo/services/public/js/application", [ |
| 6 "mojo/public/js/bindings", | 6 "mojo/public/js/bindings", |
| 7 "mojo/public/js/core", | 7 "mojo/public/js/core", |
| 8 "mojo/public/js/connection", | 8 "mojo/public/js/connection", |
| 9 "mojo/public/js/threading", | 9 "mojo/public/js/threading", |
| 10 "mojo/public/interfaces/application/application.mojom", | 10 "mojo/public/interfaces/application/application.mojom", |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 this.serviceExchanges = []; | 23 this.serviceExchanges = []; |
| 24 this.appRequestHandle_ = appRequestHandle; | 24 this.appRequestHandle_ = appRequestHandle; |
| 25 this.appStub_ = | 25 this.appStub_ = |
| 26 connection.bindHandleToStub(appRequestHandle, ApplicationInterface); | 26 connection.bindHandleToStub(appRequestHandle, ApplicationInterface); |
| 27 bindings.StubBindings(this.appStub_).delegate = { | 27 bindings.StubBindings(this.appStub_).delegate = { |
| 28 initialize: this.doInitialize.bind(this), | 28 initialize: this.doInitialize.bind(this), |
| 29 acceptConnection: this.doAcceptConnection.bind(this), | 29 acceptConnection: this.doAcceptConnection.bind(this), |
| 30 }; | 30 }; |
| 31 } | 31 } |
| 32 | 32 |
| 33 doInitialize(shellProxy, args) { | 33 doInitialize(shellProxy, args, url) { |
| 34 this.shellProxy_ = shellProxy; | 34 this.shellProxy_ = shellProxy; |
| 35 this.shell = new Shell(shellProxy); | 35 this.shell = new Shell(shellProxy); |
| 36 this.initialize(args); | 36 this.initialize(args); |
| 37 } | 37 } |
| 38 | 38 |
| 39 initialize(args) { | 39 initialize(args) { |
| 40 } | 40 } |
| 41 | 41 |
| 42 // Implements AcceptConnection() from Application.mojom. Calls | 42 // Implements AcceptConnection() from Application.mojom. Calls |
| 43 // this.acceptConnection() with a JS ServiceExchange instead of a pair | 43 // this.acceptConnection() with a JS ServiceExchange instead of a pair |
| (...skipping 17 matching lines...) Expand all Loading... |
| 61 this.shell.close(); | 61 this.shell.close(); |
| 62 core.close(this.appRequestHandle_); | 62 core.close(this.appRequestHandle_); |
| 63 threading.quit(); | 63 threading.quit(); |
| 64 } | 64 } |
| 65 } | 65 } |
| 66 | 66 |
| 67 var exports = {}; | 67 var exports = {}; |
| 68 exports.Application = Application; | 68 exports.Application = Application; |
| 69 return exports; | 69 return exports; |
| 70 }); | 70 }); |
| OLD | NEW |