| 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 | 8 |
| 9 function Installer() { | 9 function Installer() { |
| 10 this._pendingInstall = null; | 10 this._pendingInstall = null; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 var installer = new Installer(); | 44 var installer = new Installer(); |
| 45 | 45 |
| 46 var chromeWebstore = { | 46 var chromeWebstore = { |
| 47 install: function install(url, onSuccess, onFailure) { | 47 install: function install(url, onSuccess, onFailure) { |
| 48 installer.install(url, onSuccess, onFailure); | 48 installer.install(url, onSuccess, onFailure); |
| 49 } | 49 } |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 // Called by webstore_binding.cc. | 52 // Called by webstore_binding.cc. |
| 53 var chromeHiddenWebstore = { | 53 function onInstallResponse(installId, success, error) { |
| 54 onInstallResponse: function(installId, success, error) { | 54 installer.onInstallResponse(installId, success, error); |
| 55 installer.onInstallResponse(installId, success, error); | 55 } |
| 56 } | |
| 57 }; | |
| 58 | 56 |
| 59 // These must match the names in InstallWebstorebinding in | 57 // These must match the names in InstallWebstorebinding in |
| 60 // chrome/renderer/extensions/dispatcher.cc. | 58 // chrome/renderer/extensions/dispatcher.cc. |
| 61 exports.chromeWebstore = chromeWebstore; | 59 exports.chromeWebstore = chromeWebstore; |
| 62 exports.chromeHiddenWebstore = chromeHiddenWebstore; | 60 exports.onInstallResponse = onInstallResponse; |
| OLD | NEW |