| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 /** @return {{version: string, app: {background: Object}}} */ | 45 /** @return {{version: string, app: {background: Object}}} */ |
| 46 getManifest: function() {} | 46 getManifest: function() {} |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 /** | 49 /** |
| 50 * @type {?function(string):chrome.extension.Port} | 50 * @type {?function(string):chrome.extension.Port} |
| 51 */ | 51 */ |
| 52 chrome.runtime.connectNative = function(name) {}; | 52 chrome.runtime.connectNative = function(name) {}; |
| 53 | 53 |
| 54 /** | 54 /** |
| 55 * @param {{name:string}} connectInfo |
| 56 * @return {chrome.extension.Port} |
| 57 */ |
| 58 chrome.runtime.connect = function(connectInfo) {}; |
| 59 |
| 60 /** |
| 55 * @param {string} extensionId | 61 * @param {string} extensionId |
| 56 * @param {*} message | 62 * @param {*} message |
| 57 * @param {Object=} opt_options | 63 * @param {Object=} opt_options |
| 58 * @param {function(*)=} opt_callback | 64 * @param {function(*)=} opt_callback |
| 59 */ | 65 */ |
| 60 chrome.runtime.sendMessage = function( | 66 chrome.runtime.sendMessage = function( |
| 61 extensionId, message, opt_options, opt_callback) {}; | 67 extensionId, message, opt_options, opt_callback) {}; |
| 62 | 68 |
| 63 /** @type {Object} */ | 69 /** @type {Object} */ |
| 64 chrome.extension = {}; | 70 chrome.extension = {}; |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 this.height = 0; | 333 this.height = 0; |
| 328 /** @type {number} */ | 334 /** @type {number} */ |
| 329 this.top = 0; | 335 this.top = 0; |
| 330 /** @type {number} */ | 336 /** @type {number} */ |
| 331 this.bottom = 0; | 337 this.bottom = 0; |
| 332 /** @type {number} */ | 338 /** @type {number} */ |
| 333 this.left = 0; | 339 this.left = 0; |
| 334 /** @type {number} */ | 340 /** @type {number} */ |
| 335 this.right = 0; | 341 this.right = 0; |
| 336 }; | 342 }; |
| OLD | NEW |