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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 contains: function(permissions, callback) {}, | 241 contains: function(permissions, callback) {}, |
242 /** | 242 /** |
243 * @param {Object.<string>} permissions | 243 * @param {Object.<string>} permissions |
244 * @param {function(boolean):void} callback | 244 * @param {function(boolean):void} callback |
245 */ | 245 */ |
246 request: function(permissions, callback) {} | 246 request: function(permissions, callback) {} |
247 }; | 247 }; |
248 | 248 |
249 | 249 |
250 /** @type {Object} */ | 250 /** @type {Object} */ |
251 chrome.tabs; | 251 chrome.tabs = {}; |
252 | 252 |
253 /** @param {function(chrome.Tab):void} callback */ | 253 /** @param {function(chrome.Tab):void} callback */ |
254 chrome.tabs.getCurrent = function(callback) {} | 254 chrome.tabs.getCurrent = function(callback) {}; |
255 | 255 |
256 /** @constructor */ | 256 /** @constructor */ |
257 chrome.Tab = function() { | 257 chrome.Tab = function() { |
258 /** @type {boolean} */ | 258 /** @type {boolean} */ |
259 this.pinned = false; | 259 this.pinned = false; |
260 /** @type {number} */ | 260 /** @type {number} */ |
261 this.windowId = 0; | 261 this.windowId = 0; |
262 }; | 262 }; |
263 | 263 |
264 | 264 |
265 /** @type {Object} */ | 265 /** @type {Object} */ |
266 chrome.windows; | 266 chrome.windows = {}; |
267 | 267 |
268 /** @param {number} id | 268 /** @param {number} id |
269 * @param {Object?} getInfo | 269 * @param {Object?} getInfo |
270 * @param {function(chrome.Window):void} callback */ | 270 * @param {function(chrome.Window):void} callback */ |
271 chrome.windows.get = function(id, getInfo, callback) {} | 271 chrome.windows.get = function(id, getInfo, callback) {}; |
272 | 272 |
273 /** @constructor */ | 273 /** @constructor */ |
274 chrome.Window = function() { | 274 chrome.Window = function() { |
275 /** @type {string} */ | 275 /** @type {string} */ |
276 this.state = ''; | 276 this.state = ''; |
277 /** @type {string} */ | 277 /** @type {string} */ |
278 this.type = ''; | 278 this.type = ''; |
279 }; | 279 }; |
280 | 280 |
281 /** @constructor */ | 281 /** @constructor */ |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 this.height = 0; | 327 this.height = 0; |
328 /** @type {number} */ | 328 /** @type {number} */ |
329 this.top = 0; | 329 this.top = 0; |
330 /** @type {number} */ | 330 /** @type {number} */ |
331 this.bottom = 0; | 331 this.bottom = 0; |
332 /** @type {number} */ | 332 /** @type {number} */ |
333 this.left = 0; | 333 this.left = 0; |
334 /** @type {number} */ | 334 /** @type {number} */ |
335 this.right = 0; | 335 this.right = 0; |
336 }; | 336 }; |
OLD | NEW |