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-specific properties and methods. It is used only with JSCompiler | 6 // WebKit-specific properties and methods. It is used only with JSCompiler |
| 7 // to verify the type-correctness of our code. | 7 // 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 62 | 62 |
| 63 /** @param {Element} element | 63 /** @param {Element} element |
| 64 @param {Object} options */ | 64 @param {Object} options */ |
| 65 WebKitMutationObserver.prototype.observe = function(element, options) {}; | 65 WebKitMutationObserver.prototype.observe = function(element, options) {}; |
| 66 | 66 |
| 67 /** @type {Object} */ | 67 /** @type {Object} */ |
| 68 chrome.storage = {}; | 68 chrome.storage = {}; |
| 69 | 69 |
| 70 // TODO(jamiewalch): Flesh this out with the correct type when we're a v2 app. | 70 // TODO(jamiewalch): Flesh this out with the correct type when we're a v2 app. |
| 71 /** @type {remoting.MockStorage} */ | 71 /** @type {remoting.MockStorage} */ |
| 72 chrome.storage.local = null; | 72 chrome.storage.local = null; |
| 73 | |
| 74 /** @type {Object} */ | |
|
Wez
2013/01/05 00:04:24
nit: Consider moving these into their own apps_v2_
Jamie
2013/01/05 01:32:54
I'd rather not, unless you feel strongly about it.
| |
| 75 chrome.app.runtime = { | |
| 76 /** @type {Object} */ | |
| 77 onLaunched: { | |
| 78 /** @param {function():void} callback */ | |
| 79 addListener: function(callback) {} | |
| 80 } | |
| 81 }; | |
| 82 | |
| 83 /** @type {Object} */ | |
| 84 chrome.app.window = { | |
| 85 /** | |
| 86 * @param {string} name | |
| 87 * @param {Object} parameters | |
| 88 */ | |
| 89 create: function(name, parameters) {} | |
| 90 }; | |
| 91 | |
| 92 /** @type {Object} */ | |
| 93 chrome.experimental = {}; | |
| 94 | |
| 95 /** @type {Object} */ | |
| 96 chrome.experimental.identity = { | |
| 97 /** | |
| 98 * @param {Object.<string>} parameters | |
| 99 * @param {function(string):void} callback | |
| 100 */ | |
| 101 getAuthToken: function(parameters, callback) {} | |
| 102 }; | |
| 103 | |
| 104 /** @type {Object} */ | |
| 105 chrome.runtime = { | |
| 106 /** @type {Object} */ | |
| 107 lastError: { | |
| 108 /** @type {string} */ | |
| 109 message: '' | |
| 110 } | |
| 111 }; | |
| OLD | NEW |