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 {HTMLElement} */ | 9 /** @type {HTMLElement} */ |
10 Document.prototype.activeElement; | 10 Document.prototype.activeElement; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 */ | 103 */ |
104 getAuthToken: function(parameters, callback) {} | 104 getAuthToken: function(parameters, callback) {} |
105 }; | 105 }; |
106 | 106 |
107 /** @type {Object} */ | 107 /** @type {Object} */ |
108 chrome.runtime = { | 108 chrome.runtime = { |
109 /** @type {Object} */ | 109 /** @type {Object} */ |
110 lastError: { | 110 lastError: { |
111 /** @type {string} */ | 111 /** @type {string} */ |
112 message: '' | 112 message: '' |
113 } | 113 }, |
| 114 /** @return {{version: string}} */ |
| 115 getManifest: function() {} |
114 }; | 116 }; |
115 | 117 |
116 /** @type {Object} */ | 118 /** @type {Object} */ |
117 chrome.tabs; | 119 chrome.tabs; |
118 | 120 |
119 /** @param {function(chrome.Tab):void} callback */ | 121 /** @param {function(chrome.Tab):void} callback */ |
120 chrome.tabs.getCurrent = function(callback) {} | 122 chrome.tabs.getCurrent = function(callback) {} |
121 | 123 |
122 /** @constructor */ | 124 /** @constructor */ |
123 chrome.Tab = function() { | 125 chrome.Tab = function() { |
(...skipping 11 matching lines...) Expand all Loading... |
135 * @param {function(chrome.Window):void} callback */ | 137 * @param {function(chrome.Window):void} callback */ |
136 chrome.windows.get = function(id, getInfo, callback) {} | 138 chrome.windows.get = function(id, getInfo, callback) {} |
137 | 139 |
138 /** @constructor */ | 140 /** @constructor */ |
139 chrome.Window = function() { | 141 chrome.Window = function() { |
140 /** @type {string} */ | 142 /** @type {string} */ |
141 this.state = ''; | 143 this.state = ''; |
142 /** @type {string} */ | 144 /** @type {string} */ |
143 this.type = ''; | 145 this.type = ''; |
144 }; | 146 }; |
OLD | NEW |