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'); |
8 var Event = require('event_bindings').Event; | 8 var Event = require('event_bindings').Event; |
9 | 9 |
10 function Installer() { | 10 function Installer() { |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 var installer = new Installer(); | 78 var installer = new Installer(); |
79 | 79 |
80 var chromeWebstore = { | 80 var chromeWebstore = { |
81 install: function (url, onSuccess, onFailure) { | 81 install: function (url, onSuccess, onFailure) { |
82 installer.install(url, onSuccess, onFailure); | 82 installer.install(url, onSuccess, onFailure); |
83 }, | 83 }, |
84 onInstallStageChanged: installer.onInstallStageChanged, | 84 onInstallStageChanged: installer.onInstallStageChanged, |
85 onDownloadProgress: installer.onDownloadProgress | 85 onDownloadProgress: installer.onDownloadProgress |
86 }; | 86 }; |
87 | 87 |
88 exports.binding = chromeWebstore; | 88 exports.$set('binding', chromeWebstore); |
89 | 89 |
90 // Called by webstore_bindings.cc. | 90 // Called by webstore_bindings.cc. |
91 exports.onInstallResponse = | 91 exports.onInstallResponse = |
92 Installer.prototype.onInstallResponse.bind(installer); | 92 Installer.prototype.onInstallResponse.bind(installer); |
93 exports.onInstallStageChanged = | 93 exports.onInstallStageChanged = |
94 Installer.prototype.onInstallStageChanged.bind(installer); | 94 Installer.prototype.onInstallStageChanged.bind(installer); |
95 exports.onDownloadProgress = | 95 exports.onDownloadProgress = |
96 Installer.prototype.onDownloadProgress.bind(installer); | 96 Installer.prototype.onDownloadProgress.bind(installer); |
OLD | NEW |