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 bindings for the app API. | 5 // Custom bindings for the app API. |
6 | 6 |
7 var appNatives = requireNative('app'); | 7 var appNatives = requireNative('app'); |
8 | 8 |
9 // This becomes chrome.app | 9 // This becomes chrome.app |
10 var app = { | 10 var app = { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 } | 61 } |
62 }; | 62 }; |
63 | 63 |
64 app.installState = function getInstallState(callback) { | 64 app.installState = function getInstallState(callback) { |
65 var callbackId = nextCallbackId++; | 65 var callbackId = nextCallbackId++; |
66 callbacks[callbackId] = callback; | 66 callbacks[callbackId] = callback; |
67 appNatives.GetInstallState(callbackId); | 67 appNatives.GetInstallState(callbackId); |
68 }; | 68 }; |
69 | 69 |
70 // These must match the names in InstallAppBindings() in | 70 // These must match the names in InstallAppBindings() in |
71 // extension_dispatcher.cc. | 71 // chrome/renderer/extensions/dispatcher.cc. |
72 exports.chromeApp = app; | 72 exports.chromeApp = app; |
73 exports.chromeAppNotifications = appNotifications; | 73 exports.chromeAppNotifications = appNotifications; |
74 exports.chromeHiddenApp = chromeHiddenApp; | 74 exports.chromeHiddenApp = chromeHiddenApp; |
OLD | NEW |