Chromium Code Reviews| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 114 | 114 |
| 115 /** @type {Object} */ | 115 /** @type {Object} */ |
| 116 chrome.app.window = { | 116 chrome.app.window = { |
| 117 /** | 117 /** |
| 118 * @param {string} name | 118 * @param {string} name |
| 119 * @param {Object} parameters | 119 * @param {Object} parameters |
| 120 */ | 120 */ |
| 121 create: function(name, parameters) {} | 121 create: function(name, parameters) {} |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 /** | |
| 125 * @type {Object} | |
| 126 * @see http://code.google.com/chrome/extensions/dev/contextMenus.html | |
| 127 */ | |
| 128 chrome.contextMenus = { | |
| 129 /** @type {chrome.Event} */ | |
| 130 onClicked: null, | |
| 131 /** | |
| 132 * @param {!Object} createProperties | |
| 133 * @param {function()=} opt_callback | |
|
Lambros
2013/09/06 22:16:14
nit: I think "opt_" is confusing, because it could
Jamie
2013/09/06 23:45:50
opt_ is a standard prefix for optional parameters
| |
| 134 */ | |
|
Lambros
2013/09/06 22:16:14
nit: Add @return, since create() returns integer o
Jamie
2013/09/06 23:45:50
Done.
| |
| 135 create: function(createProperties, opt_callback) {}, | |
| 136 /** | |
| 137 * @param {string|number} menuItemId | |
| 138 * @param {function()=} opt_callback | |
| 139 */ | |
| 140 remove: function(menuItemId, opt_callback) {}, | |
| 141 /** | |
| 142 * @param {function()=} opt_callback | |
| 143 */ | |
| 144 removeAll: function(opt_callback) {}, | |
| 145 /** | |
| 146 * @param {string|number} id | |
| 147 * @param {!Object} updateProperties | |
| 148 * @param {function()=} opt_callback | |
| 149 */ | |
| 150 update: function(id, updateProperties, opt_callback) {} | |
| 151 }; | |
| 152 | |
| 124 /** @type {Object} */ | 153 /** @type {Object} */ |
| 125 chrome.identity = { | 154 chrome.identity = { |
| 126 /** | 155 /** |
| 127 * @param {Object.<string>} parameters | 156 * @param {Object.<string>} parameters |
| 128 * @param {function(string):void} callback | 157 * @param {function(string):void} callback |
| 129 */ | 158 */ |
| 130 getAuthToken: function(parameters, callback) {}, | 159 getAuthToken: function(parameters, callback) {}, |
| 131 /** | 160 /** |
| 132 * @param {Object.<string>} parameters | 161 * @param {Object.<string>} parameters |
| 133 * @param {function(string):void} callback | 162 * @param {function(string):void} callback |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 216 * @param {Object.<string>} permissions | 245 * @param {Object.<string>} permissions |
| 217 * @param {function(boolean):void} callback | 246 * @param {function(boolean):void} callback |
| 218 */ | 247 */ |
| 219 contains: function(permissions, callback) {}, | 248 contains: function(permissions, callback) {}, |
| 220 /** | 249 /** |
| 221 * @param {Object.<string>} permissions | 250 * @param {Object.<string>} permissions |
| 222 * @param {function(boolean):void} callback | 251 * @param {function(boolean):void} callback |
| 223 */ | 252 */ |
| 224 request: function(permissions, callback) {} | 253 request: function(permissions, callback) {} |
| 225 }; | 254 }; |
| OLD | NEW |