| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Custom binding for the webstore API. | 5 // Custom binding for the webstore API. |
| 6 | 6 |
| 7 var webstoreNatives = requireNative('webstore'); | 7 var webstoreNatives = requireNative('webstore_natives'); |
| 8 var Event = require('event_bindings').Event; | 8 var Event = require('event_bindings').Event; |
| 9 | 9 |
| 10 function Installer() { | 10 function Installer() { |
| 11 this._pendingInstall = null; | 11 this._pendingInstall = null; |
| 12 this.onInstallStageChanged = | 12 this.onInstallStageChanged = |
| 13 new Event(null, [{name: 'stage', type: 'string'}], {unmanaged: true}); | 13 new Event(null, [{name: 'stage', type: 'string'}], {unmanaged: true}); |
| 14 this.onDownloadProgress = | 14 this.onDownloadProgress = |
| 15 new Event(null, [{name: 'progress', type: 'number'}], {unmanaged: true}); | 15 new Event(null, [{name: 'progress', type: 'number'}], {unmanaged: true}); |
| 16 } | 16 } |
| 17 | 17 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 | 86 |
| 87 exports.binding = chromeWebstore; | 87 exports.binding = chromeWebstore; |
| 88 | 88 |
| 89 // Called by webstore_bindings.cc. | 89 // Called by webstore_bindings.cc. |
| 90 exports.onInstallResponse = | 90 exports.onInstallResponse = |
| 91 Installer.prototype.onInstallResponse.bind(installer); | 91 Installer.prototype.onInstallResponse.bind(installer); |
| 92 exports.onInstallStageChanged = | 92 exports.onInstallStageChanged = |
| 93 Installer.prototype.onInstallStageChanged.bind(installer); | 93 Installer.prototype.onInstallStageChanged.bind(installer); |
| 94 exports.onDownloadProgress = | 94 exports.onDownloadProgress = |
| 95 Installer.prototype.onDownloadProgress.bind(installer); | 95 Installer.prototype.onDownloadProgress.bind(installer); |
| OLD | NEW |