diff options
author | dbeam <dbeam@chromium.org> | 2014-11-05 15:01:01 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-05 23:01:23 +0000 |
commit | 43500d8d8ce9c85d07c289d102a73d88109c93b4 (patch) | |
tree | 2f9f20b5dba8f2ce75040326b5f630b4e41d36c4 /third_party | |
parent | 0f3140bf3862fb1973f2265f132e00c8e4a05ae4 (diff) | |
download | chromium_src-43500d8d8ce9c85d07c289d102a73d88109c93b4.zip chromium_src-43500d8d8ce9c85d07c289d102a73d88109c93b4.tar.gz chromium_src-43500d8d8ce9c85d07c289d102a73d88109c93b4.tar.bz2 |
Bump closure compiler version + chrome_extensions.js
TBR=tbreisacher@chromium.org
BUG=none
TEST=none
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/708563004
Cr-Commit-Position: refs/heads/master@{#302895}
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/closure_compiler/compiler/compiler.jar | bin | 6233932 -> 4 bytes | |||
-rw-r--r-- | third_party/closure_compiler/externs/chrome_extensions.js | 348 | ||||
-rw-r--r-- | third_party/closure_compiler/runner/runner.jar | bin | 18456 -> 18456 bytes |
3 files changed, 332 insertions, 16 deletions
diff --git a/third_party/closure_compiler/compiler/compiler.jar b/third_party/closure_compiler/compiler/compiler.jar Binary files differindex 503e290..4af1832 100644 --- a/third_party/closure_compiler/compiler/compiler.jar +++ b/third_party/closure_compiler/compiler/compiler.jar diff --git a/third_party/closure_compiler/externs/chrome_extensions.js b/third_party/closure_compiler/externs/chrome_extensions.js index 14194c6..8a4a8c4 100644 --- a/third_party/closure_compiler/externs/chrome_extensions.js +++ b/third_party/closure_compiler/externs/chrome_extensions.js @@ -28,6 +28,7 @@ * D. Events * E. Nullability * F. Private APIs + * G. Enums * * The best practices for each are described in more detail below. It * should be noted that, due to historical reasons, and the evolutionary @@ -162,6 +163,11 @@ * Private Chrome APIs (such as those that end in "Private") should go at the * bottom of this file. * + * G. Enums + * The Chrome extension APIs define many enums that define a set of acceptable + * strings, however, they do not reify those enum types, therefore, enum + * parameters should be defined as {@code string}. + * * @externs * */ @@ -181,6 +187,7 @@ chrome.app = {}; chrome.app.runtime = {}; + /** * @constructor * @see http://developer.chrome.com/apps/app_runtime.html @@ -196,6 +203,7 @@ chrome.app.runtime.LaunchItem.prototype.entry; chrome.app.runtime.LaunchItem.prototype.type; + /** * @constructor * @see http://developer.chrome.com/apps/app_runtime.html @@ -223,6 +231,7 @@ chrome.app.runtime.LaunchData.prototype.referrerUrl; chrome.app.runtime.LaunchData.prototype.isKioskSession; + /** * The type of chrome.app.runtime.onLaunched. * @constructor @@ -289,6 +298,7 @@ chrome.app.window.getAll = function() {}; chrome.app.window.get = function(id) {}; + /** * @constructor * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow @@ -554,6 +564,7 @@ chrome.app.window.onRestored; chrome.bluetooth = function() {}; + /** * @constructor * @see https://developer.chrome.com/apps/bluetooth#type-AdapterState @@ -581,6 +592,7 @@ chrome.bluetooth.AdapterState.prototype.available; chrome.bluetooth.AdapterState.prototype.discovering; + /** * @constructor * @see https://developer.chrome.com/apps/bluetooth#type-Device @@ -668,6 +680,7 @@ chrome.bluetooth.startDiscovery = function(opt_callback) {}; chrome.bluetooth.stopDiscovery = function(opt_callback) {}; + /** * Event whose listeners take an AdapaterState parameter. * @constructor @@ -704,6 +717,7 @@ chrome.bluetooth.AdapterStateEvent.prototype.hasListeners = function() {}; chrome.bluetooth.onAdapterStateChanged; + /** * Event whose listeners take an Device parameter. * @constructor @@ -780,6 +794,7 @@ chrome.bluetoothSocket.SocketProperties; chrome.bluetoothSocket.ListenOptions; + /** * @constructor * @see https://developer.chrome.com/apps/bluetoothSocket#type-SocketInfo @@ -918,6 +933,7 @@ chrome.bluetoothSocket.getInfo = function(socketId, callback) {}; chrome.bluetoothSocket.getSockets = function(callback) {}; + /** * @constructor * @see https://developer.chrome.com/apps/bluetoothSocket#event-onAccept @@ -933,6 +949,7 @@ chrome.bluetoothSocket.AcceptEventData.prototype.socketId; chrome.bluetoothSocket.AcceptEventData.prototype.clientSocketId; + /** * Event whose listeners take a AcceptEventData parameter. * @constructor @@ -970,6 +987,7 @@ chrome.bluetoothSocket.AcceptEvent.prototype.hasListeners = function() {}; chrome.bluetoothSocket.onAccept; + /** * @constructor * @see https://developer.chrome.com/apps/bluetoothSocket#event-onAcceptError @@ -989,6 +1007,7 @@ chrome.bluetoothSocket.AcceptErrorEventData.prototype.errorMessage; chrome.bluetoothSocket.AcceptErrorEventData.prototype.error; + /** * Event whose listeners take a AcceptErrorEventData parameter. * @constructor @@ -1030,6 +1049,7 @@ chrome.bluetoothSocket.AcceptErrorEvent.prototype.hasListeners = chrome.bluetoothSocket.onAcceptError; + /** * @constructor * @see https://developer.chrome.com/apps/bluetoothSocket#event-onReceive @@ -1045,6 +1065,7 @@ chrome.bluetoothSocket.ReceiveEventData.prototype.socketId; chrome.bluetoothSocket.ReceiveEventData.prototype.data; + /** * Event whose listeners take a ReceiveEventData parameter. * @constructor @@ -1082,6 +1103,7 @@ chrome.bluetoothSocket.ReceiveEvent.prototype.hasListeners = function() {}; chrome.bluetoothSocket.onReceive; + /** * @constructor * @see https://developer.chrome.com/apps/bluetoothSocket#event-onReceiveError @@ -1101,6 +1123,7 @@ chrome.bluetoothSocket.ReceiveErrorEventData.prototype.errorMessage; chrome.bluetoothSocket.ReceiveErrorEventData.prototype.error; + /** * Event whose listeners take a ReceiveErrorEventData parameter. * @constructor @@ -1505,6 +1528,7 @@ chrome.runtime.Manifest.Oauth2 = function() {}; /** @type {string} */ chrome.runtime.Manifest.Oauth2.prototype.client_id; + /**@type {!Array.<string>} */ chrome.runtime.Manifest.Oauth2.prototype.scopes; @@ -1524,12 +1548,14 @@ chrome.runtime.getManifest = function() {}; */ chrome.runtime.getURL = function(path) {}; + /** * @param {string} url This may be used to clean up server-side data, do * analytics, and implement surveys. Maximum 255 characters. */ chrome.runtime.setUninstallUrl = function(url) {}; + /** * Reloads the app or extension. */ @@ -1543,6 +1569,7 @@ chrome.runtime.reload = function() {}; */ chrome.runtime.requestUpdateCheck = function(callback) {}; + /** * Restart the ChromeOS device when the app runs in kiosk mode. Otherwise, it's * no-op. @@ -1606,6 +1633,7 @@ chrome.runtime.sendMessage = function( chrome.runtime.sendNativeMessage = function( application, message, opt_callback) {}; + /** * * @param {function(!Object)} callback @@ -1659,6 +1687,7 @@ chrome.runtime.onUpdateAvailable; chrome.runtime.onRestartRequired; + /** * Event whose listeners take a Port parameter. * @constructor @@ -2203,6 +2232,7 @@ chrome.i18n.getAcceptLanguages = function(callback) {}; */ chrome.i18n.getMessage = function(messageName, opt_args) {}; + /** * @return {string} */ @@ -2250,6 +2280,7 @@ chrome.pageAction.show = function(tabId) {}; /** @type {!ChromeEvent} */ chrome.pageAction.onClicked; + /** * @const */ @@ -2500,6 +2531,7 @@ var SuggestResult; chrome.omnibox = {}; + /** @constructor */ chrome.omnibox.InputChangedEvent = function() {}; @@ -2528,6 +2560,7 @@ chrome.omnibox.InputChangedEvent.prototype.hasListener = function(callback) {}; chrome.omnibox.InputChangedEvent.prototype.hasListeners = function() {}; + /** @constructor */ chrome.omnibox.InputEnteredEvent = function() {}; @@ -2582,32 +2615,111 @@ chrome.contextMenus = {}; /** - * @param {!Object} createProperties + * @typedef {?{ + * type: (string|undefined), + * id: (string|undefined), + * title: (string|undefined), + * checked: (boolean|undefined), + * contexts: (!Array.<string>|undefined), + * onclick: (function(!Object, !Tab)|undefined), + * parentId: (number|string|undefined), + * documentUrlPatterns: (!Array.<string>|undefined), + * targetUrlPatterns: (!Array.<string>|undefined), + * enabled: (boolean|undefined) + * }} + * @see https://developer.chrome.com/extensions/contextMenus#method-create + */ +chrome.contextMenus.CreateProperties; + + +/** + * @typedef {?{ + * type: (string|undefined), + * title: (string|undefined), + * checked: (boolean|undefined), + * contexts: (!Array.<string>|undefined), + * onclick: (function(!Object, !Tab)|undefined), + * parentId: (number|string|undefined), + * documentUrlPatterns: (!Array.<string>|undefined), + * targetUrlPatterns: (!Array.<string>|undefined), + * enabled: (boolean|undefined) + * }} + * @see https://developer.chrome.com/extensions/contextMenus#method-update + */ +chrome.contextMenus.UpdateProperties; + + +/** + * @param {!chrome.contextMenus.CreateProperties} createProperties * @param {function()=} opt_callback - * @return {number} The id of the newly created window. + * @return {(number|string)} The id of the newly created window. + * @see https://developer.chrome.com/extensions/contextMenus#method-create */ chrome.contextMenus.create = function(createProperties, opt_callback) {}; /** - * @param {number} menuItemId + * @param {(number|string)} id + * @param {!chrome.contextMenus.UpdateProperties} updateProperties * @param {function()=} opt_callback + * @see https://developer.chrome.com/extensions/contextMenus#method-update + */ +chrome.contextMenus.update = function(id, updateProperties, opt_callback) {}; + + +/** + * @param {(number|string)} menuItemId + * @param {function()=} opt_callback + * @see https://developer.chrome.com/extensions/contextMenus#method-remove */ chrome.contextMenus.remove = function(menuItemId, opt_callback) {}; /** * @param {function()=} opt_callback + * @see https://developer.chrome.com/extensions/contextMenus#method-removeAll */ chrome.contextMenus.removeAll = function(opt_callback) {}; /** - * @param {number} id - * @param {!Object} updateProperties - * @param {function()=} opt_callback + * @interface + * @see https://developer.chrome.com/extensions/contextMenus#event-onClicked */ -chrome.contextMenus.update = function(id, updateProperties, opt_callback) {}; +chrome.contextMenus.ClickedEvent = function() {}; + + +/** + * @param {function(!Object, !Tab=)} callback + */ +chrome.contextMenus.ClickedEvent.prototype.addListener = function(callback) {}; + + +/** + * @param {function(!Object, !Tab=)} callback + */ +chrome.contextMenus.ClickedEvent.prototype.removeListener = + function(callback) {}; + + +/** + * @param {function(!Object, !Tab=)} callback + * @return {boolean} + */ +chrome.contextMenus.ClickedEvent.prototype.hasListener = function(callback) {}; + + +/** + * @return {boolean} + */ +chrome.contextMenus.ClickedEvent.prototype.hasListeners = function() {}; + + +/** + * @type {!chrome.contextMenus.ClickedEvent} + * @see https://developer.chrome.com/extensions/contextMenus#event-onClicked + */ +chrome.contextMenus.onClicked; /** @@ -2996,13 +3108,71 @@ chrome.contentSettings.notifications; /** * @const - * @see https://developer.chrome.com/extensions/fileBrowserHandle.html + * @see https://developer.chrome.com/extensions/fileBrowserHandler */ -chrome.fileBrowserHandle = {}; +chrome.fileBrowserHandler = {}; -/** @type {!ChromeEvent} */ -chrome.fileBrowserHandle.onExecute; +/** + * @typedef {?{ + * suggestedName: string, + * allowedFileExtensions: (!Array.<string>|undefined) + * }} + */ +chrome.fileBrowserHandler.SelectFileSelectionParams; + + +/** + * Prompts user to select file path under which file should be saved. + * @see https://developer.chrome.com/extensions/fileBrowserHandler#method-selectFile + * @param {!chrome.fileBrowserHandler.SelectFileSelectionParams} selectionParams + * Parameters that will be used while selecting the file. + * @param {function(!Object)} callback Function called upon completion. + */ +chrome.fileBrowserHandler.selectFile = function(selectionParams, callback) {}; + + +/** + * @interface + * @see https://developer.chrome.com/extensions/fileBrowserHandler#event-onExecute + */ +chrome.fileBrowserHandler.ExecuteEvent = function() {}; + + +/** + * @param {function(string, !FileHandlerExecuteEventDetails)} callback + */ +chrome.fileBrowserHandler.ExecuteEvent.prototype.addListener = function( + callback) {}; + + +/** + * @param {function(string, !FileHandlerExecuteEventDetails)} callback + */ +chrome.fileBrowserHandler.ExecuteEvent.prototype.removeListener = function( + callback) {}; + + +/** + * @param {function(string, !FileHandlerExecuteEventDetails)} callback + * @return {boolean} + */ +chrome.fileBrowserHandler.ExecuteEvent.prototype.hasListener = function( + callback) {}; + + +/** + * @return {boolean} + */ +chrome.fileBrowserHandler.ExecuteEvent.prototype.hasListeners = function() {}; + + +/** + * Fired when file system action is executed from ChromeOS file browser. + * @see https://developer.chrome.com/extensions/fileBrowserHandler#event-onExecute + * @type {!chrome.fileBrowserHandler.ExecuteEvent} + */ +chrome.fileBrowserHandler.onExecute; /** @@ -3086,6 +3256,7 @@ chrome.gcm.onMessagesDeleted; chrome.gcm.onSendError; + /** * @constructor */ @@ -3117,6 +3288,7 @@ chrome.gcm.OnMessageEvent.prototype.hasListener = function(callback) {}; chrome.gcm.OnMessageEvent.prototype.hasListeners = function() {}; + /** * @constructor */ @@ -3134,6 +3306,7 @@ chrome.gcm.OnSendErrorEvent.prototype.addListener = function(callback) {}; */ chrome.gcm.OnSendErrorEvent.prototype.removeListener = function(callback) {}; + /** * @param {function(!Object): void} callback Callback. * @return {boolean} @@ -3605,8 +3778,8 @@ chrome.permissions = {}; * permissions: (Array.<string>|undefined), * origins: (Array.<string>|undefined) * }} -* @see http://developer.chrome.com/extensions/permissions.html#type-Permissions -*/ + * @see http://developer.chrome.com/extensions/permissions.html#type-Permissions + */ chrome.permissions.Permissions; @@ -4047,6 +4220,7 @@ chrome.system.display = {}; chrome.system.display.onDisplayChanged; + /** * @constructor */ @@ -4080,6 +4254,7 @@ chrome.system.display.Bounds.prototype.height; chrome.system.display.Insets; + /** * @constructor */ @@ -4485,6 +4660,7 @@ IconInfo.prototype.url; */ function Tab() {} + // TODO: Make this field optional once dependent projects have been updated. /** * @type {number} @@ -4563,6 +4739,7 @@ Tab.prototype.height; Tab.prototype.sessionId; + /** * @see https://developer.chrome.com/extensions/windows.html * @constructor @@ -4641,6 +4818,7 @@ ChromeEvent.prototype.hasListener = function(callback) {}; ChromeEvent.prototype.hasListeners = function() {}; + /** * Event whose listeners take a string parameter. * @constructor @@ -4795,6 +4973,7 @@ ChromeExtensionInfoEvent.prototype.hasListener = function(callback) {}; ChromeExtensionInfoEvent.prototype.hasListeners = function() {}; + /** * Event whose listeners take a string array parameter. * @constructor @@ -5259,7 +5438,7 @@ function FileHandlerExecuteEventDetails() {} FileHandlerExecuteEventDetails.prototype.entries; -/** @type {number} */ +/** @type {number|undefined} */ FileHandlerExecuteEventDetails.prototype.tab_id; @@ -5763,6 +5942,138 @@ chrome.fileSystem.retainEntry = function(entry) {}; /** * @const + * @see https://developer.chrome.com/apps/syncFileSystem + */ +chrome.syncFileSystem = {}; + + +/** + * Returns a syncable filesystem backed by Google Drive. The returned + * DOMFileSystem instance can be operated on in the same way as + * the Temporary and Persistant file systems (see + * http://www.w3.org/TR/file-system-api/), except that the filesystem + * object returned for Sync FileSystem does NOT support directory + * operations (yet). You can get a list of file entries by reading + * the root directory (by creating a new DirectoryReader), + * but cannot create a new directory in it. + * + * <p>Calling this multiple times from the same app will return the same + * handle to the same file system. + * + * <p>Note this call can fail. For example, if the user is not signed in + * to Chrome or if there is no network operation. To handle these errors + * it is important chrome.runtime.lastError is checked in the callback. + * + * @param {function(!FileSystem)} callback A callback type for + * requestFileSystem. + * @see https://developer.chrome.com/apps/syncFileSystem#method-requestFileSystem + */ +chrome.syncFileSystem.requestFileSystem = function(callback) {}; + + +/** + * Sets the default conflict resolution policy for the 'syncable' file + * storage for the app. By default it is set to 'last_write_win'. + * When conflict resolution policy is set to 'last_write_win' conflicts + * for existing files are automatically resolved next time the file is updated. + * {@code callback} can be optionally given to know if the request has + * succeeded or not. + * + * @param {string} policy Any of 'last_write_win' or 'manual' + * @param {function()=} opt_callback + * + * @see https://developer.chrome.com/apps/syncFileSystem#method-setConflictResolutionPolicy + */ +chrome.syncFileSystem.setConflictResolutionPolicy = + function(policy, opt_callback) {}; + + +/** + * Gets the current conflict resolution policy. + * + * @param {function(string)} callback Accepting any of 'last_write_win' + * or 'manual'. + * @see https://developer.chrome.com/apps/syncFileSystem#method-getConflictResolutionPolicy + */ +chrome.syncFileSystem.getConflictResolutionPolicy = function(callback) {}; + + +/** + * Returns the current usage and quota in bytes for the 'syncable' file + * storage for the app. + * + * @param {!FileSystem} fileSystem + * @param {function(!Object)} callback Taking an object substantially similar + * to {@code {'usageBytes': number, quotaBytes: number}}. + * @see https://developer.chrome.com/apps/syncFileSystem#method-getUsageAndQuota + */ +chrome.syncFileSystem.getUsageAndQuota = function(fileSystem, callback) {}; + + +/** + * Returns the FileStatus for the given fileEntry. The status value can be + * 'synced', 'pending' or 'conflicting'. Note that 'conflicting' state only + * happens when the service's conflict resolution policy is set to 'manual'. + * + * @param {!Entry} fileEntry + * @param {function(string)} callback Called with any of 'synced', 'pending' + * or 'conflicting'. + * + * @see https://developer.chrome.com/apps/syncFileSystem#method-getFileStatus + */ +chrome.syncFileSystem.getFileStatus = function(fileEntry, callback) {}; + + +/** + * Returns each FileStatus for the given fileEntry array. Typically called + * with the result from dirReader.readEntries(). + * + * @param {!Array.<!FileEntry>} fileEntries + * @param {function(!Array.<!Object>)} callback Each object will look like: + * {@code {'fileEntry': Entry, 'status': string, 'error': string?}}. + * + * @see https://developer.chrome.com/apps/syncFileSystem#method-getFileStatuses + */ +chrome.syncFileSystem.getFileStatuses = function(fileEntries, callback) {}; + + +/** + * Since Chrome 31. + * + * <p>Returns the current sync backend status. + * + * @param {function(string)} callback Arg is any of 'initializing', 'running', + * 'authentication_required', 'temporary_unavailable', or 'disabled'. + * + * @see https://developer.chrome.com/apps/syncFileSystem#method-getServiceStatus + */ +chrome.syncFileSystem.getServiceStatus = function(callback) {}; + + +/** + * Fired when an error or other status change has happened in the sync + * backend (for example, when the sync is temporarily disabled due + * to network or authentication error). + * + * @type {!ChromeObjectEvent} + * + * @see https://developer.chrome.com/apps/syncFileSystem#event-onServiceStatusChanged + */ +chrome.syncFileSystem.onServiceStatusChanged; + + +/** + * Fired when a file has been updated by the background sync service. + * + * @type {!ChromeObjectEvent} + * + * @see https://developer.chrome.com/apps/syncFileSystem#event-onFileStatusChanged + */ +chrome.syncFileSystem.onFileStatusChanged; + + +/** + * @const * @see http://developer.chrome.com/extensions/alarms.html */ chrome.alarms = {}; @@ -5916,6 +6227,7 @@ chrome.hid = {}; */ chrome.hid.HidGetDevicesOptions; + /** * @typedef {?{ * usagePage: number, @@ -5926,6 +6238,7 @@ chrome.hid.HidGetDevicesOptions; */ chrome.hid.HidDeviceUsage; + /** * @typedef {?{ * deviceId: number, @@ -6257,7 +6570,6 @@ chrome.notifications.ButtonClickedEvent.prototype.hasListener = chrome.notifications.ButtonClickedEvent.prototype.hasListeners = function() {}; - /** * @const * @see http://developer.chrome.com/apps/system_storage.html @@ -6391,7 +6703,6 @@ chrome.usb.ConnectionHandle.prototype.vendorId; chrome.usb.ConnectionHandle.prototype.productId; - /** * @typedef {?{ * direction: string, @@ -7017,6 +7328,7 @@ chrome.mdns = {}; chrome.mdns.MdnsService; + /** * Event whose listeners take an array of MdnsService parameter. * @constructor @@ -7078,6 +7390,7 @@ chrome.gcdPrivate = {}; chrome.gcdPrivate.Device; + /** @constructor */ chrome.gcdPrivate.ConfirmationInfo = function() {}; @@ -7214,6 +7527,7 @@ chrome.gcdPrivate.getCommandsList = function( deviceId, byUser, state, callback) {}; + /** * Event whose listeners take a chrome.gcdPrivate.Device. * @constructor @@ -7264,6 +7578,7 @@ chrome.gcdPrivate.onDeviceRemoved; chrome.bluetoothPrivate = {}; + /** @constructor */ chrome.bluetoothPrivate.PairingEvent = function() {}; @@ -7324,6 +7639,7 @@ chrome.bluetoothPrivate.setAdapterState = function(adapterState, callback) {}; chrome.bluetoothPrivate.setPairingResponse = function(options, callback) {}; + /** * Event whose listeners take a PairingEvent parameter. * @constructor diff --git a/third_party/closure_compiler/runner/runner.jar b/third_party/closure_compiler/runner/runner.jar Binary files differindex a853551..2bf497e 100644 --- a/third_party/closure_compiler/runner/runner.jar +++ b/third_party/closure_compiler/runner/runner.jar |