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 // This file contains various hacks needed to inform JSCompiler of various | 5 // This file contains various hacks needed to inform JSCompiler of various |
6 // WebKit- and Chrome-specific properties and methods. It is used only with | 6 // WebKit- and Chrome-specific properties and methods. It is used only with |
7 // JSCompiler to verify the type-correctness of our code. | 7 // JSCompiler to verify the type-correctness of our code. |
8 | 8 |
9 /** @type {Object} */ | 9 /** @type {Object} */ |
10 var chrome = {}; | 10 var chrome = {}; |
(...skipping 26 matching lines...) Expand all Loading... |
37 */ | 37 */ |
38 create: function(name, parameters, opt_callback) {}, | 38 create: function(name, parameters, opt_callback) {}, |
39 /** | 39 /** |
40 * @return {AppWindow} | 40 * @return {AppWindow} |
41 */ | 41 */ |
42 current: function() {}, | 42 current: function() {}, |
43 /** | 43 /** |
44 * @param {string} id | 44 * @param {string} id |
45 * @param {function()=} opt_callback | 45 * @param {function()=} opt_callback |
46 */ | 46 */ |
47 get: function(id, opt_callback) {} | 47 get: function(id, opt_callback) {}, |
| 48 /** |
| 49 * @return {Array.<AppWindow>} |
| 50 */ |
| 51 getAll: function() {} |
48 }; | 52 }; |
49 | 53 |
50 | 54 |
51 /** @type {Object} */ | 55 /** @type {Object} */ |
52 chrome.runtime = { | 56 chrome.runtime = { |
53 /** @type {Object} */ | 57 /** @type {Object} */ |
54 lastError: { | 58 lastError: { |
55 /** @type {string} */ | 59 /** @type {string} */ |
56 message: '' | 60 message: '' |
57 }, | 61 }, |
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 * @param {number} socketId | 703 * @param {number} socketId |
700 */ | 704 */ |
701 chrome.socket.destroy = function(socketId) {}; | 705 chrome.socket.destroy = function(socketId) {}; |
702 | 706 |
703 /** | 707 /** |
704 * @param {number} socketId | 708 * @param {number} socketId |
705 * @param {Object} options | 709 * @param {Object} options |
706 * @param {function(number):void} callback | 710 * @param {function(number):void} callback |
707 */ | 711 */ |
708 chrome.socket.secure = function(socketId, options, callback) {}; | 712 chrome.socket.secure = function(socketId, options, callback) {}; |
OLD | NEW |