Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Side by Side Diff: chrome/renderer/resources/extensions/app.js

Issue 9460002: Convert app_bindings.js to the schema_generated_bindings.js infrastructure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 var chrome = chrome || {};
6 (function() {
7 native function GetChromeHidden();
8 native function GetIsInstalled();
9 native function Install();
10 native function GetDetails();
11 native function GetDetailsForFrame();
12 native function GetAppNotifyChannel();
13
14 var chromeHidden = GetChromeHidden();
15 var callbacks = {};
16 var nextCallbackId = 1;
17
18 chrome.app = new function() {
19 this.__defineGetter__('isInstalled', GetIsInstalled);
20 this.install = Install;
21 this.getDetails = GetDetails;
22 this.getDetailsForFrame = GetDetailsForFrame;
23 }();
24
25 chrome.appNotifications = new function() {
26 this.getChannel = function(clientId, callback) {
27 var callbackId = 0;
28 if (callback) {
29 callbackId = nextCallbackId++;
30 callbacks[callbackId] = callback;
31 }
32 GetAppNotifyChannel(clientId, callbackId);
33 };
34 }();
35
36 chromeHidden.app = {};
37 chromeHidden.app.onGetAppNotifyChannelResponse =
38 function(channelId, error, callbackId) {
39 if (callbackId) {
40 callbacks[callbackId](channelId, error);
41 delete callbacks[callbackId];
42 }
43 };
44 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698