summaryrefslogtreecommitdiff
path: root/chromium/third_party/closure_compiler
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/closure_compiler')
-rw-r--r--chromium/third_party/closure_compiler/README.chromium4
-rw-r--r--chromium/third_party/closure_compiler/chromium_patch.diff110
-rw-r--r--chromium/third_party/closure_compiler/closure_args.gni9
-rw-r--r--chromium/third_party/closure_compiler/compile_js.gni20
-rw-r--r--chromium/third_party/closure_compiler/compiler/compiler.jarbin8191908 -> 8564756 bytes
-rw-r--r--chromium/third_party/closure_compiler/externs/accessibility_private.js25
-rw-r--r--chromium/third_party/closure_compiler/externs/activity_log_private.js13
-rw-r--r--chromium/third_party/closure_compiler/externs/arc_apps_private.js8
-rw-r--r--chromium/third_party/closure_compiler/externs/audio.js12
-rw-r--r--chromium/third_party/closure_compiler/externs/autofill_private.js27
-rw-r--r--chromium/third_party/closure_compiler/externs/automation.js47
-rw-r--r--chromium/third_party/closure_compiler/externs/bluetooth.js10
-rw-r--r--chromium/third_party/closure_compiler/externs/bluetooth_private.js18
-rw-r--r--chromium/third_party/closure_compiler/externs/bookmark_manager_private.js28
-rw-r--r--chromium/third_party/closure_compiler/externs/bookmarks.js241
-rw-r--r--chromium/third_party/closure_compiler/externs/chrome.js45
-rw-r--r--chromium/third_party/closure_compiler/externs/chrome_extensions.js43
-rw-r--r--chromium/third_party/closure_compiler/externs/chromeos_info_private.js15
-rw-r--r--chromium/third_party/closure_compiler/externs/clipboard.js2
-rw-r--r--chromium/third_party/closure_compiler/externs/command_line_private.js19
-rw-r--r--chromium/third_party/closure_compiler/externs/developer_private.js69
-rw-r--r--chromium/third_party/closure_compiler/externs/events.js63
-rw-r--r--chromium/third_party/closure_compiler/externs/extension_types.js68
-rw-r--r--chromium/third_party/closure_compiler/externs/file_manager_private.js21
-rw-r--r--chromium/third_party/closure_compiler/externs/file_system_provider.js18
-rw-r--r--chromium/third_party/closure_compiler/externs/input_method_private.js68
-rw-r--r--chromium/third_party/closure_compiler/externs/language_settings_private.js16
-rw-r--r--chromium/third_party/closure_compiler/externs/login_state.js10
-rw-r--r--chromium/third_party/closure_compiler/externs/management.js30
-rw-r--r--chromium/third_party/closure_compiler/externs/media_player_private.js4
-rw-r--r--chromium/third_party/closure_compiler/externs/metrics_private.js12
-rw-r--r--chromium/third_party/closure_compiler/externs/mime_handler_private.js8
-rw-r--r--chromium/third_party/closure_compiler/externs/networking_private.js53
-rw-r--r--chromium/third_party/closure_compiler/externs/passwords_private.js62
-rw-r--r--chromium/third_party/closure_compiler/externs/pending.js43
-rw-r--r--chromium/third_party/closure_compiler/externs/quick_unlock_private.js26
-rw-r--r--chromium/third_party/closure_compiler/externs/resources_private.js8
-rw-r--r--chromium/third_party/closure_compiler/externs/runtime.js482
-rw-r--r--chromium/third_party/closure_compiler/externs/safe_browsing_private.js10
-rw-r--r--chromium/third_party/closure_compiler/externs/settings_private.js18
-rw-r--r--chromium/third_party/closure_compiler/externs/system_display.js12
-rw-r--r--chromium/third_party/closure_compiler/externs/system_private.js4
-rw-r--r--chromium/third_party/closure_compiler/externs/tabs.js564
-rw-r--r--chromium/third_party/closure_compiler/externs/terminal_private.js155
-rw-r--r--chromium/third_party/closure_compiler/externs/test.js252
-rw-r--r--chromium/third_party/closure_compiler/externs/users_private.js18
-rw-r--r--chromium/third_party/closure_compiler/externs/virtual_keyboard_private.js209
-rw-r--r--chromium/third_party/closure_compiler/externs/webview_tag.js3
-rw-r--r--chromium/third_party/closure_compiler/externs/windows.js207
-rw-r--r--chromium/third_party/closure_compiler/interfaces/bluetooth_interface.js38
-rw-r--r--chromium/third_party/closure_compiler/interfaces/bluetooth_private_interface.js68
-rwxr-xr-xchromium/third_party/closure_compiler/js_minify.py49
-rwxr-xr-xchromium/third_party/closure_compiler/roll_closure_compiler4
53 files changed, 2848 insertions, 520 deletions
diff --git a/chromium/third_party/closure_compiler/README.chromium b/chromium/third_party/closure_compiler/README.chromium
index f56777b3aa9..220b9411d00 100644
--- a/chromium/third_party/closure_compiler/README.chromium
+++ b/chromium/third_party/closure_compiler/README.chromium
@@ -1,8 +1,8 @@
Name: Closure compiler
Short Name: closure-compiler
URL: http://github.com/google/closure-compiler
-Version: v20200112
-Date: 2020/01/21 23:27
+Version: v20200517
+Date: 2020/06/04 19:52
License: Apache 2.0
License File: LICENSE
Security Critical: no
diff --git a/chromium/third_party/closure_compiler/chromium_patch.diff b/chromium/third_party/closure_compiler/chromium_patch.diff
new file mode 100644
index 00000000000..3884cb35b09
--- /dev/null
+++ b/chromium/third_party/closure_compiler/chromium_patch.diff
@@ -0,0 +1,110 @@
+diff --git a/third_party/closure_compiler/externs/chrome.js b/third_party/closure_compiler/externs/chrome.js
+index 6559fbeb3f21..d30f339ccdc4 100644
+--- a/third_party/closure_compiler/externs/chrome.js
++++ b/third_party/closure_compiler/externs/chrome.js
+@@ -558,51 +558,6 @@ chrome.webstore.onInstallStageChanged;
+ chrome.webstore.onDownloadProgress;
+
+
+-/**
+- * @see https://developer.chrome.com/extensions/runtime.html
+- * @const
+- */
+-chrome.runtime = {};
+-
+-
+-/** @type {{message:(string|undefined)}|undefined} */
+-chrome.runtime.lastError;
+-
+-
+-/**
+- * @param {string|!Object=} opt_extensionIdOrConnectInfo Either the
+- * extensionId to connect to, in which case connectInfo params can be
+- * passed in the next optional argument, or the connectInfo params.
+- * @param {!Object=} opt_connectInfo The connectInfo object,
+- * if arg1 was the extensionId to connect to.
+- * @return {!Port} New port.
+- */
+-chrome.runtime.connect = function(
+- opt_extensionIdOrConnectInfo, opt_connectInfo) {};
+-
+-
+-/**
+- * @param {string|*} extensionIdOrMessage Either the extensionId to send the
+- * message to, in which case the message is passed as the next arg, or the
+- * message itself.
+- * @param {(*|!Object|function(*): void)=} opt_messageOrOptsOrCallback
+- * One of:
+- * The message, if arg1 was the extensionId.
+- * The options for message sending, if arg1 was the message and this
+- * argument is not a function.
+- * The callback, if arg1 was the message and this argument is a function.
+- * @param {(!Object|function(*): void)=} opt_optsOrCallback
+- * Either the options for message sending, if arg2 was the message,
+- * or the callback.
+- * @param {function(*): void=} opt_callback The callback function which
+- * takes a JSON response object sent by the handler of the request.
+- * @return {undefined}
+- */
+-chrome.runtime.sendMessage = function(
+- extensionIdOrMessage, opt_messageOrOptsOrCallback, opt_optsOrCallback,
+- opt_callback) {};
+-
+-
+ /**
+ * Returns an object representing current load times. Note that the properties
+ * on the object do not change and the function must be called again to get
+diff --git a/third_party/closure_compiler/externs/chrome_extensions.js b/third_party/closure_compiler/externs/chrome_extensions.js
+index c0fb4e1c9e17..f2bd83291aec 100644
+--- a/third_party/closure_compiler/externs/chrome_extensions.js
++++ b/third_party/closure_compiler/externs/chrome_extensions.js
+@@ -2528,6 +2528,49 @@ chrome.extension.onRequest;
+ /** @type {!ChromeEvent} */
+ chrome.extension.onRequestExternal;
+
++/**
++ * @see https://developer.chrome.com/extensions/runtime.html
++ * @const
++ */
++chrome.runtime = {};
++
++
++/** @type {{message:(string|undefined)}|undefined} */
++chrome.runtime.lastError;
++
++
++/**
++ * @param {string|!Object=} opt_extensionIdOrConnectInfo Either the
++ * extensionId to connect to, in which case connectInfo params can be
++ * passed in the next optional argument, or the connectInfo params.
++ * @param {!Object=} opt_connectInfo The connectInfo object,
++ * if arg1 was the extensionId to connect to.
++ * @return {!Port} New port.
++ */
++chrome.runtime.connect = function(
++ opt_extensionIdOrConnectInfo, opt_connectInfo) {};
++
++
++/**
++ * @param {string|*} extensionIdOrMessage Either the extensionId to send the
++ * message to, in which case the message is passed as the next arg, or the
++ * message itself.
++ * @param {(*|!Object|function(*): void)=} opt_messageOrOptsOrCallback
++ * One of:
++ * The message, if arg1 was the extensionId.
++ * The options for message sending, if arg1 was the message and this
++ * argument is not a function.
++ * The callback, if arg1 was the message and this argument is a function.
++ * @param {(!Object|function(*): void)=} opt_optsOrCallback
++ * Either the options for message sending, if arg2 was the message,
++ * or the callback.
++ * @param {function(*): void=} opt_callback The callback function which
++ * takes a JSON response object sent by the handler of the request.
++ * @return {undefined}
++ */
++chrome.runtime.sendMessage = function(
++ extensionIdOrMessage, opt_messageOrOptsOrCallback, opt_optsOrCallback,
++ opt_callback) {};
+
+
+ /** @type {string} */
diff --git a/chromium/third_party/closure_compiler/closure_args.gni b/chromium/third_party/closure_compiler/closure_args.gni
index c8a34638a57..b9fc4f890d9 100644
--- a/chromium/third_party/closure_compiler/closure_args.gni
+++ b/chromium/third_party/closure_compiler/closure_args.gni
@@ -48,6 +48,7 @@ js_modules_args = [
# gen/ui/webui/resources are js_module_roots.
"module_resolution=BROWSER_WITH_TRANSFORMED_PREFIXES",
"browser_resolver_prefix_replacements=\"chrome://resources/=./\"",
+ "browser_resolver_prefix_replacements=\"//resources/=./\"",
# Turn off primarily because cr.define() should not be used in any JS Modules
# based code, and secondarily because of b/133333578.
@@ -57,10 +58,16 @@ js_modules_args = [
polymer3_args = js_modules_args + [
"browser_resolver_prefix_replacements=\"../polymer/polymer_bundled.min.js=../polymer/polymer_bundled.js\"",
"browser_resolver_prefix_replacements=\"chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js=../../third_party/polymer/v3_0/components-chromium/polymer/polymer_bundled.js\"",
+ "browser_resolver_prefix_replacements=\"//resources/polymer/v3_0/polymer/polymer_bundled.min.js=../../third_party/polymer/v3_0/components-chromium/polymer/polymer_bundled.js\"",
"browser_resolver_prefix_replacements=\"chrome://resources/polymer/v3_0/=../../third_party/polymer/v3_0/components-chromium/\"",
+ "browser_resolver_prefix_replacements=\"//resources/polymer/v3_0/=../../third_party/polymer/v3_0/components-chromium/\"",
"hide_warnings_for=externs.zip",
- "hide_warnings_for=../../third_party/polymer/v3_0/components-chromium/",
+
+ # TODO(crbug.com/1093048): Add the leading '../../' back to
+ # the path once the CrOS chroot no longer uses symlinks when
+ # building chrome.
+ "hide_warnings_for=third_party/polymer/v3_0/components-chromium/",
"polymer_pass=false",
# Note: "2" is counter-intuitively the correct value to use for Polymer 3.
diff --git a/chromium/third_party/closure_compiler/compile_js.gni b/chromium/third_party/closure_compiler/compile_js.gni
index 97827178cf7..7fac2599b27 100644
--- a/chromium/third_party/closure_compiler/compile_js.gni
+++ b/chromium/third_party/closure_compiler/compile_js.gni
@@ -3,7 +3,13 @@
# found in the LICENSE file.
import("//third_party/closure_compiler/closure_args.gni")
-import("//ui/webui/webui_features.gni")
+
+declare_args() {
+ # Enable closure type-checking for Chrome's web technology-based UI. This
+ # enables the webui_closure_compile target which does a no-op without this
+ # flag enabled. Requires Java.
+ enable_js_type_check = is_chromeos || is_linux || is_android
+}
script_path = "//third_party/closure_compiler"
compiler_path = "$script_path/compiler/compiler.jar"
@@ -256,7 +262,7 @@ template("js_binary") {
# Defines a target that compiles a group of js_library targets.
template("js_type_check") {
- if (closure_compile) {
+ if (enable_js_type_check) {
js_binary(target_name) {
sources = []
checks_only = true
@@ -275,3 +281,13 @@ template("js_type_check") {
}
}
}
+
+# These externs files depend on each other (often in a cyclical way), and
+# therefore makes more sense to add all of them as a dependency together.
+chrome_extension_public_externs = [
+ "$externs_path/events.js",
+ "$externs_path/extension_types.js",
+ "$externs_path/runtime.js",
+ "$externs_path/tabs.js",
+ "$externs_path/windows.js",
+]
diff --git a/chromium/third_party/closure_compiler/compiler/compiler.jar b/chromium/third_party/closure_compiler/compiler/compiler.jar
index 127d816a154..96ddab4a77b 100644
--- a/chromium/third_party/closure_compiler/compiler/compiler.jar
+++ b/chromium/third_party/closure_compiler/compiler/compiler.jar
Binary files differ
diff --git a/chromium/third_party/closure_compiler/externs/accessibility_private.js b/chromium/third_party/closure_compiler/externs/accessibility_private.js
index 80a2b60b927..11e6d8f2e5b 100644
--- a/chromium/third_party/closure_compiler/externs/accessibility_private.js
+++ b/chromium/third_party/closure_compiler/externs/accessibility_private.js
@@ -11,9 +11,7 @@
/** @fileoverview Externs generated from namespace: accessibilityPrivate */
-/**
- * @const
- */
+/** @const */
chrome.accessibilityPrivate = {};
/**
@@ -197,7 +195,7 @@ chrome.accessibilityPrivate.getDisplayNameForLocale = function(localeCodeToTrans
/**
* Called to request battery status from Chrome OS system.
- * @param {function(string):void} callback Returns battery description as a
+ * @param {function(string): void} callback Returns battery description as a
* string.
*/
chrome.accessibilityPrivate.getBatteryDescription = function(callback) {};
@@ -246,19 +244,6 @@ chrome.accessibilityPrivate.setKeyboardListener = function(enabled, capture) {};
chrome.accessibilityPrivate.darkenScreen = function(enabled) {};
/**
- * Shows or hides the Switch Access menu. If shown, it is at the indicated
- * location.
-TODO(anastasi): Remove this function once the menu refactor is
- * complete.
- * @param {boolean} show If true, show the menu. If false, hide the menu.
- * @param {!chrome.accessibilityPrivate.ScreenRect} element_bounds Position of
- * an element, in global screen coordinates, to place the menu next to.
- * @param {number} item_count The number of items that need to be shown in the
- * menu.
- */
-chrome.accessibilityPrivate.setSwitchAccessMenuState = function(show, element_bounds, item_count) {};
-
-/**
* When enabled, forwards key events to the Switch Access extension
* @param {boolean} shouldForward
*/
@@ -311,9 +296,9 @@ chrome.accessibilityPrivate.sendSyntheticMouseEvent = function(mouseEvent) {};
chrome.accessibilityPrivate.onSelectToSpeakStateChanged = function(state) {};
/**
- * Called by the Autoclick extension when findScrollableBoundsForPoint has found
- * a scrolling container. |rect| will be the bounds of the nearest scrollable
- * ancestor of the node at the point requested using
+ * Called by the Accessibility Common extension when findScrollableBoundsForPoint
+ * has found a scrolling container. |rect| will be the bounds of the nearest
+ * scrollable ancestor of the node at the point requested using
* findScrollableBoundsForPoint.
* @param {!chrome.accessibilityPrivate.ScreenRect} rect
*/
diff --git a/chromium/third_party/closure_compiler/externs/activity_log_private.js b/chromium/third_party/closure_compiler/externs/activity_log_private.js
index 2b702c68e29..669ee0df992 100644
--- a/chromium/third_party/closure_compiler/externs/activity_log_private.js
+++ b/chromium/third_party/closure_compiler/externs/activity_log_private.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -11,9 +11,7 @@
/** @fileoverview Externs generated from namespace: activityLogPrivate */
-/**
- * @const
- */
+/** @const */
chrome.activityLogPrivate = {};
/**
@@ -102,7 +100,8 @@ chrome.activityLogPrivate.ActivityResultSet;
* Retrieves activity from the ActivityLog that matches the specified filter.
* @param {!chrome.activityLogPrivate.Filter} filter Fill out the fields that
* you want to search for in the database.
- * @param {function(!chrome.activityLogPrivate.ActivityResultSet):void} callback
+ * @param {function(!chrome.activityLogPrivate.ActivityResultSet): void}
+ * callback
*/
chrome.activityLogPrivate.getExtensionActivities = function(filter, callback) {};
@@ -111,14 +110,14 @@ chrome.activityLogPrivate.getExtensionActivities = function(filter, callback) {}
* activity IDs.
* @param {!Array<string>} activityIds Erases only the activities which IDs are
* listed in the array.
- * @param {function():void=} callback
+ * @param {function(): void=} callback
*/
chrome.activityLogPrivate.deleteActivities = function(activityIds, callback) {};
/**
* Deletes activities in the ActivityLog database specified by the extension ID.
* @param {string} extensionId The ID of the extension to delete activities for.
- * @param {function():void=} callback
+ * @param {function(): void=} callback
*/
chrome.activityLogPrivate.deleteActivitiesByExtension = function(extensionId, callback) {};
diff --git a/chromium/third_party/closure_compiler/externs/arc_apps_private.js b/chromium/third_party/closure_compiler/externs/arc_apps_private.js
index e32f62b7eec..25519fb4ccc 100644
--- a/chromium/third_party/closure_compiler/externs/arc_apps_private.js
+++ b/chromium/third_party/closure_compiler/externs/arc_apps_private.js
@@ -11,9 +11,7 @@
/** @fileoverview Externs generated from namespace: arcAppsPrivate */
-/**
- * @const
- */
+/** @const */
chrome.arcAppsPrivate = {};
/**
@@ -26,7 +24,7 @@ chrome.arcAppsPrivate.AppInfo;
/**
* Returns info of the installed ARC apps that are launchable, including ready
* and non-ready apps.
- * @param {function(!Array<!chrome.arcAppsPrivate.AppInfo>):void} callback
+ * @param {function(!Array<!chrome.arcAppsPrivate.AppInfo>): void} callback
*/
chrome.arcAppsPrivate.getLaunchableApps = function(callback) {};
@@ -35,7 +33,7 @@ chrome.arcAppsPrivate.getLaunchableApps = function(callback) {};
* if it's ready, otherwise it will be launched when it becomes ready. The
* callback is called as soon as the launch is scheduled.
* @param {string} packageName
- * @param {function():void=} callback
+ * @param {function(): void=} callback
*/
chrome.arcAppsPrivate.launchApp = function(packageName, callback) {};
diff --git a/chromium/third_party/closure_compiler/externs/audio.js b/chromium/third_party/closure_compiler/externs/audio.js
index d22a30b5916..52ba0dbcf9e 100644
--- a/chromium/third_party/closure_compiler/externs/audio.js
+++ b/chromium/third_party/closure_compiler/externs/audio.js
@@ -139,7 +139,7 @@ chrome.audio.LevelChangedEvent;
* filter the list of returned audio devices. If the filter is not set
* or set to <code>{}</code>, returned device list will contain all
* available audio devices.
- * @param {function(!Array<!chrome.audio.AudioDeviceInfo>):void} callback
+ * @param {function(!Array<!chrome.audio.AudioDeviceInfo>): void} callback
* Reports the requested list of audio devices.
* @see https://developer.chrome.com/extensions/audio#method-getDevices
*/
@@ -155,7 +155,7 @@ chrome.audio.getDevices = function(filter, callback) {};
* of strings, this method of setting active devices is deprecated and
* should not be relied upon to work. Please use $(ref:DeviceIdLists)
* instead. </p>
- * @param {function():void} callback
+ * @param {function(): void} callback
* @see https://developer.chrome.com/extensions/audio#method-setActiveDevices
*/
chrome.audio.setActiveDevices = function(ids, callback) {};
@@ -164,7 +164,7 @@ chrome.audio.setActiveDevices = function(ids, callback) {};
* Sets the properties for the input or output device.
* @param {string} id
* @param {!chrome.audio.DeviceProperties} properties
- * @param {function():void} callback
+ * @param {function(): void} callback
* @see https://developer.chrome.com/extensions/audio#method-setProperties
*/
chrome.audio.setProperties = function(id, properties, callback) {};
@@ -173,7 +173,7 @@ chrome.audio.setProperties = function(id, properties, callback) {};
* Gets the system-wide mute state for the specified stream type.
* @param {!chrome.audio.StreamType} streamType Stream type for which mute state
* should be fetched.
- * @param {function(boolean):void} callback Callback reporting whether mute is
+ * @param {function(boolean): void} callback Callback reporting whether mute is
* set or not for specified stream type.
* @see https://developer.chrome.com/extensions/audio#method-getMute
*/
@@ -185,14 +185,14 @@ chrome.audio.getMute = function(streamType, callback) {};
* @param {!chrome.audio.StreamType} streamType Stream type for which mute state
* should be set.
* @param {boolean} isMuted New mute value.
- * @param {function():void=} callback
+ * @param {function(): void=} callback
* @see https://developer.chrome.com/extensions/audio#method-setMute
*/
chrome.audio.setMute = function(streamType, isMuted, callback) {};
/**
* Gets the information of all audio output and input devices.
- * @param {function(!Array<!chrome.audio.OutputDeviceInfo>, !Array<!chrome.audio.InputDeviceInfo>):void}
+ * @param {function(!Array<!chrome.audio.OutputDeviceInfo>, !Array<!chrome.audio.InputDeviceInfo>): void}
* callback
* @deprecated Use $(ref:getDevices) instead.
* @see https://developer.chrome.com/extensions/audio#method-getInfo
diff --git a/chromium/third_party/closure_compiler/externs/autofill_private.js b/chromium/third_party/closure_compiler/externs/autofill_private.js
index 1fac8f52edb..e8d25946322 100644
--- a/chromium/third_party/closure_compiler/externs/autofill_private.js
+++ b/chromium/third_party/closure_compiler/externs/autofill_private.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -11,9 +11,7 @@
/** @fileoverview Externs generated from namespace: autofillPrivate */
-/**
- * @const
- */
+/** @const */
chrome.autofillPrivate = {};
/**
@@ -102,6 +100,7 @@ chrome.autofillPrivate.AddressComponents;
* cardNumber: (string|undefined),
* expirationMonth: (string|undefined),
* expirationYear: (string|undefined),
+ * nickname: (string|undefined),
* metadata: (!chrome.autofillPrivate.AutofillMetadata|undefined)
* }}
*/
@@ -126,8 +125,8 @@ chrome.autofillPrivate.saveAddress = function(address) {};
/**
* Gets the list of all countries.
- * @param {function(!Array<!chrome.autofillPrivate.CountryEntry>):void} callback
- * Callback which will be called with the countries.
+ * @param {function(!Array<!chrome.autofillPrivate.CountryEntry>): void}
+ * callback Callback which will be called with the countries.
*/
chrome.autofillPrivate.getCountryList = function(callback) {};
@@ -136,15 +135,15 @@ chrome.autofillPrivate.getCountryList = function(callback) {};
* @param {string} countryCode A two-character string representing the address'
* country whose components should be returned. See autofill_country.cc
* for a list of valid codes.
- * @param {function(!chrome.autofillPrivate.AddressComponents):void} callback
+ * @param {function(!chrome.autofillPrivate.AddressComponents): void} callback
* Callback which will be called with components.
*/
chrome.autofillPrivate.getAddressComponents = function(countryCode, callback) {};
/**
* Gets the list of addresses.
- * @param {function(!Array<!chrome.autofillPrivate.AddressEntry>):void} callback
- * Callback which will be called with the list of addresses.
+ * @param {function(!Array<!chrome.autofillPrivate.AddressEntry>): void}
+ * callback Callback which will be called with the list of addresses.
*/
chrome.autofillPrivate.getAddressList = function(callback) {};
@@ -167,14 +166,14 @@ chrome.autofillPrivate.removeEntry = function(guid) {};
* not be returned in the list of valid numbers.
* @param {!chrome.autofillPrivate.ValidatePhoneParams} params The parameters to
* this function.
- * @param {function(!Array<string>):void} callback Callback which will be called
- * with validated phone numbers.
+ * @param {function(!Array<string>): void} callback Callback which will be
+ * called with validated phone numbers.
*/
chrome.autofillPrivate.validatePhoneNumbers = function(params, callback) {};
/**
* Gets the list of credit cards.
- * @param {function(!Array<!chrome.autofillPrivate.CreditCardEntry>):void}
+ * @param {function(!Array<!chrome.autofillPrivate.CreditCardEntry>): void}
* callback Callback which will be called with the list of credit cards.
*/
chrome.autofillPrivate.getCreditCardList = function(callback) {};
@@ -204,8 +203,8 @@ chrome.autofillPrivate.setCreditCardFIDOAuthEnabledState = function(enabled) {};
/**
* Gets the list of UPI IDs (a.k.a. Virtual Payment Addresses).
- * @param {function(!Array<!string>):void}
- * callback Callback which will be called with the list of UPI IDs.
+ * @param {function(!Array<string>): void} callback Callback which will be
+ * called with the list of UPI IDs.
*/
chrome.autofillPrivate.getUpiIdList = function(callback) {};
diff --git a/chromium/third_party/closure_compiler/externs/automation.js b/chromium/third_party/closure_compiler/externs/automation.js
index f1b501139f6..02cd79c35e2 100644
--- a/chromium/third_party/closure_compiler/externs/automation.js
+++ b/chromium/third_party/closure_compiler/externs/automation.js
@@ -11,9 +11,7 @@
/** @fileoverview Externs generated from namespace: automation */
-/**
- * @const
- */
+/** @const */
chrome.automation = {};
/**
@@ -54,7 +52,6 @@ chrome.automation.EventType = {
MENU_LIST_ITEM_SELECTED: 'menuListItemSelected',
MENU_LIST_VALUE_CHANGED: 'menuListValueChanged',
MENU_POPUP_END: 'menuPopupEnd',
- MENU_POPUP_HIDE: 'menuPopupHide',
MENU_POPUP_START: 'menuPopupStart',
MENU_START: 'menuStart',
MOUSE_CANCELED: 'mouseCanceled',
@@ -515,9 +512,9 @@ chrome.automation.FindParams;
/**
* @typedef {{
- * anchorObject: Object,
+ * anchorObject: chrome.automation.AutomationNode,
* anchorOffset: number,
- * focusObject: Object,
+ * focusObject: chrome.automation.AutomationNode,
* focusOffset: number
* }}
* @see https://developer.chrome.com/extensions/automation#type-SetDocumentSelectionParams
@@ -688,7 +685,7 @@ chrome.automation.AutomationNode.prototype.location;
* asynchronously.
* @param {number} startIndex
* @param {number} endIndex
- * @param {function(!chrome.automation.Rect):void} callback
+ * @param {function(!chrome.automation.Rect): void} callback
* @see https://developer.chrome.com/extensions/automation#method-boundsForRange
*/
chrome.automation.AutomationNode.prototype.boundsForRange = function(startIndex, endIndex, callback) {};
@@ -1626,7 +1623,7 @@ chrome.automation.AutomationNode.prototype.hitTest = function(x, y, eventToFire)
* the resulting hit node.
* @param {number} x
* @param {number} y
- * @param {function(!chrome.automation.AutomationNode):void} callback
+ * @param {function(!chrome.automation.AutomationNode): void} callback
* @see https://developer.chrome.com/extensions/automation#method-hitTestWithReply
*/
chrome.automation.AutomationNode.prototype.hitTestWithReply = function(x, y, callback) {};
@@ -1723,7 +1720,7 @@ chrome.automation.AutomationNode.prototype.suspendMedia = function() {};
/**
* Scrolls this scrollable container backward.
- * @param {function(boolean):void} callback Callback called for actions with a
+ * @param {function(boolean): void} callback Callback called for actions with a
* response.
* @see https://developer.chrome.com/extensions/automation#method-scrollBackward
*/
@@ -1731,7 +1728,7 @@ chrome.automation.AutomationNode.prototype.scrollBackward = function(callback) {
/**
* Scrolls this scrollable container forward.
- * @param {function(boolean):void} callback Callback called for actions with a
+ * @param {function(boolean): void} callback Callback called for actions with a
* response.
* @see https://developer.chrome.com/extensions/automation#method-scrollForward
*/
@@ -1739,7 +1736,7 @@ chrome.automation.AutomationNode.prototype.scrollForward = function(callback) {}
/**
* Scrolls this scrollable container up.
- * @param {function(boolean):void} callback Callback called for actions with a
+ * @param {function(boolean): void} callback Callback called for actions with a
* response.
* @see https://developer.chrome.com/extensions/automation#method-scrollUp
*/
@@ -1747,7 +1744,7 @@ chrome.automation.AutomationNode.prototype.scrollUp = function(callback) {};
/**
* Scrolls this scrollable container down.
- * @param {function(boolean):void} callback Callback called for actions with a
+ * @param {function(boolean): void} callback Callback called for actions with a
* response.
* @see https://developer.chrome.com/extensions/automation#method-scrollDown
*/
@@ -1755,7 +1752,7 @@ chrome.automation.AutomationNode.prototype.scrollDown = function(callback) {};
/**
* Scrolls this scrollable container left.
- * @param {function(boolean):void} callback Callback called for actions with a
+ * @param {function(boolean): void} callback Callback called for actions with a
* response.
* @see https://developer.chrome.com/extensions/automation#method-scrollLeft
*/
@@ -1763,7 +1760,7 @@ chrome.automation.AutomationNode.prototype.scrollLeft = function(callback) {};
/**
* Scrolls this scrollable container right.
- * @param {function(boolean):void} callback Callback called for actions with a
+ * @param {function(boolean): void} callback Callback called for actions with a
* response.
* @see https://developer.chrome.com/extensions/automation#method-scrollRight
*/
@@ -1772,7 +1769,7 @@ chrome.automation.AutomationNode.prototype.scrollRight = function(callback) {};
/**
* Adds a listener for the given event type and event phase.
* @param {!chrome.automation.EventType} eventType
- * @param {function(!chrome.automation.AutomationEvent):void} listener A
+ * @param {function(!chrome.automation.AutomationEvent): void} listener A
* listener for events on an <code>AutomationNode</code>.
* @param {boolean} capture
* @see https://developer.chrome.com/extensions/automation#method-addEventListener
@@ -1782,7 +1779,7 @@ chrome.automation.AutomationNode.prototype.addEventListener = function(eventType
/**
* Removes a listener for the given event type and event phase.
* @param {!chrome.automation.EventType} eventType
- * @param {function(!chrome.automation.AutomationEvent):void} listener A
+ * @param {function(!chrome.automation.AutomationEvent): void} listener A
* listener for events on an <code>AutomationNode</code>.
* @param {boolean} capture
* @see https://developer.chrome.com/extensions/automation#method-removeEventListener
@@ -1801,7 +1798,7 @@ chrome.automation.AutomationNode.prototype.removeEventListener = function(eventT
* accessibility via hiding it using CSS or using aria-hidden), this will return
* the nearest ancestor which does correspond to an automation node.</p>
* @param {string} selector
- * @param {function(!chrome.automation.AutomationNode):void} callback Called
+ * @param {function(!chrome.automation.AutomationNode): void} callback Called
* when the result for a <code>query</code> is available.
* @see https://developer.chrome.com/extensions/automation#method-domQuerySelector
*/
@@ -1862,7 +1859,7 @@ chrome.automation.AutomationNode.prototype.languageAnnotationForStringAttribute
* notification that the tree has fully loaded (the previous root node reference
* will stop working at or before this point).
* @param {number=} tabId
- * @param {function(!chrome.automation.AutomationNode):void=} callback Called
+ * @param {function(!chrome.automation.AutomationNode): void=} callback Called
* when the <code>AutomationNode</code> for the page is available.
* @see https://developer.chrome.com/extensions/automation#method-getTree
*/
@@ -1871,7 +1868,7 @@ chrome.automation.getTree = function(tabId, callback) {};
/**
* Get the automation tree for the whole desktop which consists of all on screen
* views. Note this API is currently only supported on Chrome OS.
- * @param {function(!chrome.automation.AutomationNode):void} callback Called
+ * @param {function(!chrome.automation.AutomationNode): void} callback Called
* when the <code>AutomationNode</code> for the page is available.
* @see https://developer.chrome.com/extensions/automation#method-getDesktop
*/
@@ -1880,7 +1877,7 @@ chrome.automation.getDesktop = function(callback) {};
/**
* Get the automation node that currently has focus, globally. Will return null
* if none of the nodes in any loaded trees have focus.
- * @param {function(!chrome.automation.AutomationNode):void} callback Called
+ * @param {function(!chrome.automation.AutomationNode): void} callback Called
* with the <code>AutomationNode</code> that currently has focus.
* @see https://developer.chrome.com/extensions/automation#method-getFocus
*/
@@ -1890,7 +1887,7 @@ chrome.automation.getFocus = function(callback) {};
* Get the automation node that currently has accessibility focus, globally.
* Will return null if none of the nodes in any loaded trees have accessibility
* focus.
- * @param {function(!chrome.automation.AutomationNode):void} callback Called
+ * @param {function(!chrome.automation.AutomationNode): void} callback Called
* with the <code>AutomationNode</code> that currently has accessibility
* focus.
* @see https://developer.chrome.com/extensions/automation#method-getAccessibilityFocus
@@ -1903,16 +1900,16 @@ chrome.automation.getAccessibilityFocus = function(callback) {};
* tree changes to listen to, and note that listnening to all tree changes can
* be expensive.
* @param {!chrome.automation.TreeChangeObserverFilter} filter
- * @param {function(!chrome.automation.TreeChange):void} observer A listener for
- * changes on the <code>AutomationNode</code> tree.
+ * @param {function(!chrome.automation.TreeChange): void} observer A listener
+ * for changes on the <code>AutomationNode</code> tree.
* @see https://developer.chrome.com/extensions/automation#method-addTreeChangeObserver
*/
chrome.automation.addTreeChangeObserver = function(filter, observer) {};
/**
* Remove a tree change observer.
- * @param {function(!chrome.automation.TreeChange):void} observer A listener for
- * changes on the <code>AutomationNode</code> tree.
+ * @param {function(!chrome.automation.TreeChange): void} observer A listener
+ * for changes on the <code>AutomationNode</code> tree.
* @see https://developer.chrome.com/extensions/automation#method-removeTreeChangeObserver
*/
chrome.automation.removeTreeChangeObserver = function(observer) {};
diff --git a/chromium/third_party/closure_compiler/externs/bluetooth.js b/chromium/third_party/closure_compiler/externs/bluetooth.js
index ad06a288e9f..e2a685be29b 100644
--- a/chromium/third_party/closure_compiler/externs/bluetooth.js
+++ b/chromium/third_party/closure_compiler/externs/bluetooth.js
@@ -112,7 +112,7 @@ chrome.bluetooth.BluetoothFilter;
/**
* Get information about the Bluetooth adapter.
- * @param {function(!chrome.bluetooth.AdapterState):void} callback Called with
+ * @param {function(!chrome.bluetooth.AdapterState): void} callback Called with
* an AdapterState object describing the adapter state.
* @see https://developer.chrome.com/extensions/bluetooth#method-getAdapterState
*/
@@ -121,7 +121,7 @@ chrome.bluetooth.getAdapterState = function(callback) {};
/**
* Get information about a Bluetooth device known to the system.
* @param {string} deviceAddress Address of device to get.
- * @param {function(!chrome.bluetooth.Device):void} callback Called with the
+ * @param {function(!chrome.bluetooth.Device): void} callback Called with the
* Device object describing the device.
* @see https://developer.chrome.com/extensions/bluetooth#method-getDevice
*/
@@ -135,7 +135,7 @@ chrome.bluetooth.getDevice = function(deviceAddress, callback) {};
* to <code>{}</code>, returned device list will contain all bluetooth
* devices. Right now this is only supported in ChromeOS, for other
* platforms, a full list is returned.
- * @param {function(!Array<!chrome.bluetooth.Device>):void=} callback Called when
+ * @param {function(!Array<!chrome.bluetooth.Device>): void=} callback Called when
* the search is completed.
* @see https://developer.chrome.com/extensions/bluetooth#method-getDevices
*/
@@ -149,14 +149,14 @@ chrome.bluetooth.getDevices = function(filter, callback) {};
* will fail to start if this application has already called startDiscovery.
* Discovery can be resource intensive: stopDiscovery should be called as soon
* as possible.</p>
- * @param {function():void=} callback Called to indicate success or failure.
+ * @param {function(): void=} callback Called to indicate success or failure.
* @see https://developer.chrome.com/extensions/bluetooth#method-startDiscovery
*/
chrome.bluetooth.startDiscovery = function(callback) {};
/**
* Stop discovery.
- * @param {function():void=} callback Called to indicate success or failure.
+ * @param {function(): void=} callback Called to indicate success or failure.
* @see https://developer.chrome.com/extensions/bluetooth#method-stopDiscovery
*/
chrome.bluetooth.stopDiscovery = function(callback) {};
diff --git a/chromium/third_party/closure_compiler/externs/bluetooth_private.js b/chromium/third_party/closure_compiler/externs/bluetooth_private.js
index 39020d2dc2c..3ae16f369e7 100644
--- a/chromium/third_party/closure_compiler/externs/bluetooth_private.js
+++ b/chromium/third_party/closure_compiler/externs/bluetooth_private.js
@@ -14,9 +14,7 @@
/** @fileoverview Externs generated from namespace: bluetoothPrivate */
-/**
- * @const
- */
+/** @const */
chrome.bluetoothPrivate = {};
/**
@@ -111,35 +109,35 @@ chrome.bluetoothPrivate.DiscoveryFilter;
* Changes the state of the Bluetooth adapter.
* @param {!chrome.bluetoothPrivate.NewAdapterState} adapterState The new state
* of the adapter.
- * @param {function():void=} callback Called when all the state changes have
+ * @param {function(): void=} callback Called when all the state changes have
* been completed.
*/
chrome.bluetoothPrivate.setAdapterState = function(adapterState, callback) {};
/**
* @param {!chrome.bluetoothPrivate.SetPairingResponseOptions} options
- * @param {function():void=} callback
+ * @param {function(): void=} callback
*/
chrome.bluetoothPrivate.setPairingResponse = function(options, callback) {};
/**
* Tears down all connections to the given device.
* @param {string} deviceAddress
- * @param {function():void=} callback
+ * @param {function(): void=} callback
*/
chrome.bluetoothPrivate.disconnectAll = function(deviceAddress, callback) {};
/**
* Forgets the given device.
* @param {string} deviceAddress
- * @param {function():void=} callback
+ * @param {function(): void=} callback
*/
chrome.bluetoothPrivate.forgetDevice = function(deviceAddress, callback) {};
/**
* Set or clear discovery filter.
* @param {!chrome.bluetoothPrivate.DiscoveryFilter} discoveryFilter
- * @param {function():void=} callback
+ * @param {function(): void=} callback
*/
chrome.bluetoothPrivate.setDiscoveryFilter = function(discoveryFilter, callback) {};
@@ -148,14 +146,14 @@ chrome.bluetoothPrivate.setDiscoveryFilter = function(discoveryFilter, callback)
* address is invalid or the device is already connected. Otherwise this will
* succeed and invoke |callback| with ConnectResultType.
* @param {string} deviceAddress
- * @param {function(!chrome.bluetoothPrivate.ConnectResultType):void=} callback
+ * @param {function(!chrome.bluetoothPrivate.ConnectResultType): void=} callback
*/
chrome.bluetoothPrivate.connect = function(deviceAddress, callback) {};
/**
* Pairs the given device.
* @param {string} deviceAddress
- * @param {function():void=} callback
+ * @param {function(): void=} callback
*/
chrome.bluetoothPrivate.pair = function(deviceAddress, callback) {};
diff --git a/chromium/third_party/closure_compiler/externs/bookmark_manager_private.js b/chromium/third_party/closure_compiler/externs/bookmark_manager_private.js
index f598aab78ba..33f8503093d 100644
--- a/chromium/third_party/closure_compiler/externs/bookmark_manager_private.js
+++ b/chromium/third_party/closure_compiler/externs/bookmark_manager_private.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -10,13 +10,11 @@
// See https://chromium.googlesource.com/chromium/src/+/master/docs/closure_compilation.md
// IMPORTANT NOTE: Work-around for crbug.com/543822
-// s/chrome.bookmarkManagerPrivate.bookmarks.BookmarkTreeNode/BookmarkTreeNode/
+// s/chrome.bookmarkManagerPrivate.bookmarks.BookmarkTreeNode/chrome.bookmarks.BookmarkTreeNode/
/** @fileoverview Externs generated from namespace: bookmarkManagerPrivate */
-/**
- * @const
- */
+/** @const */
chrome.bookmarkManagerPrivate = {};
/**
@@ -42,14 +40,14 @@ chrome.bookmarkManagerPrivate.BookmarkNodeData;
/**
* Copies the given bookmarks into the clipboard.
* @param {!Array<string>} idList An array of string-valued ids
- * @param {function():void=} callback
+ * @param {function(): void=} callback
*/
chrome.bookmarkManagerPrivate.copy = function(idList, callback) {};
/**
* Cuts the given bookmarks into the clipboard.
* @param {!Array<string>} idList An array of string-valued ids
- * @param {function():void=} callback
+ * @param {function(): void=} callback
*/
chrome.bookmarkManagerPrivate.cut = function(idList, callback) {};
@@ -59,14 +57,14 @@ chrome.bookmarkManagerPrivate.cut = function(idList, callback) {};
* @param {string} parentId
* @param {!Array<string>=} selectedIdList An array of string-valued ids for
* selected bookmarks.
- * @param {function():void=} callback
+ * @param {function(): void=} callback
*/
chrome.bookmarkManagerPrivate.paste = function(parentId, selectedIdList, callback) {};
/**
* Whether there are any bookmarks that can be pasted.
* @param {string} parentId The ID of the folder to paste into.
- * @param {function(boolean):void} callback
+ * @param {function(boolean): void} callback
*/
chrome.bookmarkManagerPrivate.canPaste = function(parentId, callback) {};
@@ -81,17 +79,17 @@ chrome.bookmarkManagerPrivate.sortChildren = function(parentId) {};
* @param {!Array<string>} idList An array of string-valued ids.
* @param {number} dragNodeIndex The index of the dragged node in |idList|
* @param {boolean} isFromTouch True if the drag was initiated from touch.
- * @param {number} offsetX The offset X of the event
- * @param {number} offsetY The offset Y of the event
+ * @param {number} x The clientX of the dragStart event
+ * @param {number} y The clientY of the dragStart event
*/
-chrome.bookmarkManagerPrivate.startDrag = function(idList, dragNodeIndex, isFromTouch, offsetX, offsetY) {};
+chrome.bookmarkManagerPrivate.startDrag = function(idList, dragNodeIndex, isFromTouch, x, y) {};
/**
* Performs the drop action of the drag and drop session.
* @param {string} parentId The ID of the folder that the drop was made.
* @param {number=} index The index of the position to drop at. If left out the
* dropped items will be placed at the end of the existing children.
- * @param {function():void=} callback
+ * @param {function(): void=} callback
*/
chrome.bookmarkManagerPrivate.drop = function(parentId, index, callback) {};
@@ -102,7 +100,7 @@ chrome.bookmarkManagerPrivate.drop = function(parentId, index, callback) {};
* @param {string} id ID of the root of the tree to pull. If empty, the entire
* tree will be returned.
* @param {boolean} foldersOnly Pass true to only return folders.
- * @param {function(!Array<!BookmarkTreeNode>):void}
+ * @param {function(!Array<!chrome.bookmarks.BookmarkTreeNode>): void}
* callback
*/
chrome.bookmarkManagerPrivate.getSubtree = function(id, foldersOnly, callback) {};
@@ -110,7 +108,7 @@ chrome.bookmarkManagerPrivate.getSubtree = function(id, foldersOnly, callback) {
/**
* Recursively removes list of bookmarks nodes.
* @param {!Array<string>} idList An array of string-valued ids.
- * @param {function():void=} callback
+ * @param {function(): void=} callback
*/
chrome.bookmarkManagerPrivate.removeTrees = function(idList, callback) {};
diff --git a/chromium/third_party/closure_compiler/externs/bookmarks.js b/chromium/third_party/closure_compiler/externs/bookmarks.js
new file mode 100644
index 00000000000..84ae0fe0ae5
--- /dev/null
+++ b/chromium/third_party/closure_compiler/externs/bookmarks.js
@@ -0,0 +1,241 @@
+// Copyright 2020 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This file was generated by:
+// tools/json_schema_compiler/compiler.py.
+// NOTE: The format of types has changed. 'FooType' is now
+// 'chrome.bookmarks.FooType'.
+// Please run the closure compiler before committing changes.
+// See https://chromium.googlesource.com/chromium/src/+/master/docs/closure_compilation.md
+
+/** @fileoverview Externs generated from namespace: bookmarks */
+
+/** @const */
+chrome.bookmarks = {};
+
+/**
+ * @enum {string}
+ * @see https://developer.chrome.com/extensions/bookmarks#type-BookmarkTreeNodeUnmodifiable
+ */
+chrome.bookmarks.BookmarkTreeNodeUnmodifiable = {
+ MANAGED: 'managed',
+};
+
+/**
+ * A node (either a bookmark or a folder) in the bookmark tree. Child nodes are ordered within their parent folder.
+ * @typedef {{
+ * id: string,
+ * parentId: (string|undefined),
+ * index: (number|undefined),
+ * url: (string|undefined),
+ * title: string,
+ * dateAdded: (number|undefined),
+ * dateGroupModified: (number|undefined),
+ * unmodifiable: (!chrome.bookmarks.BookmarkTreeNodeUnmodifiable|undefined),
+ * children: (!Array<!chrome.bookmarks.BookmarkTreeNode>|undefined)
+ * }}
+ * @see https://developer.chrome.com/extensions/bookmarks#type-BookmarkTreeNode
+ */
+chrome.bookmarks.BookmarkTreeNode;
+
+/**
+ * Object passed to the create() function.
+ * @typedef {{
+ * parentId: (string|undefined),
+ * index: (number|undefined),
+ * title: (string|undefined),
+ * url: (string|undefined)
+ * }}
+ * @see https://developer.chrome.com/extensions/bookmarks#type-CreateDetails
+ */
+chrome.bookmarks.CreateDetails;
+
+/**
+ * @type {number}
+ * @see https://developer.chrome.com/extensions/bookmarks#type-MAX_WRITE_OPERATIONS_PER_HOUR
+ */
+chrome.bookmarks.MAX_WRITE_OPERATIONS_PER_HOUR;
+
+/**
+ * @type {number}
+ * @see https://developer.chrome.com/extensions/bookmarks#type-MAX_SUSTAINED_WRITE_OPERATIONS_PER_MINUTE
+ */
+chrome.bookmarks.MAX_SUSTAINED_WRITE_OPERATIONS_PER_MINUTE;
+
+/**
+ * Retrieves the specified BookmarkTreeNode(s).
+ * @param {(string|!Array<string>)} idOrIdList A single string-valued id, or an
+ * array of string-valued ids
+ * @param {function(!Array<!chrome.bookmarks.BookmarkTreeNode>):void} callback
+ * @see https://developer.chrome.com/extensions/bookmarks#method-get
+ */
+chrome.bookmarks.get = function(idOrIdList, callback) {};
+
+/**
+ * Retrieves the children of the specified BookmarkTreeNode id.
+ * @param {string} id
+ * @param {function(!Array<!chrome.bookmarks.BookmarkTreeNode>):void} callback
+ * @see https://developer.chrome.com/extensions/bookmarks#method-getChildren
+ */
+chrome.bookmarks.getChildren = function(id, callback) {};
+
+/**
+ * Retrieves the recently added bookmarks.
+ * @param {number} numberOfItems The maximum number of items to return.
+ * @param {function(!Array<!chrome.bookmarks.BookmarkTreeNode>):void} callback
+ * @see https://developer.chrome.com/extensions/bookmarks#method-getRecent
+ */
+chrome.bookmarks.getRecent = function(numberOfItems, callback) {};
+
+/**
+ * Retrieves the entire Bookmarks hierarchy.
+ * @param {function(!Array<!chrome.bookmarks.BookmarkTreeNode>):void} callback
+ * @see https://developer.chrome.com/extensions/bookmarks#method-getTree
+ */
+chrome.bookmarks.getTree = function(callback) {};
+
+/**
+ * Retrieves part of the Bookmarks hierarchy, starting at the specified node.
+ * @param {string} id The ID of the root of the subtree to retrieve.
+ * @param {function(!Array<!chrome.bookmarks.BookmarkTreeNode>):void} callback
+ * @see https://developer.chrome.com/extensions/bookmarks#method-getSubTree
+ */
+chrome.bookmarks.getSubTree = function(id, callback) {};
+
+/**
+ * Searches for BookmarkTreeNodes matching the given query. Queries specified
+ * with an object produce BookmarkTreeNodes matching all specified properties.
+ * @param {(string|{
+ * query: (string|undefined),
+ * url: (string|undefined),
+ * title: (string|undefined)
+ * })} query Either a string of words and quoted phrases that are matched
+ * against bookmark URLs and titles, or an object. If an object, the
+ * properties <code>query</code>, <code>url</code>, and <code>title</code>
+ * may be specified and bookmarks matching all specified properties will be
+ * produced.
+ * @param {function(!Array<!chrome.bookmarks.BookmarkTreeNode>):void} callback
+ * @see https://developer.chrome.com/extensions/bookmarks#method-search
+ */
+chrome.bookmarks.search = function(query, callback) {};
+
+/**
+ * Creates a bookmark or folder under the specified parentId. If url is NULL or
+ * missing, it will be a folder.
+ * @param {!chrome.bookmarks.CreateDetails} bookmark
+ * @param {function(!chrome.bookmarks.BookmarkTreeNode):void=} callback
+ * @see https://developer.chrome.com/extensions/bookmarks#method-create
+ */
+chrome.bookmarks.create = function(bookmark, callback) {};
+
+/**
+ * Moves the specified BookmarkTreeNode to the provided location.
+ * @param {string} id
+ * @param {{
+ * parentId: (string|undefined),
+ * index: (number|undefined)
+ * }} destination
+ * @param {function(!chrome.bookmarks.BookmarkTreeNode):void=} callback
+ * @see https://developer.chrome.com/extensions/bookmarks#method-move
+ */
+chrome.bookmarks.move = function(id, destination, callback) {};
+
+/**
+ * Updates the properties of a bookmark or folder. Specify only the properties
+ * that you want to change; unspecified properties will be left unchanged.
+ * <b>Note:</b> Currently, only 'title' and 'url' are supported.
+ * @param {string} id
+ * @param {{
+ * title: (string|undefined),
+ * url: (string|undefined)
+ * }} changes
+ * @param {function(!chrome.bookmarks.BookmarkTreeNode):void=} callback
+ * @see https://developer.chrome.com/extensions/bookmarks#method-update
+ */
+chrome.bookmarks.update = function(id, changes, callback) {};
+
+/**
+ * Removes a bookmark or an empty bookmark folder.
+ * @param {string} id
+ * @param {function():void=} callback
+ * @see https://developer.chrome.com/extensions/bookmarks#method-remove
+ */
+chrome.bookmarks.remove = function(id, callback) {};
+
+/**
+ * Recursively removes a bookmark folder.
+ * @param {string} id
+ * @param {function():void=} callback
+ * @see https://developer.chrome.com/extensions/bookmarks#method-removeTree
+ */
+chrome.bookmarks.removeTree = function(id, callback) {};
+
+/**
+ * Imports bookmarks from a chrome html bookmark file
+ * @param {function():void=} callback
+ * @see https://developer.chrome.com/extensions/bookmarks#method-import
+ */
+chrome.bookmarks.import = function(callback) {};
+
+/**
+ * Exports bookmarks to a chrome html bookmark file
+ * @param {function():void=} callback
+ * @see https://developer.chrome.com/extensions/bookmarks#method-export
+ */
+chrome.bookmarks.export = function(callback) {};
+
+/**
+ * Fired when a bookmark or folder is created.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/bookmarks#event-onCreated
+ */
+chrome.bookmarks.onCreated;
+
+/**
+ * Fired when a bookmark or folder is removed. When a folder is removed
+ * recursively, a single notification is fired for the folder, and none for its
+ * contents.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/bookmarks#event-onRemoved
+ */
+chrome.bookmarks.onRemoved;
+
+/**
+ * Fired when a bookmark or folder changes. <b>Note:</b> Currently, only title
+ * and url changes trigger this.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/bookmarks#event-onChanged
+ */
+chrome.bookmarks.onChanged;
+
+/**
+ * Fired when a bookmark or folder is moved to a different parent folder.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/bookmarks#event-onMoved
+ */
+chrome.bookmarks.onMoved;
+
+/**
+ * Fired when the children of a folder have changed their order due to the order
+ * being sorted in the UI. This is not called as a result of a move().
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/bookmarks#event-onChildrenReordered
+ */
+chrome.bookmarks.onChildrenReordered;
+
+/**
+ * Fired when a bookmark import session is begun. Expensive observers should
+ * ignore onCreated updates until onImportEnded is fired. Observers should
+ * still handle other notifications immediately.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/bookmarks#event-onImportBegan
+ */
+chrome.bookmarks.onImportBegan;
+
+/**
+ * Fired when a bookmark import session is ended.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/bookmarks#event-onImportEnded
+ */
+chrome.bookmarks.onImportEnded;
diff --git a/chromium/third_party/closure_compiler/externs/chrome.js b/chromium/third_party/closure_compiler/externs/chrome.js
index 6559fbeb3f2..d30f339ccdc 100644
--- a/chromium/third_party/closure_compiler/externs/chrome.js
+++ b/chromium/third_party/closure_compiler/externs/chrome.js
@@ -559,51 +559,6 @@ chrome.webstore.onDownloadProgress;
/**
- * @see https://developer.chrome.com/extensions/runtime.html
- * @const
- */
-chrome.runtime = {};
-
-
-/** @type {{message:(string|undefined)}|undefined} */
-chrome.runtime.lastError;
-
-
-/**
- * @param {string|!Object=} opt_extensionIdOrConnectInfo Either the
- * extensionId to connect to, in which case connectInfo params can be
- * passed in the next optional argument, or the connectInfo params.
- * @param {!Object=} opt_connectInfo The connectInfo object,
- * if arg1 was the extensionId to connect to.
- * @return {!Port} New port.
- */
-chrome.runtime.connect = function(
- opt_extensionIdOrConnectInfo, opt_connectInfo) {};
-
-
-/**
- * @param {string|*} extensionIdOrMessage Either the extensionId to send the
- * message to, in which case the message is passed as the next arg, or the
- * message itself.
- * @param {(*|!Object|function(*): void)=} opt_messageOrOptsOrCallback
- * One of:
- * The message, if arg1 was the extensionId.
- * The options for message sending, if arg1 was the message and this
- * argument is not a function.
- * The callback, if arg1 was the message and this argument is a function.
- * @param {(!Object|function(*): void)=} opt_optsOrCallback
- * Either the options for message sending, if arg2 was the message,
- * or the callback.
- * @param {function(*): void=} opt_callback The callback function which
- * takes a JSON response object sent by the handler of the request.
- * @return {undefined}
- */
-chrome.runtime.sendMessage = function(
- extensionIdOrMessage, opt_messageOrOptsOrCallback, opt_optsOrCallback,
- opt_callback) {};
-
-
-/**
* Returns an object representing current load times. Note that the properties
* on the object do not change and the function must be called again to get
* up-to-date data.
diff --git a/chromium/third_party/closure_compiler/externs/chrome_extensions.js b/chromium/third_party/closure_compiler/externs/chrome_extensions.js
index c0fb4e1c9e1..f2bd83291ae 100644
--- a/chromium/third_party/closure_compiler/externs/chrome_extensions.js
+++ b/chromium/third_party/closure_compiler/externs/chrome_extensions.js
@@ -2528,6 +2528,49 @@ chrome.extension.onRequest;
/** @type {!ChromeEvent} */
chrome.extension.onRequestExternal;
+/**
+ * @see https://developer.chrome.com/extensions/runtime.html
+ * @const
+ */
+chrome.runtime = {};
+
+
+/** @type {{message:(string|undefined)}|undefined} */
+chrome.runtime.lastError;
+
+
+/**
+ * @param {string|!Object=} opt_extensionIdOrConnectInfo Either the
+ * extensionId to connect to, in which case connectInfo params can be
+ * passed in the next optional argument, or the connectInfo params.
+ * @param {!Object=} opt_connectInfo The connectInfo object,
+ * if arg1 was the extensionId to connect to.
+ * @return {!Port} New port.
+ */
+chrome.runtime.connect = function(
+ opt_extensionIdOrConnectInfo, opt_connectInfo) {};
+
+
+/**
+ * @param {string|*} extensionIdOrMessage Either the extensionId to send the
+ * message to, in which case the message is passed as the next arg, or the
+ * message itself.
+ * @param {(*|!Object|function(*): void)=} opt_messageOrOptsOrCallback
+ * One of:
+ * The message, if arg1 was the extensionId.
+ * The options for message sending, if arg1 was the message and this
+ * argument is not a function.
+ * The callback, if arg1 was the message and this argument is a function.
+ * @param {(!Object|function(*): void)=} opt_optsOrCallback
+ * Either the options for message sending, if arg2 was the message,
+ * or the callback.
+ * @param {function(*): void=} opt_callback The callback function which
+ * takes a JSON response object sent by the handler of the request.
+ * @return {undefined}
+ */
+chrome.runtime.sendMessage = function(
+ extensionIdOrMessage, opt_messageOrOptsOrCallback, opt_optsOrCallback,
+ opt_callback) {};
/** @type {string} */
diff --git a/chromium/third_party/closure_compiler/externs/chromeos_info_private.js b/chromium/third_party/closure_compiler/externs/chromeos_info_private.js
index 87616dc4ae4..a341ae72413 100644
--- a/chromium/third_party/closure_compiler/externs/chromeos_info_private.js
+++ b/chromium/third_party/closure_compiler/externs/chromeos_info_private.js
@@ -11,9 +11,7 @@
/** @fileoverview Externs generated from namespace: chromeosInfoPrivate */
-/**
- * @const
- */
+/** @const */
chrome.chromeosInfoPrivate = {};
/**
@@ -33,8 +31,8 @@ chrome.chromeosInfoPrivate.PropertyName = {
A11Y_FOCUS_HIGHLIGHT_ENABLED: 'a11yFocusHighlightEnabled',
A11Y_SELECT_TO_SPEAK_ENABLED: 'a11ySelectToSpeakEnabled',
A11Y_SWITCH_ACCESS_ENABLED: 'a11ySwitchAccessEnabled',
+ A11Y_CURSOR_COLOR_ENABLED: 'a11yCursorColorEnabled',
SEND_FUNCTION_KEYS: 'sendFunctionKeys',
- CAMERA_MEDIA_CONSOLIDATED: 'cameraMediaConsolidated',
};
/**
@@ -117,10 +115,15 @@ chrome.chromeosInfoPrivate.AssistantStatus = {
* a11yScreenMagnifierEnabled: (boolean|undefined),
* a11yAutoClickEnabled: (boolean|undefined),
* a11yVirtualKeyboardEnabled: (boolean|undefined),
+ * a11yCaretHighlightEnabled: (boolean|undefined),
+ * a11yCursorHighlightEnabled: (boolean|undefined),
+ * a11yFocusHighlightEnabled: (boolean|undefined),
+ * a11ySelectToSpeakEnabled: (boolean|undefined),
+ * a11ySwitchAccessEnabled: (boolean|undefined),
+ * a11yCursorColorEnabled: (boolean|undefined),
* sendFunctionKeys: (boolean|undefined),
- * cameraMediaConsolidated: (boolean|undefined),
* supportedTimezones: (!Array<!Array<string>>|undefined)
- * }):void} callback
+ * }): void} callback
*/
chrome.chromeosInfoPrivate.get = function(propertyNames, callback) {};
diff --git a/chromium/third_party/closure_compiler/externs/clipboard.js b/chromium/third_party/closure_compiler/externs/clipboard.js
index c1a9e5378bc..b532db79942 100644
--- a/chromium/third_party/closure_compiler/externs/clipboard.js
+++ b/chromium/third_party/closure_compiler/externs/clipboard.js
@@ -51,7 +51,7 @@ chrome.clipboard.AdditionalDataItem;
* Additional data items for describing image data. The callback is called
* with <code>chrome.runtime.lastError</code> set to error code if there is
* an error. Requires clipboard and clipboardWrite permissions.
- * @param {function():void=} callback
+ * @param {function(): void=} callback
* @see https://developer.chrome.com/extensions/clipboard#method-setImageData
*/
chrome.clipboard.setImageData = function(imageData, type, additionalItems, callback) {};
diff --git a/chromium/third_party/closure_compiler/externs/command_line_private.js b/chromium/third_party/closure_compiler/externs/command_line_private.js
index ea9c85cdb43..d7d5df94a28 100644
--- a/chromium/third_party/closure_compiler/externs/command_line_private.js
+++ b/chromium/third_party/closure_compiler/externs/command_line_private.js
@@ -1,19 +1,24 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
+// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// This file was generated by:
+// tools/json_schema_compiler/compiler.py.
+// NOTE: The format of types has changed. 'FooType' is now
+// 'chrome.commandLinePrivate.FooType'.
+// Please run the closure compiler before committing changes.
+// See https://chromium.googlesource.com/chromium/src/+/master/docs/closure_compilation.md
+
/** @fileoverview Externs generated from namespace: commandLinePrivate */
-/**
- * @const
- */
+/** @const */
chrome.commandLinePrivate = {};
/**
* Returns whether a switch is specified on the command line when launching
* Chrome.
- * @param {string} name The name of a command line switch, without leading
- * "--", such as "enable-experimental-extension-apis".
- * @param {function(boolean)} callback
+ * @param {string} name The name of a command line switch, without leading "--",
+ * such as "enable-experimental-extension-apis".
+ * @param {function(boolean): void} callback
*/
chrome.commandLinePrivate.hasSwitch = function(name, callback) {};
diff --git a/chromium/third_party/closure_compiler/externs/developer_private.js b/chromium/third_party/closure_compiler/externs/developer_private.js
index 629f3174f53..8c2903b10bc 100644
--- a/chromium/third_party/closure_compiler/externs/developer_private.js
+++ b/chromium/third_party/closure_compiler/externs/developer_private.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -11,9 +11,7 @@
/** @fileoverview Externs generated from namespace: developerPrivate */
-/**
- * @const
- */
+/** @const */
chrome.developerPrivate = {};
/**
@@ -222,7 +220,6 @@ chrome.developerPrivate.ExtensionView;
*/
chrome.developerPrivate.ControllerType = {
POLICY: 'POLICY',
- SUPERVISED_USER_CUSTODIAN: 'SUPERVISED_USER_CUSTODIAN',
};
/**
@@ -570,7 +567,7 @@ chrome.developerPrivate.DeleteExtensionErrorsProperties;
/**
* Runs auto update for extensions and apps immediately.
- * @param {function():void=} callback Called after update check completes.
+ * @param {function(): void=} callback Called after update check completes.
*/
chrome.developerPrivate.autoUpdate = function(callback) {};
@@ -578,7 +575,7 @@ chrome.developerPrivate.autoUpdate = function(callback) {};
* Returns information of all the extensions and apps installed.
* @param {!chrome.developerPrivate.GetExtensionsInfoOptions=} options Options
* to restrict the items returned.
- * @param {function(!Array<!chrome.developerPrivate.ExtensionInfo>):void=}
+ * @param {function(!Array<!chrome.developerPrivate.ExtensionInfo>): void=}
* callback Called with extensions info.
*/
chrome.developerPrivate.getExtensionsInfo = function(options, callback) {};
@@ -586,7 +583,7 @@ chrome.developerPrivate.getExtensionsInfo = function(options, callback) {};
/**
* Returns information of a particular extension.
* @param {string} id The id of the extension.
- * @param {function(!chrome.developerPrivate.ExtensionInfo):void=} callback
+ * @param {function(!chrome.developerPrivate.ExtensionInfo): void=} callback
* Called with the result.
*/
chrome.developerPrivate.getExtensionInfo = function(id, callback) {};
@@ -594,7 +591,7 @@ chrome.developerPrivate.getExtensionInfo = function(id, callback) {};
/**
* Returns the size of a particular extension on disk (already formatted).
* @param {string} id The id of the extension.
- * @param {function(string):void} callback Called with the result.
+ * @param {function(string): void} callback Called with the result.
*/
chrome.developerPrivate.getExtensionSize = function(id, callback) {};
@@ -602,7 +599,7 @@ chrome.developerPrivate.getExtensionSize = function(id, callback) {};
* Returns information of all the extensions and apps installed.
* @param {boolean} includeDisabled include disabled items.
* @param {boolean} includeTerminated include terminated items.
- * @param {function(!Array<!chrome.developerPrivate.ItemInfo>):void} callback
+ * @param {function(!Array<!chrome.developerPrivate.ItemInfo>): void} callback
* Called with items info.
* @deprecated Use getExtensionsInfo
*/
@@ -610,7 +607,7 @@ chrome.developerPrivate.getItemsInfo = function(includeDisabled, includeTerminat
/**
* Returns the current profile's configuration.
- * @param {function(!chrome.developerPrivate.ProfileInfo):void} callback
+ * @param {function(!chrome.developerPrivate.ProfileInfo): void} callback
*/
chrome.developerPrivate.getProfileConfiguration = function(callback) {};
@@ -619,14 +616,14 @@ chrome.developerPrivate.getProfileConfiguration = function(callback) {};
* @param {!chrome.developerPrivate.ProfileConfigurationUpdate} update The
* parameters for updating the profile's configuration. Any properties
* omitted from |update| will not be changed.
- * @param {function():void=} callback
+ * @param {function(): void=} callback
*/
chrome.developerPrivate.updateProfileConfiguration = function(update, callback) {};
/**
* Opens a permissions dialog.
* @param {string} extensionId The id of the extension to show permissions for.
- * @param {function():void=} callback
+ * @param {function(): void=} callback
*/
chrome.developerPrivate.showPermissionsDialog = function(extensionId, callback) {};
@@ -635,7 +632,7 @@ chrome.developerPrivate.showPermissionsDialog = function(extensionId, callback)
* @param {string} extensionId The id of the extension to reload.
* @param {!chrome.developerPrivate.ReloadOptions=} options Additional
* configuration parameters.
- * @param {function((!chrome.developerPrivate.LoadError|undefined)):void=}
+ * @param {function((!chrome.developerPrivate.LoadError|undefined)): void=}
* callback
*/
chrome.developerPrivate.reload = function(extensionId, options, callback) {};
@@ -645,7 +642,7 @@ chrome.developerPrivate.reload = function(extensionId, options, callback) {};
* @param {!chrome.developerPrivate.ExtensionConfigurationUpdate} update The
* parameters for updating the extension's configuration. Any properties
* omitted from |update| will not be changed.
- * @param {function():void=} callback
+ * @param {function(): void=} callback
*/
chrome.developerPrivate.updateExtensionConfiguration = function(update, callback) {};
@@ -653,14 +650,14 @@ chrome.developerPrivate.updateExtensionConfiguration = function(update, callback
* Loads a user-selected unpacked item.
* @param {!chrome.developerPrivate.LoadUnpackedOptions=} options Additional
* configuration parameters.
- * @param {function((!chrome.developerPrivate.LoadError|undefined)):void=}
+ * @param {function((!chrome.developerPrivate.LoadError|undefined)): void=}
* callback
*/
chrome.developerPrivate.loadUnpacked = function(options, callback) {};
/**
* Installs the file that was dragged and dropped onto the associated page.
- * @param {function():void=} callback
+ * @param {function(): void=} callback
*/
chrome.developerPrivate.installDroppedFile = function(callback) {};
@@ -672,8 +669,8 @@ chrome.developerPrivate.notifyDragInstallInProgress = function() {};
/**
* Loads an extension / app.
- * @param {Object} directory The directory to load the extension from.
- * @param {function(string):void} callback
+ * @param {DirectoryEntry} directory The directory to load the extension from.
+ * @param {function(string): void} callback
*/
chrome.developerPrivate.loadDirectory = function(directory, callback) {};
@@ -684,7 +681,7 @@ chrome.developerPrivate.loadDirectory = function(directory, callback) {};
* @param {!chrome.developerPrivate.FileType} fileType Required file type. For
* example, pem type is for private key and load type is for an unpacked
* item.
- * @param {function(string):void} callback called with selected item's path.
+ * @param {function(string): void} callback called with selected item's path.
*/
chrome.developerPrivate.choosePath = function(selectType, fileType, callback) {};
@@ -693,14 +690,14 @@ chrome.developerPrivate.choosePath = function(selectType, fileType, callback) {}
* @param {string} path
* @param {string=} privateKeyPath The path of the private key, if one is given.
* @param {number=} flags Special flags to apply to the loading process, if any.
- * @param {function(!chrome.developerPrivate.PackDirectoryResponse):void=}
+ * @param {function(!chrome.developerPrivate.PackDirectoryResponse): void=}
* callback called with the success result string.
*/
chrome.developerPrivate.packDirectory = function(path, privateKeyPath, flags, callback) {};
/**
* Returns true if the profile is managed.
- * @param {function(boolean):void} callback
+ * @param {function(boolean): void} callback
*/
chrome.developerPrivate.isProfileManaged = function(callback) {};
@@ -708,7 +705,7 @@ chrome.developerPrivate.isProfileManaged = function(callback) {};
* Reads and returns the contents of a file related to an extension which caused
* an error.
* @param {!chrome.developerPrivate.RequestFileSourceProperties} properties
- * @param {function(!chrome.developerPrivate.RequestFileSourceResponse):void}
+ * @param {function(!chrome.developerPrivate.RequestFileSourceResponse): void}
* callback
*/
chrome.developerPrivate.requestFileSource = function(properties, callback) {};
@@ -716,7 +713,7 @@ chrome.developerPrivate.requestFileSource = function(properties, callback) {};
/**
* Open the developer tools to focus on a particular error.
* @param {!chrome.developerPrivate.OpenDevToolsProperties} properties
- * @param {function():void=} callback
+ * @param {function(): void=} callback
*/
chrome.developerPrivate.openDevTools = function(properties, callback) {};
@@ -724,14 +721,14 @@ chrome.developerPrivate.openDevTools = function(properties, callback) {};
* Delete reported extension errors.
* @param {!chrome.developerPrivate.DeleteExtensionErrorsProperties} properties
* The properties specifying the errors to remove.
- * @param {function():void=} callback
+ * @param {function(): void=} callback
*/
chrome.developerPrivate.deleteExtensionErrors = function(properties, callback) {};
/**
* Repairs the extension specified.
* @param {string} extensionId The id of the extension to repair.
- * @param {function():void=} callback
+ * @param {function(): void=} callback
*/
chrome.developerPrivate.repairExtension = function(extensionId, callback) {};
@@ -739,14 +736,14 @@ chrome.developerPrivate.repairExtension = function(extensionId, callback) {};
* Shows the options page for the extension specified.
* @param {string} extensionId The id of the extension to show the options page
* for.
- * @param {function():void=} callback
+ * @param {function(): void=} callback
*/
chrome.developerPrivate.showOptions = function(extensionId, callback) {};
/**
* Shows the path of the extension specified.
* @param {string} extensionId The id of the extension to show the path for.
- * @param {function():void=} callback
+ * @param {function(): void=} callback
*/
chrome.developerPrivate.showPath = function(extensionId, callback) {};
@@ -754,7 +751,7 @@ chrome.developerPrivate.showPath = function(extensionId, callback) {};
* (Un)suspends global shortcut handling.
* @param {boolean} isSuspended Whether or not shortcut handling should be
* suspended.
- * @param {function():void=} callback
+ * @param {function(): void=} callback
*/
chrome.developerPrivate.setShortcutHandlingSuspended = function(isSuspended, callback) {};
@@ -762,7 +759,7 @@ chrome.developerPrivate.setShortcutHandlingSuspended = function(isSuspended, cal
* Updates an extension command.
* @param {!chrome.developerPrivate.ExtensionCommandUpdate} update The
* parameters for updating the extension command.
- * @param {function():void=} callback
+ * @param {function(): void=} callback
*/
chrome.developerPrivate.updateExtensionCommand = function(update, callback) {};
@@ -771,7 +768,7 @@ chrome.developerPrivate.updateExtensionCommand = function(update, callback) {};
* access to the host if it is within the requested permissions.
* @param {string} extensionId The id of the extension to modify.
* @param {string} host The host to add.
- * @param {function():void=} callback
+ * @param {function(): void=} callback
*/
chrome.developerPrivate.addHostPermission = function(extensionId, host, callback) {};
@@ -780,14 +777,14 @@ chrome.developerPrivate.addHostPermission = function(extensionId, host, callback
* a host that the extension has access to.
* @param {string} extensionId The id of the extension to modify.
* @param {string} host The host to remove.
- * @param {function():void=} callback
+ * @param {function(): void=} callback
*/
chrome.developerPrivate.removeHostPermission = function(extensionId, host, callback) {};
/**
* @param {string} id
* @param {boolean} enabled
- * @param {function():void=} callback
+ * @param {function(): void=} callback
* @deprecated Use management.setEnabled
*/
chrome.developerPrivate.enable = function(id, enabled, callback) {};
@@ -795,7 +792,7 @@ chrome.developerPrivate.enable = function(id, enabled, callback) {};
/**
* @param {string} extensionId
* @param {boolean} allow
- * @param {function():void=} callback
+ * @param {function(): void=} callback
* @deprecated Use updateExtensionConfiguration
*/
chrome.developerPrivate.allowIncognito = function(extensionId, allow, callback) {};
@@ -803,14 +800,14 @@ chrome.developerPrivate.allowIncognito = function(extensionId, allow, callback)
/**
* @param {string} extensionId
* @param {boolean} allow
- * @param {function():void=} callback
+ * @param {function(): void=} callback
* @deprecated Use updateExtensionConfiguration
*/
chrome.developerPrivate.allowFileAccess = function(extensionId, allow, callback) {};
/**
* @param {!chrome.developerPrivate.InspectOptions} options
- * @param {function():void=} callback
+ * @param {function(): void=} callback
* @deprecated Use openDevTools
*/
chrome.developerPrivate.inspect = function(options, callback) {};
diff --git a/chromium/third_party/closure_compiler/externs/events.js b/chromium/third_party/closure_compiler/externs/events.js
new file mode 100644
index 00000000000..01ff836f9c1
--- /dev/null
+++ b/chromium/third_party/closure_compiler/externs/events.js
@@ -0,0 +1,63 @@
+// Copyright 2020 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This file was generated by:
+// tools/json_schema_compiler/compiler.py.
+// NOTE: The format of types has changed. 'FooType' is now
+// 'chrome.events.FooType'.
+// Please run the closure compiler before committing changes.
+// See https://chromium.googlesource.com/chromium/src/+/master/docs/closure_compilation.md
+
+/** @fileoverview Externs generated from namespace: events */
+
+/** @const */
+chrome.events = {};
+
+/**
+ * Description of a declarative rule for handling events.
+ * @typedef {{
+ * id: (string|undefined),
+ * tags: (!Array<string>|undefined),
+ * conditions: !Array<*>,
+ * actions: !Array<*>,
+ * priority: (number|undefined)
+ * }}
+ * @see https://developer.chrome.com/extensions/events#type-Rule
+ */
+chrome.events.Rule;
+
+/**
+ * An object which allows the addition and removal of listeners for a Chrome event.
+ * @typedef {Object}
+ * @see https://developer.chrome.com/extensions/events#type-Event
+ */
+chrome.events.Event;
+
+/**
+ * Filters URLs for various criteria. See <a href='events#filtered'>event filtering</a>. All criteria are case sensitive.
+ * @typedef {{
+ * hostContains: (string|undefined),
+ * hostEquals: (string|undefined),
+ * hostPrefix: (string|undefined),
+ * hostSuffix: (string|undefined),
+ * pathContains: (string|undefined),
+ * pathEquals: (string|undefined),
+ * pathPrefix: (string|undefined),
+ * pathSuffix: (string|undefined),
+ * queryContains: (string|undefined),
+ * queryEquals: (string|undefined),
+ * queryPrefix: (string|undefined),
+ * querySuffix: (string|undefined),
+ * urlContains: (string|undefined),
+ * urlEquals: (string|undefined),
+ * urlMatches: (string|undefined),
+ * originAndPathMatches: (string|undefined),
+ * urlPrefix: (string|undefined),
+ * urlSuffix: (string|undefined),
+ * schemes: (!Array<string>|undefined),
+ * ports: (!Array<(number|!Array<number>)>|undefined)
+ * }}
+ * @see https://developer.chrome.com/extensions/events#type-UrlFilter
+ */
+chrome.events.UrlFilter;
diff --git a/chromium/third_party/closure_compiler/externs/extension_types.js b/chromium/third_party/closure_compiler/externs/extension_types.js
new file mode 100644
index 00000000000..ce8acf238dc
--- /dev/null
+++ b/chromium/third_party/closure_compiler/externs/extension_types.js
@@ -0,0 +1,68 @@
+// Copyright 2020 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This file was generated by:
+// tools/json_schema_compiler/compiler.py.
+// NOTE: The format of types has changed. 'FooType' is now
+// 'chrome.extensionTypes.FooType'.
+// Please run the closure compiler before committing changes.
+// See https://chromium.googlesource.com/chromium/src/+/master/docs/closure_compilation.md
+
+/** @fileoverview Externs generated from namespace: extensionTypes */
+
+/** @const */
+chrome.extensionTypes = {};
+
+/**
+ * @enum {string}
+ * @see https://developer.chrome.com/extensions/extensionTypes#type-ImageFormat
+ */
+chrome.extensionTypes.ImageFormat = {
+ JPEG: 'jpeg',
+ PNG: 'png',
+};
+
+/**
+ * Details about the format and quality of an image.
+ * @typedef {{
+ * format: (!chrome.extensionTypes.ImageFormat|undefined),
+ * quality: (number|undefined)
+ * }}
+ * @see https://developer.chrome.com/extensions/extensionTypes#type-ImageDetails
+ */
+chrome.extensionTypes.ImageDetails;
+
+/**
+ * @enum {string}
+ * @see https://developer.chrome.com/extensions/extensionTypes#type-RunAt
+ */
+chrome.extensionTypes.RunAt = {
+ DOCUMENT_START: 'document_start',
+ DOCUMENT_END: 'document_end',
+ DOCUMENT_IDLE: 'document_idle',
+};
+
+/**
+ * @enum {string}
+ * @see https://developer.chrome.com/extensions/extensionTypes#type-CSSOrigin
+ */
+chrome.extensionTypes.CSSOrigin = {
+ AUTHOR: 'author',
+ USER: 'user',
+};
+
+/**
+ * Details of the script or CSS to inject. Either the code or the file property must be set, but both may not be set at the same time.
+ * @typedef {{
+ * code: (string|undefined),
+ * file: (string|undefined),
+ * allFrames: (boolean|undefined),
+ * frameId: (number|undefined),
+ * matchAboutBlank: (boolean|undefined),
+ * runAt: (!chrome.extensionTypes.RunAt|undefined),
+ * cssOrigin: (!chrome.extensionTypes.CSSOrigin|undefined)
+ * }}
+ * @see https://developer.chrome.com/extensions/extensionTypes#type-InjectDetails
+ */
+chrome.extensionTypes.InjectDetails;
diff --git a/chromium/third_party/closure_compiler/externs/file_manager_private.js b/chromium/third_party/closure_compiler/externs/file_manager_private.js
index b27482e4af7..c9cd0beef4d 100644
--- a/chromium/third_party/closure_compiler/externs/file_manager_private.js
+++ b/chromium/third_party/closure_compiler/externs/file_manager_private.js
@@ -4,9 +4,7 @@
/** @fileoverview Externs generated from namespace: fileManagerPrivate */
-/**
- * @const
- */
+/** @const */
chrome.fileManagerPrivate = {};
/** @enum {string} */
@@ -178,6 +176,9 @@ chrome.fileManagerPrivate.TaskResult = {
MESSAGE_SENT: 'message_sent',
FAILED: 'failed',
EMPTY: 'empty',
+ FAILED_PLUGIN_VM_TASK_DIRECTORY_NOT_SHARED:
+ 'failed_plugin_vm_task_directory_not_shared',
+ FAILED_PLUGIN_VM_TASK_EXTERNAL_DRIVE: 'failed_plugin_vm_task_external_drive',
};
/** @enum {string} */
@@ -673,7 +674,7 @@ chrome.fileManagerPrivate.pinDriveFile = function(entry, pin, callback) {};
* backend. If resolving entry fails, the entry will be just ignored and the
* corresponding entry does not appear in the result.
* @param {!Array<!Entry>} entries
- * @param {function(!Array<!Entry>):void} callback Completion callback
+ * @param {function(!Array<!Entry>): void} callback Completion callback
* with resolved entries.
*/
chrome.fileManagerPrivate.resolveIsolatedEntries = function(entries,
@@ -683,7 +684,7 @@ chrome.fileManagerPrivate.resolveIsolatedEntries = function(entries,
* Mount a resource or a file. |source| Mount point source. For compressed
* files it is relative file path within external file system |callback|
* @param {string} source
- * @param {function(string):void} callback callback Callback with source path of
+ * @param {function(string): void} callback callback Callback with source path of
* the mount.
*/
chrome.fileManagerPrivate.addMount = function(source, callback) {};
@@ -776,7 +777,7 @@ chrome.fileManagerPrivate.searchDrive = function(searchParams, callback) {};
/**
* Performs drive metadata search. |searchParams| |callback|
* @param {!chrome.fileManagerPrivate.SearchMetadataParams} searchParams
- * @param {function(!Array<!chrome.fileManagerPrivate.DriveMetadataSearchResult>):void}
+ * @param {function(!Array<!chrome.fileManagerPrivate.DriveMetadataSearchResult>): void}
* callback
*/
chrome.fileManagerPrivate.searchDriveMetadata = function(searchParams, callback) {};
@@ -794,7 +795,7 @@ chrome.fileManagerPrivate.searchFilesByHashes = function(volumeId, hashes,
/**
* Search files in My Files.
* @param {!chrome.fileManagerPrivate.SearchMetadataParams} searchParams
- * @param {function(!Array<Object>):void} callback
+ * @param {function(!Array<Object>): void} callback
*/
chrome.fileManagerPrivate.searchFiles = function(searchParams, callback) {};
@@ -814,7 +815,7 @@ chrome.fileManagerPrivate.zipSelection = function(entries, parentEntry,
/**
* Retrieves the state of the current drive connection. |callback|
- * @param {function(!chrome.fileManagerPrivate.DriveConnectionState):void}
+ * @param {function(!chrome.fileManagerPrivate.DriveConnectionState): void}
* callback
*/
chrome.fileManagerPrivate.getDriveConnectionState = function(callback) {};
@@ -1026,7 +1027,7 @@ chrome.fileManagerPrivate.detectCharacterEncoding = function(bytes, callback) {
* returns a thumbnail appropriate for quickview.
* @param {Object} entry
* @param {boolean} cropToSquare
- * @param {function(string):void} callback |thumbnailDataUrl| A data URL for the
+ * @param {function(string): void} callback |thumbnailDataUrl| A data URL for the
* thumbnail as a PNG; |thumbnailDataUrl| is empty if no thumbnail was
* available.
*/
@@ -1034,7 +1035,7 @@ chrome.fileManagerPrivate.getThumbnail = function(entry, cropToSquare, callback)
/**
* @param {!Array<string>} extensions
- * @param {function(!Array<chrome.fileManagerPrivate.AndroidApp>):void} callback
+ * @param {function(!Array<chrome.fileManagerPrivate.AndroidApp>): void} callback
* Completion callback.
*/
chrome.fileManagerPrivate.getAndroidPickerApps = function(extensions, callback) {};
diff --git a/chromium/third_party/closure_compiler/externs/file_system_provider.js b/chromium/third_party/closure_compiler/externs/file_system_provider.js
index 43b2afd3349..0f10aeb60a6 100644
--- a/chromium/third_party/closure_compiler/externs/file_system_provider.js
+++ b/chromium/third_party/closure_compiler/externs/file_system_provider.js
@@ -1,4 +1,4 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
+// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -11,9 +11,7 @@
/** @fileoverview Externs generated from namespace: fileSystemProvider */
-/**
- * @const
- */
+/** @const */
chrome.fileSystemProvider = {};
/**
@@ -73,7 +71,7 @@ chrome.fileSystemProvider.CommonActionId = {
* isDirectory: (boolean|undefined),
* name: (string|undefined),
* size: (number|undefined),
- * modificationTime: (Object|undefined),
+ * modificationTime: (Date|undefined),
* mimeType: (string|undefined),
* thumbnail: (string|undefined)
* }}
@@ -391,7 +389,7 @@ chrome.fileSystemProvider.ConfigureRequestedOptions;
* appropriately.</p><p>In case of an error, $(ref:runtime.lastError) will be
* set with a corresponding error code.</p>
* @param {!chrome.fileSystemProvider.MountOptions} options
- * @param {function():void=} callback A generic result callback to indicate
+ * @param {function(): void=} callback A generic result callback to indicate
* success or failure.
* @see https://developer.chrome.com/extensions/fileSystemProvider#method-mount
*/
@@ -404,7 +402,7 @@ chrome.fileSystemProvider.mount = function(options, callback) {};
* lost connection, or a file error).</p><p>In case of an error,
* $(ref:runtime.lastError) will be set with a corresponding error code.</p>
* @param {!chrome.fileSystemProvider.UnmountOptions} options
- * @param {function():void=} callback A generic result callback to indicate
+ * @param {function(): void=} callback A generic result callback to indicate
* success or failure.
* @see https://developer.chrome.com/extensions/fileSystemProvider#method-unmount
*/
@@ -412,7 +410,7 @@ chrome.fileSystemProvider.unmount = function(options, callback) {};
/**
* Returns all file systems mounted by the extension.
- * @param {function(!Array<!chrome.fileSystemProvider.FileSystemInfo>):void}
+ * @param {function(!Array<!chrome.fileSystemProvider.FileSystemInfo>): void}
* callback Callback to receive the result of $(ref:getAll) function.
* @see https://developer.chrome.com/extensions/fileSystemProvider#method-getAll
*/
@@ -422,7 +420,7 @@ chrome.fileSystemProvider.getAll = function(callback) {};
* Returns information about a file system with the passed
* <code>fileSystemId</code>.
* @param {string} fileSystemId
- * @param {function(!chrome.fileSystemProvider.FileSystemInfo):void} callback
+ * @param {function(!chrome.fileSystemProvider.FileSystemInfo): void} callback
* Callback to receive the result of $(ref:get) function.
* @see https://developer.chrome.com/extensions/fileSystemProvider#method-get
*/
@@ -450,7 +448,7 @@ chrome.fileSystemProvider.get = function(fileSystemId, callback) {};
* error, $(ref:runtime.lastError) will be set will a corresponding error
* code.</p>
* @param {!chrome.fileSystemProvider.NotifyOptions} options
- * @param {function():void=} callback A generic result callback to indicate
+ * @param {function(): void=} callback A generic result callback to indicate
* success or failure.
* @see https://developer.chrome.com/extensions/fileSystemProvider#method-notify
*/
diff --git a/chromium/third_party/closure_compiler/externs/input_method_private.js b/chromium/third_party/closure_compiler/externs/input_method_private.js
index 0f966d4a2b8..23e0016e700 100644
--- a/chromium/third_party/closure_compiler/externs/input_method_private.js
+++ b/chromium/third_party/closure_compiler/externs/input_method_private.js
@@ -11,9 +11,7 @@
/** @fileoverview Externs generated from namespace: inputMethodPrivate */
-/**
- * @const
- */
+/** @const */
chrome.inputMethodPrivate = {};
/**
@@ -160,7 +158,7 @@ chrome.inputMethodPrivate.InputMethodSettings;
* @param {function({
* isPhysicalKeyboardAutocorrectEnabled: boolean,
* isImeMenuActivated: boolean
- * }):void} callback Callback which is called with the config object.
+ * }): void} callback Callback which is called with the config object.
*/
chrome.inputMethodPrivate.getInputMethodConfig = function(callback) {};
@@ -170,13 +168,13 @@ chrome.inputMethodPrivate.getInputMethodConfig = function(callback) {};
* id: string,
* name: string,
* indicator: string
- * }>):void} callback Callback which is called with the input method objects.
+ * }>): void} callback Callback which is called with the input method objects.
*/
chrome.inputMethodPrivate.getInputMethods = function(callback) {};
/**
* Gets the current input method.
- * @param {function(string):void} callback Callback which is called with the
+ * @param {function(string): void} callback Callback which is called with the
* current input method.
*/
chrome.inputMethodPrivate.getCurrentInputMethod = function(callback) {};
@@ -185,37 +183,37 @@ chrome.inputMethodPrivate.getCurrentInputMethod = function(callback) {};
* Sets the current input method.
* @param {string} inputMethodId The input method ID to be set as current input
* method.
- * @param {function():void=} callback Callback which is called once the current
+ * @param {function(): void=} callback Callback which is called once the current
* input method is set. If unsuccessful $(ref:runtime.lastError) is set.
*/
chrome.inputMethodPrivate.setCurrentInputMethod = function(inputMethodId, callback) {};
/**
* Fetches a list of all the words currently in the dictionary.
- * @param {function(!Array<string>):void} callback Callback which is called once
- * the list of dictionary words are ready.
+ * @param {function(!Array<string>): void} callback Callback which is called
+ * once the list of dictionary words are ready.
*/
chrome.inputMethodPrivate.fetchAllDictionaryWords = function(callback) {};
/**
* Adds a single word to be stored in the dictionary.
* @param {string} word A new word to add to the dictionary.
- * @param {function():void=} callback Callback which is called once the word is
+ * @param {function(): void=} callback Callback which is called once the word is
* added. If unsuccessful $(ref:runtime.lastError) is set.
*/
chrome.inputMethodPrivate.addWordToDictionary = function(word, callback) {};
/**
* Gets whether the encrypt sync is enabled.
- * @param {function(boolean):void=} callback Callback which is called to provide
- * the result.
+ * @param {function(boolean): void=} callback Callback which is called to
+ * provide the result.
*/
chrome.inputMethodPrivate.getEncryptSyncEnabled = function(callback) {};
/**
* Sets the XKB layout for the given input method.
* @param {string} xkb_name The XKB layout name.
- * @param {function():void=} callback Callback which is called when the layout
+ * @param {function(): void=} callback Callback which is called when the layout
* is set.
*/
chrome.inputMethodPrivate.setXkbLayout = function(xkb_name, callback) {};
@@ -226,7 +224,7 @@ chrome.inputMethodPrivate.setXkbLayout = function(xkb_name, callback) {};
* @param {{
* contextID: number
* }} parameters
- * @param {function():void=} callback Called when the operation completes.
+ * @param {function(): void=} callback Called when the operation completes.
*/
chrome.inputMethodPrivate.finishComposingText = function(parameters, callback) {};
@@ -237,8 +235,8 @@ chrome.inputMethodPrivate.finishComposingText = function(parameters, callback) {
* selectionStart: (number|undefined),
* selectionEnd: (number|undefined)
* }} parameters
- * @param {function(boolean):void=} callback Called when the operation completes
- * with a boolean indicating if the text was accepted or not.
+ * @param {function(boolean): void=} callback Called when the operation
+ * completes with a boolean indicating if the text was accepted or not.
*/
chrome.inputMethodPrivate.setSelectionRange = function(parameters, callback) {};
@@ -252,14 +250,14 @@ chrome.inputMethodPrivate.notifyImeMenuItemActivated = function(engineID, name)
/**
* Shows the input view window. If the input view window is already shown, this
* function will do nothing.
- * @param {function():void=} callback Called when the operation completes.
+ * @param {function(): void=} callback Called when the operation completes.
*/
chrome.inputMethodPrivate.showInputView = function(callback) {};
/**
* Hides the input view window. If the input view window is already hidden, this
* function will do nothing.
- * @param {function():void=} callback Called when the operation completes.
+ * @param {function(): void=} callback Called when the operation completes.
*/
chrome.inputMethodPrivate.hideInputView = function(callback) {};
@@ -277,7 +275,7 @@ chrome.inputMethodPrivate.openOptionsPage = function(inputMethodId) {};
* y: number,
* w: number,
* h: number
- * }>):void} callback Callback which is called to provide the result
+ * }>): void} callback Callback which is called to provide the result
*/
chrome.inputMethodPrivate.getCompositionBounds = function(callback) {};
@@ -291,7 +289,7 @@ chrome.inputMethodPrivate.getCompositionBounds = function(callback) {};
* before: string,
* selected: string,
* after: string
- * }):void} callback Callback which is called to provide the result
+ * }): void} callback Callback which is called to provide the result
*/
chrome.inputMethodPrivate.getSurroundingText = function(beforeLength, afterLength, callback) {};
@@ -299,7 +297,7 @@ chrome.inputMethodPrivate.getSurroundingText = function(beforeLength, afterLengt
* Gets the current values of all settings for a particular input method
* @param {string} engineID The ID of the engine (e.g. 'zh-t-i0-pinyin',
* 'xkb:us::eng')
- * @param {function((!chrome.inputMethodPrivate.InputMethodSettings|undefined)):void}
+ * @param {function((!chrome.inputMethodPrivate.InputMethodSettings|undefined)): void}
* callback Callback to receive the settings
*/
chrome.inputMethodPrivate.getSettings = function(engineID, callback) {};
@@ -310,7 +308,7 @@ chrome.inputMethodPrivate.getSettings = function(engineID, callback) {};
* 'xkb:us::eng')
* @param {!chrome.inputMethodPrivate.InputMethodSettings} settings The settings
* to set
- * @param {function():void=} callback Callback to notify that the new value has
+ * @param {function(): void=} callback Callback to notify that the new value has
* been set
*/
chrome.inputMethodPrivate.setSettings = function(engineID, settings, callback) {};
@@ -328,13 +326,27 @@ chrome.inputMethodPrivate.setSettings = function(engineID, settings, callback) {
* style: !chrome.inputMethodPrivate.UnderlineStyle
* }>|undefined)
* }} parameters
- * @param {function(boolean):void=} callback Called when the operation completes
- * with a boolean indicating if the text was accepted or not. On failure,
- * chrome.runtime.lastError is set.
+ * @param {function(boolean): void=} callback Called when the operation
+ * completes with a boolean indicating if the text was accepted or not. On
+ * failure, chrome.runtime.lastError is set.
*/
chrome.inputMethodPrivate.setCompositionRange = function(parameters, callback) {};
/**
+ * Set the autocorrect range and autocorrect word. If this extension does not
+ * own the active IME, this fails.
+ * @param {{
+ * contextID: number,
+ * autocorrectString: string,
+ * selectionStart: number,
+ * selectionEnd: number
+ * }} parameters
+ * @param {function(boolean): void=} callback Called when the operation
+ * completes. On failure, chrome.runtime.lastError is set.
+ */
+chrome.inputMethodPrivate.setAutocorrectRange = function(parameters, callback) {};
+
+/**
* Resets the current engine to its initial state. Fires an OnReset event.
*/
chrome.inputMethodPrivate.reset = function() {};
@@ -403,3 +415,9 @@ chrome.inputMethodPrivate.onSettingsChanged;
* @type {!ChromeEvent}
*/
chrome.inputMethodPrivate.onScreenProjectionChanged;
+
+/**
+ * This event is sent when a new set of suggestions has been generated
+ * @type {!ChromeEvent}
+ */
+chrome.inputMethodPrivate.onSuggestionsChanged;
diff --git a/chromium/third_party/closure_compiler/externs/language_settings_private.js b/chromium/third_party/closure_compiler/externs/language_settings_private.js
index a656d420305..dbdbfa19212 100644
--- a/chromium/third_party/closure_compiler/externs/language_settings_private.js
+++ b/chromium/third_party/closure_compiler/externs/language_settings_private.js
@@ -1,4 +1,4 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
+// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -11,9 +11,7 @@
/** @fileoverview Externs generated from namespace: languageSettingsPrivate */
-/**
- * @const
- */
+/** @const */
chrome.languageSettingsPrivate = {};
/**
@@ -71,7 +69,7 @@ chrome.languageSettingsPrivate.InputMethodLists;
/**
* Gets languages available for translate, spell checking, input and locale.
- * @param {function(!Array<!chrome.languageSettingsPrivate.Language>):void}
+ * @param {function(!Array<!chrome.languageSettingsPrivate.Language>): void}
* callback
*/
chrome.languageSettingsPrivate.getLanguageList = function(callback) {};
@@ -105,14 +103,14 @@ chrome.languageSettingsPrivate.moveLanguage = function(languageCode, moveType) {
/**
* Gets the current status of the chosen spell check dictionaries.
- * @param {function(!Array<!chrome.languageSettingsPrivate.SpellcheckDictionaryStatus>):void}
+ * @param {function(!Array<!chrome.languageSettingsPrivate.SpellcheckDictionaryStatus>): void}
* callback
*/
chrome.languageSettingsPrivate.getSpellcheckDictionaryStatuses = function(callback) {};
/**
* Gets the custom spell check words, in sorted order.
- * @param {function(!Array<string>):void} callback
+ * @param {function(!Array<string>): void} callback
*/
chrome.languageSettingsPrivate.getSpellcheckWords = function(callback) {};
@@ -130,13 +128,13 @@ chrome.languageSettingsPrivate.removeSpellcheckWord = function(word) {};
/**
* Gets the translate target language (in most cases, the display locale).
- * @param {function(string):void} callback
+ * @param {function(string): void} callback
*/
chrome.languageSettingsPrivate.getTranslateTargetLanguage = function(callback) {};
/**
* Gets all supported input methods, including third-party IMEs. Chrome OS only.
- * @param {function(!chrome.languageSettingsPrivate.InputMethodLists):void}
+ * @param {function(!chrome.languageSettingsPrivate.InputMethodLists): void}
* callback
*/
chrome.languageSettingsPrivate.getInputMethodLists = function(callback) {};
diff --git a/chromium/third_party/closure_compiler/externs/login_state.js b/chromium/third_party/closure_compiler/externs/login_state.js
index 733ec5f64c1..1660a9b0fde 100644
--- a/chromium/third_party/closure_compiler/externs/login_state.js
+++ b/chromium/third_party/closure_compiler/externs/login_state.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -11,9 +11,7 @@
/** @fileoverview Externs generated from namespace: loginState */
-/**
- * @const
- */
+/** @const */
chrome.loginState = {};
/**
@@ -39,14 +37,14 @@ chrome.loginState.SessionState = {
/**
* Gets the type of the profile the extension is in.
- * @param {function(!chrome.loginState.ProfileType):void} callback
+ * @param {function(!chrome.loginState.ProfileType): void} callback
* @see https://developer.chrome.com/extensions/loginState#method-getProfileType
*/
chrome.loginState.getProfileType = function(callback) {};
/**
* Gets the current session state.
- * @param {function(!chrome.loginState.SessionState):void} callback
+ * @param {function(!chrome.loginState.SessionState): void} callback
* @see https://developer.chrome.com/extensions/loginState#method-getSessionState
*/
chrome.loginState.getSessionState = function(callback) {};
diff --git a/chromium/third_party/closure_compiler/externs/management.js b/chromium/third_party/closure_compiler/externs/management.js
index bde239983e5..e8bb94e5d34 100644
--- a/chromium/third_party/closure_compiler/externs/management.js
+++ b/chromium/third_party/closure_compiler/externs/management.js
@@ -104,7 +104,7 @@ chrome.management.ExtensionInfo;
/**
* Returns a list of information about installed extensions and apps.
- * @param {function(!Array<!chrome.management.ExtensionInfo>):void=} callback
+ * @param {function(!Array<!chrome.management.ExtensionInfo>): void=} callback
* @see https://developer.chrome.com/extensions/management#method-getAll
*/
chrome.management.getAll = function(callback) {};
@@ -113,7 +113,7 @@ chrome.management.getAll = function(callback) {};
* Returns information about the installed extension, app, or theme that has the
* given ID.
* @param {string} id The ID from an item of $(ref:management.ExtensionInfo).
- * @param {function(!chrome.management.ExtensionInfo):void=} callback
+ * @param {function(!chrome.management.ExtensionInfo): void=} callback
* @see https://developer.chrome.com/extensions/management#method-get
*/
chrome.management.get = function(id, callback) {};
@@ -122,7 +122,7 @@ chrome.management.get = function(id, callback) {};
* Returns information about the calling extension, app, or theme. Note: This
* function can be used without requesting the 'management' permission in the
* manifest.
- * @param {function(!chrome.management.ExtensionInfo):void=} callback
+ * @param {function(!chrome.management.ExtensionInfo): void=} callback
* @see https://developer.chrome.com/extensions/management#method-getSelf
*/
chrome.management.getSelf = function(callback) {};
@@ -131,7 +131,7 @@ chrome.management.getSelf = function(callback) {};
* Returns a list of <a href='permission_warnings'>permission warnings</a> for
* the given extension id.
* @param {string} id The ID of an already installed extension.
- * @param {function(!Array<string>):void=} callback
+ * @param {function(!Array<string>): void=} callback
* @see https://developer.chrome.com/extensions/management#method-getPermissionWarningsById
*/
chrome.management.getPermissionWarningsById = function(id, callback) {};
@@ -141,7 +141,7 @@ chrome.management.getPermissionWarningsById = function(id, callback) {};
* the given extension manifest string. Note: This function can be used without
* requesting the 'management' permission in the manifest.
* @param {string} manifestStr Extension manifest JSON string.
- * @param {function(!Array<string>):void=} callback
+ * @param {function(!Array<string>): void=} callback
* @see https://developer.chrome.com/extensions/management#method-getPermissionWarningsByManifest
*/
chrome.management.getPermissionWarningsByManifest = function(manifestStr, callback) {};
@@ -154,7 +154,7 @@ chrome.management.getPermissionWarningsByManifest = function(manifestStr, callba
* @param {string} id This should be the id from an item of
* $(ref:management.ExtensionInfo).
* @param {boolean} enabled Whether this item should be enabled or disabled.
- * @param {function():void=} callback
+ * @param {function(): void=} callback
* @see https://developer.chrome.com/extensions/management#method-setEnabled
*/
chrome.management.setEnabled = function(id, enabled, callback) {};
@@ -166,7 +166,7 @@ chrome.management.setEnabled = function(id, enabled, callback) {};
* @param {{
* showConfirmDialog: (boolean|undefined)
* }=} options
- * @param {function():void=} callback
+ * @param {function(): void=} callback
* @see https://developer.chrome.com/extensions/management#method-uninstall
*/
chrome.management.uninstall = function(id, options, callback) {};
@@ -177,7 +177,7 @@ chrome.management.uninstall = function(id, options, callback) {};
* @param {{
* showConfirmDialog: (boolean|undefined)
* }=} options
- * @param {function():void=} callback
+ * @param {function(): void=} callback
* @see https://developer.chrome.com/extensions/management#method-uninstallSelf
*/
chrome.management.uninstallSelf = function(options, callback) {};
@@ -185,7 +185,7 @@ chrome.management.uninstallSelf = function(options, callback) {};
/**
* Launches an application.
* @param {string} id The extension id of the application.
- * @param {function():void=} callback
+ * @param {function(): void=} callback
* @see https://developer.chrome.com/extensions/management#method-launchApp
*/
chrome.management.launchApp = function(id, callback) {};
@@ -195,7 +195,7 @@ chrome.management.launchApp = function(id, callback) {};
* shortcuts can be created.
* @param {string} id This should be the id from an app item of
* $(ref:management.ExtensionInfo).
- * @param {function():void=} callback
+ * @param {function(): void=} callback
* @see https://developer.chrome.com/extensions/management#method-createAppShortcut
*/
chrome.management.createAppShortcut = function(id, callback) {};
@@ -208,7 +208,7 @@ chrome.management.createAppShortcut = function(id, callback) {};
* Always check and make sure this launch type is in
* $(ref:ExtensionInfo.availableLaunchTypes), because the available launch
* types vary on different platforms and configurations.
- * @param {function():void=} callback
+ * @param {function(): void=} callback
* @see https://developer.chrome.com/extensions/management#method-setLaunchType
*/
chrome.management.setLaunchType = function(id, launchType, callback) {};
@@ -218,7 +218,7 @@ chrome.management.setLaunchType = function(id, launchType, callback) {};
* @param {string} url The URL of a web page. The scheme of the URL can only be
* "http" or "https".
* @param {string} title The title of the generated app.
- * @param {function(!chrome.management.ExtensionInfo):void=} callback
+ * @param {function(!chrome.management.ExtensionInfo): void=} callback
* @see https://developer.chrome.com/extensions/management#method-generateAppForLink
*/
chrome.management.generateAppForLink = function(url, title, callback) {};
@@ -227,7 +227,7 @@ chrome.management.generateAppForLink = function(url, title, callback) {};
* Checks if the replacement android app can be installed. Errors generated by
* this API are reported by setting $(ref:runtime.lastError) and executing the
* function's regular callback.
- * @param {function(boolean):void} callback
+ * @param {function(boolean): void} callback
* @see https://developer.chrome.com/extensions/management#method-canInstallReplacementAndroidApp
*/
chrome.management.canInstallReplacementAndroidApp = function(callback) {};
@@ -236,7 +236,7 @@ chrome.management.canInstallReplacementAndroidApp = function(callback) {};
* Prompts the user to install the replacement Android app from the manifest.
* Errors generated by this API are reported by setting $(ref:runtime.lastError)
* and executing the function's regular callback.
- * @param {function():void=} callback
+ * @param {function(): void=} callback
* @see https://developer.chrome.com/extensions/management#method-installReplacementAndroidApp
*/
chrome.management.installReplacementAndroidApp = function(callback) {};
@@ -244,7 +244,7 @@ chrome.management.installReplacementAndroidApp = function(callback) {};
/**
* Launches the replacement_web_app specified in the manifest. Prompts the user
* to install if not already installed.
- * @param {function():void=} callback
+ * @param {function(): void=} callback
* @see https://developer.chrome.com/extensions/management#method-installReplacementWebApp
*/
chrome.management.installReplacementWebApp = function(callback) {};
diff --git a/chromium/third_party/closure_compiler/externs/media_player_private.js b/chromium/third_party/closure_compiler/externs/media_player_private.js
index 6a4b58609cd..f9a1334f201 100644
--- a/chromium/third_party/closure_compiler/externs/media_player_private.js
+++ b/chromium/third_party/closure_compiler/externs/media_player_private.js
@@ -4,9 +4,7 @@
/** @fileoverview Externs generated from namespace: mediaPlayerPrivate */
-/**
- * @const
- */
+/** @const */
chrome.mediaPlayerPrivate = {};
/** @type {!ChromeEvent} */
diff --git a/chromium/third_party/closure_compiler/externs/metrics_private.js b/chromium/third_party/closure_compiler/externs/metrics_private.js
index 1f1985c16b5..8761ca99488 100644
--- a/chromium/third_party/closure_compiler/externs/metrics_private.js
+++ b/chromium/third_party/closure_compiler/externs/metrics_private.js
@@ -11,9 +11,7 @@
/** @fileoverview Externs generated from namespace: metricsPrivate */
-/**
- * @const
- */
+/** @const */
chrome.metricsPrivate = {};
/**
@@ -56,14 +54,14 @@ chrome.metricsPrivate.Histogram;
/**
* Get details about a histogram displayed at chrome://histogram.
* @param {string} name Histogram name, e.g. 'Accessibility.CrosAutoclick'.
- * @param {function(!chrome.metricsPrivate.Histogram):void} callback Invoked
+ * @param {function(!chrome.metricsPrivate.Histogram): void} callback Invoked
* with details.
*/
chrome.metricsPrivate.getHistogram = function(name, callback) {};
/**
* Returns true if the user opted in to sending crash reports.
- * @param {function(boolean):void} callback
+ * @param {function(boolean): void} callback
*/
chrome.metricsPrivate.getIsCrashReportingEnabled = function(callback) {};
@@ -71,7 +69,7 @@ chrome.metricsPrivate.getIsCrashReportingEnabled = function(callback) {};
* Returns the group name chosen for the named trial, or the empty string if the
* trial does not exist or is not enabled.
* @param {string} name
- * @param {function(string):void} callback
+ * @param {function(string): void} callback
*/
chrome.metricsPrivate.getFieldTrial = function(name, callback) {};
@@ -79,7 +77,7 @@ chrome.metricsPrivate.getFieldTrial = function(name, callback) {};
* Returns variation parameters for the named trial if available, or undefined
* otherwise.
* @param {string} name
- * @param {function((Object|undefined)):void} callback
+ * @param {function((Object|undefined)): void} callback
*/
chrome.metricsPrivate.getVariationParams = function(name, callback) {};
diff --git a/chromium/third_party/closure_compiler/externs/mime_handler_private.js b/chromium/third_party/closure_compiler/externs/mime_handler_private.js
index 7e01f64e52c..dd11eafc6fc 100644
--- a/chromium/third_party/closure_compiler/externs/mime_handler_private.js
+++ b/chromium/third_party/closure_compiler/externs/mime_handler_private.js
@@ -11,9 +11,7 @@
/** @fileoverview Externs generated from namespace: mimeHandlerPrivate */
-/**
- * @const
- */
+/** @const */
chrome.mimeHandlerPrivate = {};
/**
@@ -30,7 +28,7 @@ chrome.mimeHandlerPrivate.StreamInfo;
/**
* Returns the StreamInfo for the stream for this context if there is one.
- * @param {function(!chrome.mimeHandlerPrivate.StreamInfo):void} callback
+ * @param {function(!chrome.mimeHandlerPrivate.StreamInfo): void} callback
*/
chrome.mimeHandlerPrivate.getStreamInfo = function(callback) {};
@@ -38,7 +36,7 @@ chrome.mimeHandlerPrivate.getStreamInfo = function(callback) {};
* Instructs the PluginDocument, if running in one, to show a dialog in response
* to beforeunload events.
* @param {boolean} showDialog
- * @param {function():void=} callback
+ * @param {function(): void=} callback
*/
chrome.mimeHandlerPrivate.setShowBeforeUnloadDialog = function(showDialog, callback) {};
diff --git a/chromium/third_party/closure_compiler/externs/networking_private.js b/chromium/third_party/closure_compiler/externs/networking_private.js
index f5561f87406..5fac805611f 100644
--- a/chromium/third_party/closure_compiler/externs/networking_private.js
+++ b/chromium/third_party/closure_compiler/externs/networking_private.js
@@ -11,9 +11,7 @@
/** @fileoverview Externs generated from namespace: networkingPrivate */
-/**
- * @const
- */
+/** @const */
chrome.networkingPrivate = {};
/**
@@ -254,6 +252,7 @@ chrome.networkingPrivate.ManagedIssuerSubjectPattern;
* @typedef {{
* EnrollmentURI: (!Array<string>|undefined),
* Issuer: (!chrome.networkingPrivate.IssuerSubjectPattern|undefined),
+ * IssuerCAPEMs: (!Array<string>|undefined),
* IssuerCARef: (!Array<string>|undefined),
* Subject: (!chrome.networkingPrivate.IssuerSubjectPattern|undefined)
* }}
@@ -864,6 +863,7 @@ chrome.networkingPrivate.NetworkConfigProperties;
* IPAddressConfigType: (!chrome.networkingPrivate.IPConfigType|undefined),
* IPConfigs: (!Array<!chrome.networkingPrivate.IPConfigProperties>|undefined),
* MacAddress: (string|undefined),
+ * Metered: (boolean|undefined),
* Name: (string|undefined),
* NameServersConfigType: (!chrome.networkingPrivate.IPConfigType|undefined),
* Priority: (number|undefined),
@@ -891,6 +891,7 @@ chrome.networkingPrivate.NetworkProperties;
* IPAddressConfigType: (!chrome.networkingPrivate.ManagedIPConfigType|undefined),
* IPConfigs: (!Array<!chrome.networkingPrivate.IPConfigProperties>|undefined),
* MacAddress: (string|undefined),
+ * Metered: (!chrome.networkingPrivate.ManagedBoolean|undefined),
* Name: (!chrome.networkingPrivate.ManagedDOMString|undefined),
* NameServersConfigType: (!chrome.networkingPrivate.ManagedIPConfigType|undefined),
* Priority: (!chrome.networkingPrivate.ManagedLong|undefined),
@@ -997,7 +998,7 @@ chrome.networkingPrivate.CertificateLists;
* Gets all the properties of the network with id networkGuid. Includes all
* properties of the network (read-only and read/write values).
* @param {string} networkGuid The GUID of the network to get properties for.
- * @param {function(!chrome.networkingPrivate.NetworkProperties):void} callback
+ * @param {function(!chrome.networkingPrivate.NetworkProperties): void} callback
* Called with the network properties when received.
*/
chrome.networkingPrivate.getProperties = function(networkGuid, callback) {};
@@ -1007,7 +1008,7 @@ chrome.networkingPrivate.getProperties = function(networkGuid, callback) {};
* sources: User settings, shared settings, user policy, device policy and the
* currently active settings.
* @param {string} networkGuid The GUID of the network to get properties for.
- * @param {function(!chrome.networkingPrivate.ManagedProperties):void} callback
+ * @param {function(!chrome.networkingPrivate.ManagedProperties): void} callback
* Called with the managed network properties when received.
*/
chrome.networkingPrivate.getManagedProperties = function(networkGuid, callback) {};
@@ -1021,7 +1022,7 @@ chrome.networkingPrivate.getManagedProperties = function(networkGuid, callback)
* ErrorState, WiFi.SignalStrength, Cellular.NetworkTechnology,
* Cellular.ActivationState, Cellular.RoamingState.
* @param {string} networkGuid The GUID of the network to get properties for.
- * @param {function(!chrome.networkingPrivate.NetworkStateProperties):void}
+ * @param {function(!chrome.networkingPrivate.NetworkStateProperties): void}
* callback Called immediately with the network state properties.
*/
chrome.networkingPrivate.getState = function(networkGuid, callback) {};
@@ -1033,7 +1034,7 @@ chrome.networkingPrivate.getState = function(networkGuid, callback) {};
* @param {string} networkGuid The GUID of the network to set properties for.
* @param {!chrome.networkingPrivate.NetworkConfigProperties} properties The
* properties to set.
- * @param {function():void=} callback Called when the operation has completed.
+ * @param {function(): void=} callback Called when the operation has completed.
*/
chrome.networkingPrivate.setProperties = function(networkGuid, properties, callback) {};
@@ -1045,7 +1046,7 @@ chrome.networkingPrivate.setProperties = function(networkGuid, properties, callb
* users.
* @param {!chrome.networkingPrivate.NetworkConfigProperties} properties The
* properties to configure the new network with.
- * @param {function(string):void=} callback Called with the GUID for the new
+ * @param {function(string): void=} callback Called with the GUID for the new
* network configuration once the network has been created.
*/
chrome.networkingPrivate.createNetwork = function(shared, properties, callback) {};
@@ -1056,7 +1057,7 @@ chrome.networkingPrivate.createNetwork = function(shared, properties, callback)
* with matching identifiers (e.g. WiFi SSID and Security). If no such
* configuration exists, an error will be set and the operation will fail.
* @param {string} networkGuid The GUID of the network to forget.
- * @param {function():void=} callback Called when the operation has completed.
+ * @param {function(): void=} callback Called when the operation has completed.
*/
chrome.networkingPrivate.forgetNetwork = function(networkGuid, callback) {};
@@ -1068,7 +1069,7 @@ chrome.networkingPrivate.forgetNetwork = function(networkGuid, callback) {};
* networks listed first.
* @param {!chrome.networkingPrivate.NetworkFilter} filter Describes which
* networks to return.
- * @param {function(!Array<!chrome.networkingPrivate.NetworkStateProperties>):void}
+ * @param {function(!Array<!chrome.networkingPrivate.NetworkStateProperties>): void}
* callback Called with a dictionary of networks and their state
* properties when received.
*/
@@ -1078,7 +1079,7 @@ chrome.networkingPrivate.getNetworks = function(filter, callback) {};
* Deprecated. Please use $(ref:networkingPrivate.getNetworks) with
* filter.visible = true instead.
* @param {!chrome.networkingPrivate.NetworkType} networkType
- * @param {function(!Array<!chrome.networkingPrivate.NetworkStateProperties>):void}
+ * @param {function(!Array<!chrome.networkingPrivate.NetworkStateProperties>): void}
* callback
* @deprecated Use getNetworks.
*/
@@ -1086,7 +1087,7 @@ chrome.networkingPrivate.getVisibleNetworks = function(networkType, callback) {}
/**
* Deprecated. Please use $(ref:networkingPrivate.getDeviceStates) instead.
- * @param {function(!Array<!chrome.networkingPrivate.NetworkType>):void}
+ * @param {function(!Array<!chrome.networkingPrivate.NetworkType>): void}
* callback
* @deprecated Use getDeviceStates.
*/
@@ -1094,7 +1095,7 @@ chrome.networkingPrivate.getEnabledNetworkTypes = function(callback) {};
/**
* Returns a list of $(ref:networkingPrivate.DeviceStateProperties) objects.
- * @param {function(!Array<!chrome.networkingPrivate.DeviceStateProperties>):void}
+ * @param {function(!Array<!chrome.networkingPrivate.DeviceStateProperties>): void}
* callback Called with a list of devices and their state.
*/
chrome.networkingPrivate.getDeviceStates = function(callback) {};
@@ -1129,7 +1130,7 @@ chrome.networkingPrivate.requestNetworkScan = function(networkType) {};
/**
* Starts a connection to the network with networkGuid.
* @param {string} networkGuid The GUID of the network to connect to.
- * @param {function():void=} callback Called when the connect request has been
+ * @param {function(): void=} callback Called when the connect request has been
* sent. Note: the connection may not have completed. Observe
* $(ref:onNetworksChanged) to be notified when a network state changes.
* If the connect request immediately failed (e.g. the network is
@@ -1141,7 +1142,7 @@ chrome.networkingPrivate.startConnect = function(networkGuid, callback) {};
/**
* Starts a disconnect from the network with networkGuid.
* @param {string} networkGuid The GUID of the network to disconnect from.
- * @param {function():void=} callback Called when the disconnect request has
+ * @param {function(): void=} callback Called when the disconnect request has
* been sent. See note for $(ref:startConnect).
*/
chrome.networkingPrivate.startDisconnect = function(networkGuid, callback) {};
@@ -1153,7 +1154,7 @@ chrome.networkingPrivate.startDisconnect = function(networkGuid, callback) {};
* carrier if possible.
* @param {string} networkGuid The GUID of the Cellular network to activate.
* @param {string=} carrier Optional name of carrier to activate.
- * @param {function():void=} callback Called when the activation request has
+ * @param {function(): void=} callback Called when the activation request has
* been sent. See note for $(ref:startConnect).
*/
chrome.networkingPrivate.startActivate = function(networkGuid, carrier, callback) {};
@@ -1163,7 +1164,7 @@ chrome.networkingPrivate.startActivate = function(networkGuid, carrier, callback
* @param {!chrome.networkingPrivate.VerificationProperties} properties
* Properties of the destination to use in verifying that it is a
* trusted device.
- * @param {function(boolean):void} callback A callback function that indicates
+ * @param {function(boolean): void} callback A callback function that indicates
* whether or not the device is a trusted device.
* @deprecated Use networking.castPrivate API.
*/
@@ -1176,7 +1177,7 @@ chrome.networkingPrivate.verifyDestination = function(properties, callback) {};
* Properties of the destination to use in verifying that it is a
* trusted device.
* @param {string} data A string containing the base64-encoded data to encrypt.
- * @param {function(string):void} callback A callback function that receives
+ * @param {function(string): void} callback A callback function that receives
* base64-encoded encrypted data to send to a trusted device.
* @deprecated Use networking.castPrivate API.
*/
@@ -1188,7 +1189,7 @@ chrome.networkingPrivate.verifyAndEncryptData = function(properties, data, callb
* which to enable a TDLS connection. |enabled| If true, enable TDLS,
* otherwise disable TDLS.
* @param {boolean} enabled
- * @param {function(string):void=} callback A callback function that receives a
+ * @param {function(string): void=} callback A callback function that receives a
* string with an error or the current TDLS status. 'Failed' indicates
* that the request failed (e.g. MAC address lookup failed). 'Timeout'
* indicates that the lookup timed out. Otherwise a valid status is
@@ -1200,7 +1201,7 @@ chrome.networkingPrivate.setWifiTDLSEnabledState = function(ip_or_mac_address, e
/**
* Returns the current TDLS status for the specified peer.
* @param {string} ip_or_mac_address The IP or MAC address of the peer.
- * @param {function(string):void} callback A callback function that receives a
+ * @param {function(string): void} callback A callback function that receives a
* string with the current TDLS status which can be 'Connected',
* 'Disabled', 'Disconnected', 'Nonexistent', or 'Unknown'.
* @deprecated Use networking.castPrivate API.
@@ -1211,7 +1212,7 @@ chrome.networkingPrivate.getWifiTDLSStatus = function(ip_or_mac_address, callbac
* Returns captive portal status for the network matching 'networkGuid'.
* @param {string} networkGuid The GUID of the network to get captive portal
* status for.
- * @param {function(!chrome.networkingPrivate.CaptivePortalStatus):void}
+ * @param {function(!chrome.networkingPrivate.CaptivePortalStatus): void}
* callback A callback function that returns the results of the query for
* network captive portal status.
*/
@@ -1227,7 +1228,7 @@ chrome.networkingPrivate.getCaptivePortalStatus = function(networkGuid, callback
* If empty, the default cellular device will be used.
* @param {string} pin The current SIM PIN, or the new PIN if PUK is provided.
* @param {string=} puk The operator provided PUK for unblocking a blocked SIM.
- * @param {function():void=} callback Called when the operation has completed.
+ * @param {function(): void=} callback Called when the operation has completed.
*/
chrome.networkingPrivate.unlockCellularSim = function(networkGuid, pin, puk, callback) {};
@@ -1243,7 +1244,7 @@ chrome.networkingPrivate.unlockCellularSim = function(networkGuid, pin, puk, cal
* state of. If empty, the default cellular device will be used.
* @param {!chrome.networkingPrivate.CellularSimState} simState The SIM state to
* set.
- * @param {function():void=} callback Called when the operation has completed.
+ * @param {function(): void=} callback Called when the operation has completed.
*/
chrome.networkingPrivate.setCellularSimState = function(networkGuid, simState, callback) {};
@@ -1254,20 +1255,20 @@ chrome.networkingPrivate.setCellularSimState = function(networkGuid, simState, c
* @param {string} networkGuid The GUID of the cellular network to select the
* network for. If empty, the default cellular device will be used.
* @param {string} networkId The networkId to select.
- * @param {function():void=} callback Called when the operation has completed.
+ * @param {function(): void=} callback Called when the operation has completed.
*/
chrome.networkingPrivate.selectCellularMobileNetwork = function(networkGuid, networkId, callback) {};
/**
* Gets the global policy properties. These properties are not expected to
* change during a session.
- * @param {function(!chrome.networkingPrivate.GlobalPolicy):void} callback
+ * @param {function(!chrome.networkingPrivate.GlobalPolicy): void} callback
*/
chrome.networkingPrivate.getGlobalPolicy = function(callback) {};
/**
* Gets the lists of certificates available for network configuration.
- * @param {function(!chrome.networkingPrivate.CertificateLists):void} callback
+ * @param {function(!chrome.networkingPrivate.CertificateLists): void} callback
*/
chrome.networkingPrivate.getCertificateLists = function(callback) {};
diff --git a/chromium/third_party/closure_compiler/externs/passwords_private.js b/chromium/third_party/closure_compiler/externs/passwords_private.js
index aef8ba05737..c58dd999340 100644
--- a/chromium/third_party/closure_compiler/externs/passwords_private.js
+++ b/chromium/third_party/closure_compiler/externs/passwords_private.js
@@ -12,9 +12,7 @@
/** @fileoverview Externs generated from namespace: passwordsPrivate */
-/**
- * @const
- */
+/** @const */
chrome.passwordsPrivate = {};
/**
@@ -75,6 +73,7 @@ chrome.passwordsPrivate.UrlCollection;
* username: string,
* federationText: (string|undefined),
* id: number,
+ * frontendId: number,
* fromAccountStore: boolean
* }}
*/
@@ -84,6 +83,7 @@ chrome.passwordsPrivate.PasswordUiEntry;
* @typedef {{
* urls: !chrome.passwordsPrivate.UrlCollection,
* id: number,
+ * frontendId: number,
* fromAccountStore: boolean
* }}
*/
@@ -147,13 +147,27 @@ chrome.passwordsPrivate.changeSavedPassword = function(
chrome.passwordsPrivate.removeSavedPassword = function(id) {};
/**
- * Removes the saved password exception corresponding to |exceptionUrl|. If no
- * exception with this URL exists, this function is a no-op.
+ * Removes the saved passwords corresponding to |ids|. If no saved password
+ * exists for a certain id, that id is ignored.
+ * @param {Array<number>} ids The ids for the password entries being removed.
+ */
+chrome.passwordsPrivate.removeSavedPasswords = function(ids) {};
+
+/**
+ * Removes the saved password exception corresponding to |id|. If no
+ * exception with this id exists, this function is a no-op.
* @param {number} id The id for the exception url entry being removed.
*/
chrome.passwordsPrivate.removePasswordException = function(id) {};
/**
+ * Removes the saved password exceptions corresponding to |ids|. If no
+ * exception exists for a certain id, that id is ignored.
+ * @param {Array<number>} ids The ids for the exception entries being removed.
+ */
+chrome.passwordsPrivate.removePasswordExceptions = function(ids) {};
+
+/**
* Undoes the last removal of a saved password or exception.
*/
chrome.passwordsPrivate.undoRemoveSavedPasswordOrException = function() {};
@@ -165,7 +179,7 @@ chrome.passwordsPrivate.undoRemoveSavedPasswordOrException = function() {};
* @param {number} id The id for the password entry being being retrieved.
* @param {!chrome.passwordsPrivate.PlaintextReason} reason The reason why the
* plaintext password is requested.
- * @param {function(string):void} callback The callback that gets invoked with
+ * @param {function(string): void} callback The callback that gets invoked with
* the retrieved password.
*/
chrome.passwordsPrivate.requestPlaintextPassword = function(
@@ -173,19 +187,29 @@ chrome.passwordsPrivate.requestPlaintextPassword = function(
/**
* Returns the list of saved passwords.
- * @param {function(!Array<!chrome.passwordsPrivate.PasswordUiEntry>):void}
+ * @param {function(!Array<!chrome.passwordsPrivate.PasswordUiEntry>): void}
* callback Called with the list of saved passwords.
*/
chrome.passwordsPrivate.getSavedPasswordList = function(callback) {};
/**
* Returns the list of password exceptions.
- * @param {function(!Array<!chrome.passwordsPrivate.ExceptionEntry>):void}
+ * @param {function(!Array<!chrome.passwordsPrivate.ExceptionEntry>): void}
* callback Called with the list of password exceptions.
*/
chrome.passwordsPrivate.getPasswordExceptionList = function(callback) {};
/**
+ * Moves a password currently stored on the device to being stored in the
+ * signed-in, non-syncing Google Account. The result is a no-op if any of
+ * these is true: |id| is invalid; |id| corresponds to a password already
+ * stored in the account; or the user is not using the account-scoped password
+ * storage.
+ * @param {number} id The id for the password entry being moved.
+ */
+chrome.passwordsPrivate.movePasswordToAccount = function(id) {};
+
+/**
* Triggers the Password Manager password import functionality.
*/
chrome.passwordsPrivate.importPasswords = function() {};
@@ -196,7 +220,7 @@ chrome.passwordsPrivate.importPasswords = function() {};
* called when the request is started or rejected. If rejected
* <code>chrome.runtime.lastError</code> will be set to 'in-progress' or
* 'reauth-failed'.
- * @param {function():void} callback
+ * @param {function(): void} callback
*/
chrome.passwordsPrivate.exportPasswords = function(callback) {};
@@ -205,7 +229,7 @@ chrome.passwordsPrivate.exportPasswords = function(callback) {};
* on the onPasswordsFileExportProgress event. This function is useful for
* checking if an export has already been initiated from an older tab, where we
* might have missed the original event.
- * @param {function(!chrome.passwordsPrivate.ExportProgressStatus):void}
+ * @param {function(!chrome.passwordsPrivate.ExportProgressStatus): void}
* callback
*/
chrome.passwordsPrivate.requestExportProgressStatus = function(callback) {};
@@ -218,7 +242,7 @@ chrome.passwordsPrivate.cancelExportPasswords = function() {};
/**
* Requests the account-storage opt-in state of the current user.
- * @param {function(boolean):void} callback
+ * @param {function(boolean): void} callback
*/
chrome.passwordsPrivate.isOptedInForAccountStorage = function(callback) {};
@@ -230,7 +254,7 @@ chrome.passwordsPrivate.optInForAccountStorage = function(optIn) {};
/**
* Requests the latest compromised credentials.
- * @param {function(!Array<!chrome.passwordsPrivate.CompromisedCredential>):void}
+ * @param {function(!Array<!chrome.passwordsPrivate.CompromisedCredential>): void}
* callback
*/
chrome.passwordsPrivate.getCompromisedCredentials = function(callback) {};
@@ -242,7 +266,7 @@ chrome.passwordsPrivate.getCompromisedCredentials = function(callback) {};
* compromised credential whose password is being retrieved.
* @param {!chrome.passwordsPrivate.PlaintextReason} reason The reason why the
* plaintext password is requested.
- * @param {function(!chrome.passwordsPrivate.CompromisedCredential):void}
+ * @param {function(!chrome.passwordsPrivate.CompromisedCredential): void}
* callback The callback that gets invoked with the result.
*/
chrome.passwordsPrivate.getPlaintextCompromisedPassword = function(
@@ -254,7 +278,8 @@ chrome.passwordsPrivate.getPlaintextCompromisedPassword = function(
* @param {!chrome.passwordsPrivate.CompromisedCredential} credential The
* credential whose password should be changed.
* @param {string} new_password The new password.
- * @param {function():void=} callback The callback that gets invoked in the end.
+ * @param {function(): void=} callback The callback that gets invoked in the
+ * end.
*/
chrome.passwordsPrivate.changeCompromisedCredential = function(
credential, new_password, callback) {};
@@ -263,26 +288,27 @@ chrome.passwordsPrivate.changeCompromisedCredential = function(
* Requests to remove |credential| from the password store. Invokes |callback|
* on completion.
* @param {!chrome.passwordsPrivate.CompromisedCredential} credential
- * @param {function():void=} callback
+ * @param {function(): void=} callback
*/
chrome.passwordsPrivate.removeCompromisedCredential = function(
credential, callback) {};
/**
* Starts a check for compromised passwords. Invokes |callback| on completion.
- * @param {function():void=} callback
+ * @param {function(): void=} callback
*/
chrome.passwordsPrivate.startPasswordCheck = function(callback) {};
/**
* Stops checking for compromised passwords. Invokes |callback| on completion.
- * @param {function():void=} callback
+ * @param {function(): void=} callback
*/
chrome.passwordsPrivate.stopPasswordCheck = function(callback) {};
/**
* Returns the current status of the check via |callback|.
- * @param {function(!chrome.passwordsPrivate.PasswordCheckStatus):void} callback
+ * @param {function(!chrome.passwordsPrivate.PasswordCheckStatus): void}
+ * callback
*/
chrome.passwordsPrivate.getPasswordCheckStatus = function(callback) {};
diff --git a/chromium/third_party/closure_compiler/externs/pending.js b/chromium/third_party/closure_compiler/externs/pending.js
index d7326e3a597..ca247a884c1 100644
--- a/chromium/third_party/closure_compiler/externs/pending.js
+++ b/chromium/third_party/closure_compiler/externs/pending.js
@@ -37,33 +37,6 @@ class DOMMatrix {
}
/**
- * @see https://wicg.github.io/ResizeObserver/#resizeobserverentry
- * @typedef {{contentRect: DOMRectReadOnly,
- * target: Element}}
- * TODO(dpapad): Remove this once it is added to Closure Compiler itself.
- */
-let ResizeObserverEntry;
-
-/**
- * @see https://wicg.github.io/ResizeObserver/#api
- * TODO(dpapad): Remove this once it is added to Closure Compiler itself.
- */
-class ResizeObserver {
- /**
- * @param {!function(Array<ResizeObserverEntry>, ResizeObserver)} callback
- */
- constructor(callback) {}
-
- disconnect() {}
-
- /** @param {Element} target */
- observe(target) {}
-
- /** @param {Element} target */
- unobserve(target) {}
-}
-
-/**
* @see
* https://github.com/tc39/proposal-bigint
* This supports wrapping and operating on arbitrarily large integers.
@@ -73,9 +46,6 @@ class ResizeObserver {
*/
let BigInt = function(value) {};
-/** @const {!Clipboard} */
-Navigator.prototype.clipboard;
-
/**
* TODO(katie): Remove this once length is added to the Closure
* chrome_extensions.js.
@@ -153,3 +123,16 @@ class StylePropertyMap {
/** @type {!StylePropertyMap} */
HTMLElement.prototype.attributeStyleMap;
+
+/** @return {!AnimationEffectTimingProperties} */
+AnimationEffectReadOnly.prototype.getTiming = function() {};
+
+/** @return {!Array<!Object>} */
+AnimationEffectReadOnly.prototype.getKeyframes = function() {};
+
+/**
+ * @return {!IteratorIterable<!Array<string>>}
+ * @nosideeffects
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/keys
+ */
+URLSearchParams.prototype.keys = function() {};
diff --git a/chromium/third_party/closure_compiler/externs/quick_unlock_private.js b/chromium/third_party/closure_compiler/externs/quick_unlock_private.js
index 38d1786b6cb..48efff3ea6f 100644
--- a/chromium/third_party/closure_compiler/externs/quick_unlock_private.js
+++ b/chromium/third_party/closure_compiler/externs/quick_unlock_private.js
@@ -1,4 +1,4 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
+// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -11,9 +11,7 @@
/** @fileoverview Externs generated from namespace: quickUnlockPrivate */
-/**
- * @const
- */
+/** @const */
chrome.quickUnlockPrivate = {};
/**
@@ -61,7 +59,7 @@ chrome.quickUnlockPrivate.CredentialRequirements;
* Returns a token that can be used for future operations and the number of
* seconds until the token expires.
* @param {string} accountPassword The account password for the logged in user.
- * @param {function(!chrome.quickUnlockPrivate.TokenInfo):void} onComplete
+ * @param {function(!chrome.quickUnlockPrivate.TokenInfo): void} onComplete
*/
chrome.quickUnlockPrivate.getAuthToken = function(accountPassword, onComplete) {};
@@ -71,15 +69,15 @@ chrome.quickUnlockPrivate.getAuthToken = function(accountPassword, onComplete) {
* using the settings_private API (which also provides policy information). This
* API must be used to change the pref.
* @param {string} token The token returned by $(ref:getAuthToken).
- * @param {boolean} enabled
- * @param {function():void=} onComplete
+ * @param {boolean} enabled Whether to enable the lock screen.
+ * @param {function(): void=} onComplete
*/
chrome.quickUnlockPrivate.setLockScreenEnabled = function(token, enabled, onComplete) {};
/**
* Returns the set of quick unlock modes that are available for the user to use.
* Some quick unlock modes may be disabled by policy.
- * @param {function(!Array<!chrome.quickUnlockPrivate.QuickUnlockMode>):void}
+ * @param {function(!Array<!chrome.quickUnlockPrivate.QuickUnlockMode>): void}
* onComplete
*/
chrome.quickUnlockPrivate.getAvailableModes = function(onComplete) {};
@@ -87,7 +85,7 @@ chrome.quickUnlockPrivate.getAvailableModes = function(onComplete) {};
/**
* Returns the quick unlock modes that are currently enabled and usable on the
* lock screen.
- * @param {function(!Array<!chrome.quickUnlockPrivate.QuickUnlockMode>):void}
+ * @param {function(!Array<!chrome.quickUnlockPrivate.QuickUnlockMode>): void}
* onComplete
*/
chrome.quickUnlockPrivate.getActiveModes = function(onComplete) {};
@@ -98,9 +96,9 @@ chrome.quickUnlockPrivate.getActiveModes = function(onComplete) {};
* @param {!chrome.quickUnlockPrivate.QuickUnlockMode} mode The quick unlock
* mode that is used.
* @param {string} credential The given credential.
- * @param {function(!chrome.quickUnlockPrivate.CredentialCheck):void} onComplete
- * Called with a list of warnings and errors the given |credential| has
- * (or an empty list if there are none).
+ * @param {function(!chrome.quickUnlockPrivate.CredentialCheck): void}
+ * onComplete Called with a list of warnings and errors the given
+ * |credential| has (or an empty list if there are none).
*/
chrome.quickUnlockPrivate.checkCredential = function(mode, credential, onComplete) {};
@@ -108,7 +106,7 @@ chrome.quickUnlockPrivate.checkCredential = function(mode, credential, onComplet
* Gets the credential requirements for the given unlock mode.
* @param {!chrome.quickUnlockPrivate.QuickUnlockMode} mode The quick unlock
* mode that is used.
- * @param {function(!chrome.quickUnlockPrivate.CredentialRequirements):void}
+ * @param {function(!chrome.quickUnlockPrivate.CredentialRequirements): void}
* onComplete Called with the credential requirements of the given
* |mode|.
*/
@@ -122,7 +120,7 @@ chrome.quickUnlockPrivate.getCredentialRequirements = function(mode, onComplete)
* @param {!Array<string>} credentials The associated credential for each mode.
* To keep the credential the same for the associated mode, pass an
* empty string.
- * @param {function():void} onComplete Called with true if the quick unlock
+ * @param {function(): void} onComplete Called with true if the quick unlock
* state was updated, false otherwise. The update is treated as a single
* atomic operation.
*/
diff --git a/chromium/third_party/closure_compiler/externs/resources_private.js b/chromium/third_party/closure_compiler/externs/resources_private.js
index 48314468dd7..8870b77dafa 100644
--- a/chromium/third_party/closure_compiler/externs/resources_private.js
+++ b/chromium/third_party/closure_compiler/externs/resources_private.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -11,9 +11,7 @@
/** @fileoverview Externs generated from namespace: resourcesPrivate */
-/**
- * @const
- */
+/** @const */
chrome.resourcesPrivate = {};
/**
@@ -32,7 +30,7 @@ chrome.resourcesPrivate.Component = {
* instructions on adding a new component to this API.
* @param {!chrome.resourcesPrivate.Component} component Internal chrome
* component to get strings for.
- * @param {function(Object):void} callback Called with a dictionary mapping
+ * @param {function(Object): void} callback Called with a dictionary mapping
* names to strings.
*/
chrome.resourcesPrivate.getStrings = function(component, callback) {};
diff --git a/chromium/third_party/closure_compiler/externs/runtime.js b/chromium/third_party/closure_compiler/externs/runtime.js
new file mode 100644
index 00000000000..cfa101be934
--- /dev/null
+++ b/chromium/third_party/closure_compiler/externs/runtime.js
@@ -0,0 +1,482 @@
+// Copyright 2020 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This file was generated by:
+// tools/json_schema_compiler/compiler.py.
+// NOTE: The format of types has changed. 'FooType' is now
+// 'chrome.runtime.FooType'.
+// Please run the closure compiler before committing changes.
+// See https://chromium.googlesource.com/chromium/src/+/master/docs/closure_compilation.md
+
+// IMPORTANT NOTE: Work-around for crbug.com/543822
+// s/chrome.runtime.events.Event/chrome.events.Event/
+// s/chrome.runtime.tabs.Tab/chrome.tabs.Tab/
+
+/** @fileoverview Externs generated from namespace: runtime */
+
+/** @const */
+chrome.runtime = {};
+
+/**
+ * An object which allows two way communication with other pages. See <a href="messaging#connect">Long-lived connections</a> for more information.
+ * @constructor
+ * @private
+ * @see https://developer.chrome.com/extensions/runtime#type-Port
+ */
+chrome.runtime.Port = function() {};
+
+/**
+ * The name of the port, as specified in the call to $(ref:runtime.connect).
+ * @type {string}
+ * @see https://developer.chrome.com/extensions/runtime#type-name
+ */
+chrome.runtime.Port.prototype.name;
+
+/**
+ * Immediately disconnect the port. Calling <code>disconnect()</code> on an
+ * already-disconnected port has no effect. When a port is disconnected, no new
+ * events will be dispatched to this port.
+ * @see https://developer.chrome.com/extensions/runtime#method-disconnect
+ */
+chrome.runtime.Port.prototype.disconnect = function() {};
+
+/**
+ * Fired when the port is disconnected from the other end(s). $(ref:runtime.lastError) may be set if the port was disconnected by an error. If the port is closed via $(ref:Port.disconnect disconnect), then this event is <em>only</em> fired on the other end. This event is fired at most once (see also <a href="messaging#port-lifetime">Port lifetime</a>). The first and only parameter to the event handler is this disconnected port.
+ * @type {!chrome.events.Event}
+ * @see https://developer.chrome.com/extensions/runtime#type-onDisconnect
+ */
+chrome.runtime.Port.prototype.onDisconnect;
+
+/**
+ * This event is fired when $(ref:Port.postMessage postMessage) is called by the other end of the port. The first parameter is the message, the second parameter is the port that received the message.
+ * @type {!chrome.events.Event}
+ * @see https://developer.chrome.com/extensions/runtime#type-onMessage
+ */
+chrome.runtime.Port.prototype.onMessage;
+
+/**
+ * Send a message to the other end of the port. If the port is disconnected, an
+ * error is thrown.
+ * @param {*} message The message to send. This object should be JSON-ifiable.
+ * @see https://developer.chrome.com/extensions/runtime#method-postMessage
+ */
+chrome.runtime.Port.prototype.postMessage = function(message) {};
+
+/**
+ * This property will <b>only</b> be present on ports passed to $(ref:runtime.onConnect onConnect) / $(ref:runtime.onConnectExternal onConnectExternal) / $(ref:runtime.onConnectExternal onConnectNative) listeners.
+ * @type {(!chrome.runtime.MessageSender|undefined)}
+ * @see https://developer.chrome.com/extensions/runtime#type-sender
+ */
+chrome.runtime.Port.prototype.sender;
+
+
+/**
+ * An object containing information about the script context that sent a message or request.
+ * @typedef {{
+ * tab: (!chrome.tabs.Tab|undefined),
+ * frameId: (number|undefined),
+ * guestProcessId: (number|undefined),
+ * guestRenderFrameRoutingId: (number|undefined),
+ * id: (string|undefined),
+ * url: (string|undefined),
+ * nativeApplication: (string|undefined),
+ * tlsChannelId: (string|undefined),
+ * origin: (string|undefined)
+ * }}
+ * @see https://developer.chrome.com/extensions/runtime#type-MessageSender
+ */
+chrome.runtime.MessageSender;
+
+/**
+ * @enum {string}
+ * @see https://developer.chrome.com/extensions/runtime#type-PlatformOs
+ */
+chrome.runtime.PlatformOs = {
+ MAC: 'mac',
+ WIN: 'win',
+ ANDROID: 'android',
+ CROS: 'cros',
+ LINUX: 'linux',
+ OPENBSD: 'openbsd',
+};
+
+/**
+ * @enum {string}
+ * @see https://developer.chrome.com/extensions/runtime#type-PlatformArch
+ */
+chrome.runtime.PlatformArch = {
+ ARM: 'arm',
+ ARM64: 'arm64',
+ X86_32: 'x86-32',
+ X86_64: 'x86-64',
+ MIPS: 'mips',
+ MIPS64: 'mips64',
+};
+
+/**
+ * @enum {string}
+ * @see https://developer.chrome.com/extensions/runtime#type-PlatformNaclArch
+ */
+chrome.runtime.PlatformNaclArch = {
+ ARM: 'arm',
+ X86_32: 'x86-32',
+ X86_64: 'x86-64',
+ MIPS: 'mips',
+ MIPS64: 'mips64',
+};
+
+/**
+ * An object containing information about the current platform.
+ * @typedef {{
+ * os: !chrome.runtime.PlatformOs,
+ * arch: !chrome.runtime.PlatformArch,
+ * nacl_arch: !chrome.runtime.PlatformNaclArch
+ * }}
+ * @see https://developer.chrome.com/extensions/runtime#type-PlatformInfo
+ */
+chrome.runtime.PlatformInfo;
+
+/**
+ * @enum {string}
+ * @see https://developer.chrome.com/extensions/runtime#type-RequestUpdateCheckStatus
+ */
+chrome.runtime.RequestUpdateCheckStatus = {
+ THROTTLED: 'throttled',
+ NO_UPDATE: 'no_update',
+ UPDATE_AVAILABLE: 'update_available',
+};
+
+/**
+ * @enum {string}
+ * @see https://developer.chrome.com/extensions/runtime#type-OnInstalledReason
+ */
+chrome.runtime.OnInstalledReason = {
+ INSTALL: 'install',
+ UPDATE: 'update',
+ CHROME_UPDATE: 'chrome_update',
+ SHARED_MODULE_UPDATE: 'shared_module_update',
+};
+
+/**
+ * @enum {string}
+ * @see https://developer.chrome.com/extensions/runtime#type-OnRestartRequiredReason
+ */
+chrome.runtime.OnRestartRequiredReason = {
+ APP_UPDATE: 'app_update',
+ OS_UPDATE: 'os_update',
+ PERIODIC: 'periodic',
+};
+
+/**
+ * This will be defined during an API method callback if there was an error
+ * @typedef {{
+ * message: (string|undefined)
+ * }}
+ * @see https://developer.chrome.com/extensions/runtime#type-lastError
+ */
+chrome.runtime.lastError;
+
+/**
+ * The ID of the extension/app.
+ * @type {string}
+ * @see https://developer.chrome.com/extensions/runtime#type-id
+ */
+chrome.runtime.id;
+
+/**
+ * Retrieves the JavaScript 'window' object for the background page running
+ * inside the current extension/app. If the background page is an event page,
+ * the system will ensure it is loaded before calling the callback. If there is
+ * no background page, an error is set.
+ * @param {function((Object|undefined)):void} callback
+ * @see https://developer.chrome.com/extensions/runtime#method-getBackgroundPage
+ */
+chrome.runtime.getBackgroundPage = function(callback) {};
+
+/**
+ * <p>Open your Extension's options page, if possible.</p><p>The precise
+ * behavior may depend on your manifest's <code><a
+ * href="optionsV2">options_ui</a></code> or <code><a
+ * href="options">options_page</a></code> key, or what Chrome happens to support
+ * at the time. For example, the page may be opened in a new tab, within
+ * chrome://extensions, within an App, or it may just focus an open options
+ * page. It will never cause the caller page to reload.</p><p>If your Extension
+ * does not declare an options page, or Chrome failed to create one for some
+ * other reason, the callback will set $(ref:lastError).</p>
+ * @param {function():void=} callback
+ * @see https://developer.chrome.com/extensions/runtime#method-openOptionsPage
+ */
+chrome.runtime.openOptionsPage = function(callback) {};
+
+/**
+ * Returns details about the app or extension from the manifest. The object
+ * returned is a serialization of the full <a href="manifest.html">manifest
+ * file</a>.
+ * @return {Object} The manifest details.
+ * @see https://developer.chrome.com/extensions/runtime#method-getManifest
+ */
+chrome.runtime.getManifest = function() {};
+
+/**
+ * Converts a relative path within an app/extension install directory to a
+ * fully-qualified URL.
+ * @param {string} path A path to a resource within an app/extension expressed
+ * relative to its install directory.
+ * @return {string} The fully-qualified URL to the resource.
+ * @see https://developer.chrome.com/extensions/runtime#method-getURL
+ */
+chrome.runtime.getURL = function(path) {};
+
+/**
+ * Sets the URL to be visited upon uninstallation. This may be used to clean up
+ * server-side data, do analytics, and implement surveys. Maximum 255
+ * characters.
+ * @param {string} url URL to be opened after the extension is uninstalled. This
+ * URL must have an http: or https: scheme. Set an empty string to not open
+ * a new tab upon uninstallation.
+ * @param {function():void=} callback Called when the uninstall URL is set. If
+ * the given URL is invalid, $(ref:runtime.lastError) will be set.
+ * @see https://developer.chrome.com/extensions/runtime#method-setUninstallURL
+ */
+chrome.runtime.setUninstallURL = function(url, callback) {};
+
+/**
+ * Reloads the app or extension. This method is not supported in kiosk mode. For
+ * kiosk mode, use chrome.runtime.restart() method.
+ * @see https://developer.chrome.com/extensions/runtime#method-reload
+ */
+chrome.runtime.reload = function() {};
+
+/**
+ * <p>Requests an immediate update check be done for this app/extension.</p>
+ * <p><b>Important</b>: Most extensions/apps should <b>not</b> use this method,
+ * since chrome already does automatic checks every few hours, and you can
+ * listen for the $(ref:runtime.onUpdateAvailable) event without needing to call
+ * requestUpdateCheck.</p><p>This method is only appropriate to call in very
+ * limited circumstances, such as if your extension/app talks to a backend
+ * service, and the backend service has determined that the client extension/app
+ * version is very far out of date and you'd like to prompt a user to update.
+ * Most other uses of requestUpdateCheck, such as calling it unconditionally
+ * based on a repeating timer, probably only serve to waste client, network, and
+ * server resources.</p>
+ * @param {function(!chrome.runtime.RequestUpdateCheckStatus, ({
+ * version: string
+ * }|undefined)):void} callback
+ * @see https://developer.chrome.com/extensions/runtime#method-requestUpdateCheck
+ */
+chrome.runtime.requestUpdateCheck = function(callback) {};
+
+/**
+ * Restart the ChromeOS device when the app runs in kiosk mode. Otherwise, it's
+ * no-op.
+ * @see https://developer.chrome.com/extensions/runtime#method-restart
+ */
+chrome.runtime.restart = function() {};
+
+/**
+ * Restart the ChromeOS device when the app runs in kiosk mode after the given
+ * seconds. If called again before the time ends, the reboot will be delayed. If
+ * called with a value of -1, the reboot will be cancelled. It's a no-op in
+ * non-kiosk mode. It's only allowed to be called repeatedly by the first
+ * extension to invoke this API.
+ * @param {number} seconds Time to wait in seconds before rebooting the device,
+ * or -1 to cancel a scheduled reboot.
+ * @param {function():void=} callback A callback to be invoked when a restart
+ * request was successfully rescheduled.
+ * @see https://developer.chrome.com/extensions/runtime#method-restartAfterDelay
+ */
+chrome.runtime.restartAfterDelay = function(seconds, callback) {};
+
+/**
+ * Attempts to connect to connect listeners within an extension/app (such as the
+ * background page), or other extensions/apps. This is useful for content
+ * scripts connecting to their extension processes, inter-app/extension
+ * communication, and <a href="manifest/externally_connectable.html">web
+ * messaging</a>. Note that this does not connect to any listeners in a content
+ * script. Extensions may connect to content scripts embedded in tabs via
+ * $(ref:tabs.connect).
+ * @param {string=} extensionId The ID of the extension or app to connect to. If
+ * omitted, a connection will be attempted with your own extension. Required
+ * if sending messages from a web page for <a
+ * href="manifest/externally_connectable.html">web messaging</a>.
+ * @param {{
+ * name: (string|undefined),
+ * includeTlsChannelId: (boolean|undefined)
+ * }=} connectInfo
+ * @return {!chrome.runtime.Port} Port through which messages can be sent and
+ * received. The port's $(ref:Port onDisconnect) event is fired if the
+ * extension/app does not exist.
+ * @see https://developer.chrome.com/extensions/runtime#method-connect
+ */
+chrome.runtime.connect = function(extensionId, connectInfo) {};
+
+/**
+ * Connects to a native application in the host machine. See <a
+ * href="nativeMessaging">Native Messaging</a> for more information.
+ * @param {string} application The name of the registered application to connect
+ * to.
+ * @return {!chrome.runtime.Port} Port through which messages can be sent and
+ * received with the application
+ * @see https://developer.chrome.com/extensions/runtime#method-connectNative
+ */
+chrome.runtime.connectNative = function(application) {};
+
+/**
+ * Sends a single message to event listeners within your extension/app or a
+ * different extension/app. Similar to $(ref:runtime.connect) but only sends a
+ * single message, with an optional response. If sending to your extension, the
+ * $(ref:runtime.onMessage) event will be fired in every frame of your extension
+ * (except for the sender's frame), or $(ref:runtime.onMessageExternal), if a
+ * different extension. Note that extensions cannot send messages to content
+ * scripts using this method. To send messages to content scripts, use
+ * $(ref:tabs.sendMessage).
+ * @param {?string|undefined} extensionId The ID of the extension/app to send
+ * the message to. If omitted, the message will be sent to your own
+ * extension/app. Required if sending messages from a web page for <a
+ * href="manifest/externally_connectable.html">web messaging</a>.
+ * @param {*} message The message to send. This message should be a JSON-ifiable
+ * object.
+ * @param {{
+ * includeTlsChannelId: (boolean|undefined)
+ * }=} options
+ * @param {function(*):void=} responseCallback
+ * @see https://developer.chrome.com/extensions/runtime#method-sendMessage
+ */
+chrome.runtime.sendMessage = function(extensionId, message, options, responseCallback) {};
+
+/**
+ * Send a single message to a native application.
+ * @param {string} application The name of the native messaging host.
+ * @param {Object} message The message that will be passed to the native
+ * messaging host.
+ * @param {function(*):void=} responseCallback
+ * @see https://developer.chrome.com/extensions/runtime#method-sendNativeMessage
+ */
+chrome.runtime.sendNativeMessage = function(application, message, responseCallback) {};
+
+/**
+ * Returns information about the current platform.
+ * @param {function(!chrome.runtime.PlatformInfo):void} callback Called with
+ * results
+ * @see https://developer.chrome.com/extensions/runtime#method-getPlatformInfo
+ */
+chrome.runtime.getPlatformInfo = function(callback) {};
+
+/**
+ * Returns a DirectoryEntry for the package directory.
+ * @param {function(Object):void} callback
+ * @see https://developer.chrome.com/extensions/runtime#method-getPackageDirectoryEntry
+ */
+chrome.runtime.getPackageDirectoryEntry = function(callback) {};
+
+/**
+ * Fired when a profile that has this extension installed first starts up. This
+ * event is not fired when an incognito profile is started, even if this
+ * extension is operating in 'split' incognito mode.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/runtime#event-onStartup
+ */
+chrome.runtime.onStartup;
+
+/**
+ * Fired when the extension is first installed, when the extension is updated to
+ * a new version, and when Chrome is updated to a new version.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/runtime#event-onInstalled
+ */
+chrome.runtime.onInstalled;
+
+/**
+ * Sent to the event page just before it is unloaded. This gives the extension
+ * opportunity to do some clean up. Note that since the page is unloading, any
+ * asynchronous operations started while handling this event are not guaranteed
+ * to complete. If more activity for the event page occurs before it gets
+ * unloaded the onSuspendCanceled event will be sent and the page won't be
+ * unloaded.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/runtime#event-onSuspend
+ */
+chrome.runtime.onSuspend;
+
+/**
+ * Sent after onSuspend to indicate that the app won't be unloaded after all.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/runtime#event-onSuspendCanceled
+ */
+chrome.runtime.onSuspendCanceled;
+
+/**
+ * Fired when an update is available, but isn't installed immediately because
+ * the app is currently running. If you do nothing, the update will be installed
+ * the next time the background page gets unloaded, if you want it to be
+ * installed sooner you can explicitly call chrome.runtime.reload(). If your
+ * extension is using a persistent background page, the background page of
+ * course never gets unloaded, so unless you call chrome.runtime.reload()
+ * manually in response to this event the update will not get installed until
+ * the next time chrome itself restarts. If no handlers are listening for this
+ * event, and your extension has a persistent background page, it behaves as if
+ * chrome.runtime.reload() is called in response to this event.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/runtime#event-onUpdateAvailable
+ */
+chrome.runtime.onUpdateAvailable;
+
+/**
+ * Fired when a Chrome update is available, but isn't installed immediately
+ * because a browser restart is required.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/runtime#event-onBrowserUpdateAvailable
+ */
+chrome.runtime.onBrowserUpdateAvailable;
+
+/**
+ * Fired when a connection is made from either an extension process or a content
+ * script (by $(ref:runtime.connect)).
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/runtime#event-onConnect
+ */
+chrome.runtime.onConnect;
+
+/**
+ * Fired when a connection is made from another extension (by
+ * $(ref:runtime.connect)).
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/runtime#event-onConnectExternal
+ */
+chrome.runtime.onConnectExternal;
+
+/**
+ * Fired when a connection is made from a native application. Currently only
+ * supported on Chrome OS.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/runtime#event-onConnectNative
+ */
+chrome.runtime.onConnectNative;
+
+/**
+ * Fired when a message is sent from either an extension process (by
+ * $(ref:runtime.sendMessage)) or a content script (by $(ref:tabs.sendMessage)).
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/runtime#event-onMessage
+ */
+chrome.runtime.onMessage;
+
+/**
+ * Fired when a message is sent from another extension/app (by
+ * $(ref:runtime.sendMessage)). Cannot be used in a content script.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/runtime#event-onMessageExternal
+ */
+chrome.runtime.onMessageExternal;
+
+/**
+ * Fired when an app or the device that it runs on needs to be restarted. The
+ * app should close all its windows at its earliest convenient time to let the
+ * restart to happen. If the app does nothing, a restart will be enforced after
+ * a 24-hour grace period has passed. Currently, this event is only fired for
+ * Chrome OS kiosk apps.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/runtime#event-onRestartRequired
+ */
+chrome.runtime.onRestartRequired;
diff --git a/chromium/third_party/closure_compiler/externs/safe_browsing_private.js b/chromium/third_party/closure_compiler/externs/safe_browsing_private.js
index f7ae7fdab86..efd25eccba7 100644
--- a/chromium/third_party/closure_compiler/externs/safe_browsing_private.js
+++ b/chromium/third_party/closure_compiler/externs/safe_browsing_private.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -11,9 +11,7 @@
/** @fileoverview Externs generated from namespace: safeBrowsingPrivate */
-/**
- * @const
- */
+/** @const */
chrome.safeBrowsingPrivate = {};
/**
@@ -93,8 +91,8 @@ chrome.safeBrowsingPrivate.ReferrerChainEntry;
/**
* Gets referrer chain for the specified tab.
* @param {number} tabId Id of the tab from which to retrieve the referrer.
- * @param {function(!Array<!chrome.safeBrowsingPrivate.ReferrerChainEntry>):void} callbac
- * k Called with the list of referrer chain entries.
+ * @param {function(!Array<!chrome.safeBrowsingPrivate.ReferrerChainEntry>): void}
+ * callback Called with the list of referrer chain entries.
*/
chrome.safeBrowsingPrivate.getReferrerChain = function(tabId, callback) {};
diff --git a/chromium/third_party/closure_compiler/externs/settings_private.js b/chromium/third_party/closure_compiler/externs/settings_private.js
index e2870f25a64..6823466cdf5 100644
--- a/chromium/third_party/closure_compiler/externs/settings_private.js
+++ b/chromium/third_party/closure_compiler/externs/settings_private.js
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -11,9 +11,7 @@
/** @fileoverview Externs generated from namespace: settingsPrivate */
-/**
- * @const
- */
+/** @const */
chrome.settingsPrivate = {};
/**
@@ -59,6 +57,8 @@ chrome.settingsPrivate.Enforcement = {
* controlledByName: (string|undefined),
* enforcement: (!chrome.settingsPrivate.Enforcement|undefined),
* recommendedValue: (*|undefined),
+ * userSelectableValues: (!Array<*>|undefined),
+ * userControlDisabled: (boolean|undefined),
* extensionId: (string|undefined),
* extensionCanBeDisabled: (boolean|undefined)
* }}
@@ -70,28 +70,28 @@ chrome.settingsPrivate.PrefObject;
* @param {string} name The name of the pref.
* @param {*} value The new value of the pref.
* @param {string=} pageId An optional user metrics identifier.
- * @param {function(boolean):void=} callback The callback for whether the pref
+ * @param {function(boolean): void=} callback The callback for whether the pref
* was set or not.
*/
chrome.settingsPrivate.setPref = function(name, value, pageId, callback) {};
/**
* Gets an array of all the prefs.
- * @param {function(!Array<!chrome.settingsPrivate.PrefObject>):void} callback
+ * @param {function(!Array<!chrome.settingsPrivate.PrefObject>): void} callback
*/
chrome.settingsPrivate.getAllPrefs = function(callback) {};
/**
* Gets the value of a specific pref.
* @param {string} name
- * @param {function(!chrome.settingsPrivate.PrefObject):void} callback
+ * @param {function(!chrome.settingsPrivate.PrefObject): void} callback
*/
chrome.settingsPrivate.getPref = function(name, callback) {};
/**
* Gets the default page zoom factor. Possible values are currently between 0.25
* and 5. For a full list, see zoom::kPresetZoomFactors.
- * @param {function(number):void} callback
+ * @param {function(number): void} callback
*/
chrome.settingsPrivate.getDefaultZoom = function(callback) {};
@@ -99,7 +99,7 @@ chrome.settingsPrivate.getDefaultZoom = function(callback) {};
* Sets the page zoom factor. Must be less than 0.001 different than a value in
* zoom::kPresetZoomFactors.
* @param {number} zoom
- * @param {function(boolean):void=} callback
+ * @param {function(boolean): void=} callback
*/
chrome.settingsPrivate.setDefaultZoom = function(zoom, callback) {};
diff --git a/chromium/third_party/closure_compiler/externs/system_display.js b/chromium/third_party/closure_compiler/externs/system_display.js
index ddf6066ad88..f1270181075 100644
--- a/chromium/third_party/closure_compiler/externs/system_display.js
+++ b/chromium/third_party/closure_compiler/externs/system_display.js
@@ -199,7 +199,7 @@ chrome.system.display.MirrorModeInfo;
* Requests the information for all attached display devices.
* @param {!chrome.system.display.GetInfoFlags} flags Options affecting how the
* information is returned.
- * @param {function(!Array<!chrome.system.display.DisplayUnitInfo>):void}
+ * @param {function(!Array<!chrome.system.display.DisplayUnitInfo>): void}
* callback The callback to invoke with the results.
* @see https://developer.chrome.com/extensions/system.display#method-getInfo
*/
@@ -208,7 +208,7 @@ chrome.system.display.getInfo = function(flags, callback) {};
/**
* Requests the layout info for all displays. NOTE: This is only available to
* Chrome OS Kiosk apps and Web UI.
- * @param {function(!Array<!chrome.system.display.DisplayLayout>):void} callback
+ * @param {function(!Array<!chrome.system.display.DisplayLayout>): void} callback
* The callback to invoke with the results.
* @see https://developer.chrome.com/extensions/system.display#method-getDisplayLayout
*/
@@ -222,7 +222,7 @@ chrome.system.display.getDisplayLayout = function(callback) {};
* @param {!chrome.system.display.DisplayProperties} info The information about
* display properties that should be changed. A property will be changed
* only if a new value for it is specified in |info|.
- * @param {function():void=} callback Empty function called when the function
+ * @param {function(): void=} callback Empty function called when the function
* finishes. To find out whether the function succeeded,
* $(ref:runtime.lastError) should be queried.
* @see https://developer.chrome.com/extensions/system.display#method-setDisplayProperties
@@ -237,7 +237,7 @@ chrome.system.display.setDisplayProperties = function(id, info, callback) {};
* and Web UI.
* @param {!Array<!chrome.system.display.DisplayLayout>} layouts The layout
* information, required for all displays except the primary display.
- * @param {function():void=} callback Empty function called when the function
+ * @param {function(): void=} callback Empty function called when the function
* finishes. To find out whether the function succeeded,
* $(ref:runtime.lastError) should be queried.
* @see https://developer.chrome.com/extensions/system.display#method-setDisplayLayout
@@ -297,7 +297,7 @@ chrome.system.display.overscanCalibrationComplete = function(id) {};
* to proceed. The callback will be invoked in case of successful calibration
* only. If the calibration fails, this will throw an error.
* @param {string} id The display's unique identifier.
- * @param {function(boolean):void=} callback Optional callback to inform the
+ * @param {function(boolean): void=} callback Optional callback to inform the
* caller that the touch calibration has ended. The argument of the
* callback informs if the calibration was a success or not.
* @see https://developer.chrome.com/extensions/system.display#method-showNativeTouchCalibration
@@ -344,7 +344,7 @@ chrome.system.display.clearTouchCalibration = function(id) {};
* Kiosk apps and Web UI.
* @param {!chrome.system.display.MirrorModeInfo} info The information of the
* mirror mode that should be applied to the display mode.
- * @param {function():void=} callback Empty function called when the function
+ * @param {function(): void=} callback Empty function called when the function
* finishes. To find out whether the function succeeded,
* $(ref:runtime.lastError) should be queried.
* @see https://developer.chrome.com/extensions/system.display#method-setMirrorMode
diff --git a/chromium/third_party/closure_compiler/externs/system_private.js b/chromium/third_party/closure_compiler/externs/system_private.js
index c84781fc10d..74db7fe11d2 100644
--- a/chromium/third_party/closure_compiler/externs/system_private.js
+++ b/chromium/third_party/closure_compiler/externs/system_private.js
@@ -13,9 +13,7 @@
*/
var UpdateStatus;
-/**
- * @const
- */
+/** @const */
chrome.systemPrivate = {};
/**
diff --git a/chromium/third_party/closure_compiler/externs/tabs.js b/chromium/third_party/closure_compiler/externs/tabs.js
new file mode 100644
index 00000000000..85eb861af0b
--- /dev/null
+++ b/chromium/third_party/closure_compiler/externs/tabs.js
@@ -0,0 +1,564 @@
+// Copyright 2020 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This file was generated by:
+// tools/json_schema_compiler/compiler.py.
+// NOTE: The format of types has changed. 'FooType' is now
+// 'chrome.tabs.FooType'.
+// Please run the closure compiler before committing changes.
+// See https://chromium.googlesource.com/chromium/src/+/master/docs/closure_compilation.md
+
+// IMPORTANT NOTE: Work-around for crbug.com/543822
+// s/chrome.tabs.extensionTypes.ImageDetails/chrome.extensionTypes.ImageDetails/
+// s/chrome.tabs.extensionTypes.InjectDetails/chrome.extensionTypes.InjectDetails/
+// s/chrome.tabs.runtime.Port/chrome.runtime.Port/
+// s/chrome.tabs.windows.Window/chrome.windows.Window/
+
+/** @fileoverview Externs generated from namespace: tabs */
+
+/** @const */
+chrome.tabs = {};
+
+/**
+ * @enum {string}
+ * @see https://developer.chrome.com/extensions/tabs#type-TabStatus
+ */
+chrome.tabs.TabStatus = {
+ UNLOADED: 'unloaded',
+ LOADING: 'loading',
+ COMPLETE: 'complete',
+};
+
+/**
+ * @enum {string}
+ * @see https://developer.chrome.com/extensions/tabs#type-MutedInfoReason
+ */
+chrome.tabs.MutedInfoReason = {
+ USER: 'user',
+ CAPTURE: 'capture',
+ EXTENSION: 'extension',
+};
+
+/**
+ * The tab's muted state and the reason for the last state change.
+ * @typedef {{
+ * muted: boolean,
+ * reason: (!chrome.tabs.MutedInfoReason|undefined),
+ * extensionId: (string|undefined)
+ * }}
+ * @see https://developer.chrome.com/extensions/tabs#type-MutedInfo
+ */
+chrome.tabs.MutedInfo;
+
+/**
+ * @typedef {{
+ * id: (number|undefined),
+ * index: number,
+ * windowId: number,
+ * openerTabId: (number|undefined),
+ * selected: boolean,
+ * highlighted: boolean,
+ * active: boolean,
+ * pinned: boolean,
+ * audible: (boolean|undefined),
+ * discarded: boolean,
+ * autoDiscardable: boolean,
+ * mutedInfo: (!chrome.tabs.MutedInfo|undefined),
+ * url: (string|undefined),
+ * pendingUrl: (string|undefined),
+ * title: (string|undefined),
+ * favIconUrl: (string|undefined),
+ * status: (!chrome.tabs.TabStatus|undefined),
+ * incognito: boolean,
+ * width: (number|undefined),
+ * height: (number|undefined),
+ * sessionId: (string|undefined)
+ * }}
+ * @see https://developer.chrome.com/extensions/tabs#type-Tab
+ */
+chrome.tabs.Tab;
+
+/**
+ * @enum {string}
+ * @see https://developer.chrome.com/extensions/tabs#type-ZoomSettingsMode
+ */
+chrome.tabs.ZoomSettingsMode = {
+ AUTOMATIC: 'automatic',
+ MANUAL: 'manual',
+ DISABLED: 'disabled',
+};
+
+/**
+ * @enum {string}
+ * @see https://developer.chrome.com/extensions/tabs#type-ZoomSettingsScope
+ */
+chrome.tabs.ZoomSettingsScope = {
+ PER_ORIGIN: 'per-origin',
+ PER_TAB: 'per-tab',
+};
+
+/**
+ * Defines how zoom changes in a tab are handled and at what scope.
+ * @typedef {{
+ * mode: (!chrome.tabs.ZoomSettingsMode|undefined),
+ * scope: (!chrome.tabs.ZoomSettingsScope|undefined),
+ * defaultZoomFactor: (number|undefined)
+ * }}
+ * @see https://developer.chrome.com/extensions/tabs#type-ZoomSettings
+ */
+chrome.tabs.ZoomSettings;
+
+/**
+ * @enum {string}
+ * @see https://developer.chrome.com/extensions/tabs#type-WindowType
+ */
+chrome.tabs.WindowType = {
+ NORMAL: 'normal',
+ POPUP: 'popup',
+ PANEL: 'panel',
+ APP: 'app',
+ DEVTOOLS: 'devtools',
+};
+
+/**
+ * An ID that represents the absence of a browser tab.
+ * @type {number}
+ * @see https://developer.chrome.com/extensions/tabs#type-TAB_ID_NONE
+ */
+chrome.tabs.TAB_ID_NONE;
+
+/**
+ * Retrieves details about the specified tab.
+ * @param {number} tabId
+ * @param {function(!chrome.tabs.Tab):void} callback
+ * @see https://developer.chrome.com/extensions/tabs#method-get
+ */
+chrome.tabs.get = function(tabId, callback) {};
+
+/**
+ * Gets the tab that this script call is being made from. May be undefined if
+ * called from a non-tab context (for example, a background page or popup view).
+ * @param {function((!chrome.tabs.Tab|undefined)):void} callback
+ * @see https://developer.chrome.com/extensions/tabs#method-getCurrent
+ */
+chrome.tabs.getCurrent = function(callback) {};
+
+/**
+ * Connects to the content script(s) in the specified tab. The
+ * $(ref:runtime.onConnect) event is fired in each content script running in the
+ * specified tab for the current extension. For more details, see <a
+ * href='messaging'>Content Script Messaging</a>.
+ * @param {number} tabId
+ * @param {{
+ * name: (string|undefined),
+ * frameId: (number|undefined)
+ * }=} connectInfo
+ * @return {!chrome.runtime.Port} A port that can be used to communicate
+ * with the content scripts running in the specified tab. The port's
+ * $(ref:runtime.Port) event is fired if the tab closes or does not exist.
+ * @see https://developer.chrome.com/extensions/tabs#method-connect
+ */
+chrome.tabs.connect = function(tabId, connectInfo) {};
+
+/**
+ * Sends a single request to the content script(s) in the specified tab, with an
+ * optional callback to run when a response is sent back. The
+ * $(ref:extension.onRequest) event is fired in each content script running in
+ * the specified tab for the current extension.
+ * @param {number} tabId
+ * @param {*} request
+ * @param {function(*):void=} responseCallback
+ * @deprecated Please use $(ref:runtime.sendMessage).
+ * @see https://developer.chrome.com/extensions/tabs#method-sendRequest
+ */
+chrome.tabs.sendRequest = function(tabId, request, responseCallback) {};
+
+/**
+ * Sends a single message to the content script(s) in the specified tab, with an
+ * optional callback to run when a response is sent back. The
+ * $(ref:runtime.onMessage) event is fired in each content script running in the
+ * specified tab for the current extension.
+ * @param {number} tabId
+ * @param {*} message The message to send. This message should be a JSON-ifiable
+ * object.
+ * @param {{
+ * frameId: (number|undefined)
+ * }=} options
+ * @param {function(*):void=} responseCallback
+ * @see https://developer.chrome.com/extensions/tabs#method-sendMessage
+ */
+chrome.tabs.sendMessage = function(tabId, message, options, responseCallback) {};
+
+/**
+ * Gets the tab that is selected in the specified window.
+ * @param {?number|undefined} windowId Defaults to the <a
+ * href='windows#current-window'>current window</a>.
+ * @param {function(!chrome.tabs.Tab):void} callback
+ * @deprecated Please use $(ref:tabs.query) <code>{active: true}</code>.
+ * @see https://developer.chrome.com/extensions/tabs#method-getSelected
+ */
+chrome.tabs.getSelected = function(windowId, callback) {};
+
+/**
+ * Gets details about all tabs in the specified window.
+ * @param {?number|undefined} windowId Defaults to the <a
+ * href='windows#current-window'>current window</a>.
+ * @param {function(!Array<!chrome.tabs.Tab>):void} callback
+ * @deprecated Please use $(ref:tabs.query) <code>{windowId: windowId}</code>.
+ * @see https://developer.chrome.com/extensions/tabs#method-getAllInWindow
+ */
+chrome.tabs.getAllInWindow = function(windowId, callback) {};
+
+/**
+ * Creates a new tab.
+ * @param {{
+ * windowId: (number|undefined),
+ * index: (number|undefined),
+ * url: (string|undefined),
+ * active: (boolean|undefined),
+ * selected: (boolean|undefined),
+ * pinned: (boolean|undefined),
+ * openerTabId: (number|undefined)
+ * }} createProperties
+ * @param {function(!chrome.tabs.Tab):void=} callback
+ * @see https://developer.chrome.com/extensions/tabs#method-create
+ */
+chrome.tabs.create = function(createProperties, callback) {};
+
+/**
+ * Duplicates a tab.
+ * @param {number} tabId The ID of the tab to duplicate.
+ * @param {function((!chrome.tabs.Tab|undefined)):void=} callback
+ * @see https://developer.chrome.com/extensions/tabs#method-duplicate
+ */
+chrome.tabs.duplicate = function(tabId, callback) {};
+
+/**
+ * Gets all tabs that have the specified properties, or all tabs if no
+ * properties are specified.
+ * @param {{
+ * active: (boolean|undefined),
+ * pinned: (boolean|undefined),
+ * audible: (boolean|undefined),
+ * muted: (boolean|undefined),
+ * highlighted: (boolean|undefined),
+ * discarded: (boolean|undefined),
+ * autoDiscardable: (boolean|undefined),
+ * currentWindow: (boolean|undefined),
+ * lastFocusedWindow: (boolean|undefined),
+ * status: (!chrome.tabs.TabStatus|undefined),
+ * title: (string|undefined),
+ * url: ((string|!Array<string>)|undefined),
+ * windowId: (number|undefined),
+ * windowType: (!chrome.tabs.WindowType|undefined),
+ * index: (number|undefined)
+ * }} queryInfo
+ * @param {function(!Array<!chrome.tabs.Tab>):void} callback
+ * @see https://developer.chrome.com/extensions/tabs#method-query
+ */
+chrome.tabs.query = function(queryInfo, callback) {};
+
+/**
+ * Highlights the given tabs and focuses on the first of group. Will appear to
+ * do nothing if the specified tab is currently active.
+ * @param {{
+ * windowId: (number|undefined),
+ * tabs: (!Array<number>|number)
+ * }} highlightInfo
+ * @param {function(!chrome.windows.Window):void=} callback
+ * @see https://developer.chrome.com/extensions/tabs#method-highlight
+ */
+chrome.tabs.highlight = function(highlightInfo, callback) {};
+
+/**
+ * Modifies the properties of a tab. Properties that are not specified in
+ * <var>updateProperties</var> are not modified.
+ * @param {?number|undefined} tabId Defaults to the selected tab of the <a
+ * href='windows#current-window'>current window</a>.
+ * @param {{
+ * url: (string|undefined),
+ * active: (boolean|undefined),
+ * highlighted: (boolean|undefined),
+ * selected: (boolean|undefined),
+ * pinned: (boolean|undefined),
+ * muted: (boolean|undefined),
+ * openerTabId: (number|undefined),
+ * autoDiscardable: (boolean|undefined)
+ * }} updateProperties
+ * @param {function((!chrome.tabs.Tab|undefined)):void=} callback
+ * @see https://developer.chrome.com/extensions/tabs#method-update
+ */
+chrome.tabs.update = function(tabId, updateProperties, callback) {};
+
+/**
+ * Moves one or more tabs to a new position within its window, or to a new
+ * window. Note that tabs can only be moved to and from normal (window.type ===
+ * "normal") windows.
+ * @param {(number|!Array<number>)} tabIds The tab ID or list of tab IDs to
+ * move.
+ * @param {{
+ * windowId: (number|undefined),
+ * index: number
+ * }} moveProperties
+ * @param {function((!chrome.tabs.Tab|!Array<!chrome.tabs.Tab>)):void=} callback
+ * @see https://developer.chrome.com/extensions/tabs#method-move
+ */
+chrome.tabs.move = function(tabIds, moveProperties, callback) {};
+
+/**
+ * Reload a tab.
+ * @param {number=} tabId The ID of the tab to reload; defaults to the selected
+ * tab of the current window.
+ * @param {{
+ * bypassCache: (boolean|undefined)
+ * }=} reloadProperties
+ * @param {function():void=} callback
+ * @see https://developer.chrome.com/extensions/tabs#method-reload
+ */
+chrome.tabs.reload = function(tabId, reloadProperties, callback) {};
+
+/**
+ * Closes one or more tabs.
+ * @param {(number|!Array<number>)} tabIds The tab ID or list of tab IDs to
+ * close.
+ * @param {function():void=} callback
+ * @see https://developer.chrome.com/extensions/tabs#method-remove
+ */
+chrome.tabs.remove = function(tabIds, callback) {};
+
+/**
+ * Detects the primary language of the content in a tab.
+ * @param {?number|undefined} tabId Defaults to the active tab of the <a
+ * href='windows#current-window'>current window</a>.
+ * @param {function(string):void} callback
+ * @see https://developer.chrome.com/extensions/tabs#method-detectLanguage
+ */
+chrome.tabs.detectLanguage = function(tabId, callback) {};
+
+/**
+ * Captures the visible area of the currently active tab in the specified
+ * window. In order to call this method, the extension must have either the <a
+ * href='declare_permissions'>&lt;all_urls&gt;</a> permission or the <a
+ * href='activeTab'>activeTab</a> permission. In addition to sites that
+ * extensions can normally access, this method allows extensions to capture
+ * sensitive sites that are otherwise restricted, including chrome:-scheme
+ * pages, other extensions' pages, and data: URLs. These sensitive sites can
+ * only be captured with the activeTab permission. File URLs may be captured
+ * only if the extension has been granted file access.
+ * @param {?number|undefined} windowId The target window. Defaults to the <a
+ * href='windows#current-window'>current window</a>.
+ * @param {?chrome.extensionTypes.ImageDetails|undefined} options
+ * @param {function(string):void} callback
+ * @see https://developer.chrome.com/extensions/tabs#method-captureVisibleTab
+ */
+chrome.tabs.captureVisibleTab = function(windowId, options, callback) {};
+
+/**
+ * Injects JavaScript code into a page. For details, see the <a
+ * href='content_scripts#pi'>programmatic injection</a> section of the content
+ * scripts doc.
+ * @param {?number|undefined} tabId The ID of the tab in which to run the
+ * script; defaults to the active tab of the current window.
+ * @param {!chrome.extensionTypes.InjectDetails} details Details of the
+ * script to run. Either the code or the file property must be set, but both
+ * may not be set at the same time.
+ * @param {function((!Array<*>|undefined)):void=} callback Called after all the
+ * JavaScript has been executed.
+ * @see https://developer.chrome.com/extensions/tabs#method-executeScript
+ */
+chrome.tabs.executeScript = function(tabId, details, callback) {};
+
+/**
+ * Injects CSS into a page. For details, see the <a
+ * href='content_scripts#pi'>programmatic injection</a> section of the content
+ * scripts doc.
+ * @param {?number|undefined} tabId The ID of the tab in which to insert the
+ * CSS; defaults to the active tab of the current window.
+ * @param {!chrome.extensionTypes.InjectDetails} details Details of the CSS
+ * text to insert. Either the code or the file property must be set, but
+ * both may not be set at the same time.
+ * @param {function():void=} callback Called when all the CSS has been inserted.
+ * @see https://developer.chrome.com/extensions/tabs#method-insertCSS
+ */
+chrome.tabs.insertCSS = function(tabId, details, callback) {};
+
+/**
+ * Zooms a specified tab.
+ * @param {?number|undefined} tabId The ID of the tab to zoom; defaults to the
+ * active tab of the current window.
+ * @param {number} zoomFactor The new zoom factor. A value of <code>0</code>
+ * sets the tab to its current default zoom factor. Values greater than
+ * <code>0</code> specify a (possibly non-default) zoom factor for the tab.
+ * @param {function():void=} callback Called after the zoom factor has been
+ * changed.
+ * @see https://developer.chrome.com/extensions/tabs#method-setZoom
+ */
+chrome.tabs.setZoom = function(tabId, zoomFactor, callback) {};
+
+/**
+ * Gets the current zoom factor of a specified tab.
+ * @param {?number|undefined} tabId The ID of the tab to get the current zoom
+ * factor from; defaults to the active tab of the current window.
+ * @param {function(number):void} callback Called with the tab's current zoom
+ * factor after it has been fetched.
+ * @see https://developer.chrome.com/extensions/tabs#method-getZoom
+ */
+chrome.tabs.getZoom = function(tabId, callback) {};
+
+/**
+ * Sets the zoom settings for a specified tab, which define how zoom changes are
+ * handled. These settings are reset to defaults upon navigating the tab.
+ * @param {?number|undefined} tabId The ID of the tab to change the zoom
+ * settings for; defaults to the active tab of the current window.
+ * @param {!chrome.tabs.ZoomSettings} zoomSettings Defines how zoom changes are
+ * handled and at what scope.
+ * @param {function():void=} callback Called after the zoom settings are
+ * changed.
+ * @see https://developer.chrome.com/extensions/tabs#method-setZoomSettings
+ */
+chrome.tabs.setZoomSettings = function(tabId, zoomSettings, callback) {};
+
+/**
+ * Gets the current zoom settings of a specified tab.
+ * @param {?number|undefined} tabId The ID of the tab to get the current zoom
+ * settings from; defaults to the active tab of the current window.
+ * @param {function(!chrome.tabs.ZoomSettings):void} callback Called with the
+ * tab's current zoom settings.
+ * @see https://developer.chrome.com/extensions/tabs#method-getZoomSettings
+ */
+chrome.tabs.getZoomSettings = function(tabId, callback) {};
+
+/**
+ * Discards a tab from memory. Discarded tabs are still visible on the tab strip
+ * and are reloaded when activated.
+ * @param {number=} tabId The ID of the tab to be discarded. If specified, the
+ * tab is discarded unless it is active or already discarded. If omitted,
+ * the browser discards the least important tab. This can fail if no
+ * discardable tabs exist.
+ * @param {function((!chrome.tabs.Tab|undefined)):void=} callback Called after
+ * the operation is completed.
+ * @see https://developer.chrome.com/extensions/tabs#method-discard
+ */
+chrome.tabs.discard = function(tabId, callback) {};
+
+/**
+ * Go foward to the next page, if one is available.
+ * @param {number=} tabId The ID of the tab to navigate forward; defaults to the
+ * selected tab of the current window.
+ * @param {function():void=} callback
+ * @see https://developer.chrome.com/extensions/tabs#method-goForward
+ */
+chrome.tabs.goForward = function(tabId, callback) {};
+
+/**
+ * Go back to the previous page, if one is available.
+ * @param {number=} tabId The ID of the tab to navigate back; defaults to the
+ * selected tab of the current window.
+ * @param {function():void=} callback
+ * @see https://developer.chrome.com/extensions/tabs#method-goBack
+ */
+chrome.tabs.goBack = function(tabId, callback) {};
+
+/**
+ * Fired when a tab is created. Note that the tab's URL may not be set at the
+ * time this event is fired, but you can listen to onUpdated events so as to be
+ * notified when a URL is set.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/tabs#event-onCreated
+ */
+chrome.tabs.onCreated;
+
+/**
+ * Fired when a tab is updated.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/tabs#event-onUpdated
+ */
+chrome.tabs.onUpdated;
+
+/**
+ * Fired when a tab is moved within a window. Only one move event is fired,
+ * representing the tab the user directly moved. Move events are not fired for
+ * the other tabs that must move in response to the manually-moved tab. This
+ * event is not fired when a tab is moved between windows; for details, see
+ * $(ref:tabs.onDetached).
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/tabs#event-onMoved
+ */
+chrome.tabs.onMoved;
+
+/**
+ * Fires when the selected tab in a window changes.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/tabs#event-onSelectionChanged
+ */
+chrome.tabs.onSelectionChanged;
+
+/**
+ * Fires when the selected tab in a window changes. Note that the tab's URL may
+ * not be set at the time this event fired, but you can listen to
+ * $(ref:tabs.onUpdated) events so as to be notified when a URL is set.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/tabs#event-onActiveChanged
+ */
+chrome.tabs.onActiveChanged;
+
+/**
+ * Fires when the active tab in a window changes. Note that the tab's URL may
+ * not be set at the time this event fired, but you can listen to onUpdated
+ * events so as to be notified when a URL is set.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/tabs#event-onActivated
+ */
+chrome.tabs.onActivated;
+
+/**
+ * Fired when the highlighted or selected tabs in a window changes.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/tabs#event-onHighlightChanged
+ */
+chrome.tabs.onHighlightChanged;
+
+/**
+ * Fired when the highlighted or selected tabs in a window changes.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/tabs#event-onHighlighted
+ */
+chrome.tabs.onHighlighted;
+
+/**
+ * Fired when a tab is detached from a window; for example, because it was moved
+ * between windows.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/tabs#event-onDetached
+ */
+chrome.tabs.onDetached;
+
+/**
+ * Fired when a tab is attached to a window; for example, because it was moved
+ * between windows.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/tabs#event-onAttached
+ */
+chrome.tabs.onAttached;
+
+/**
+ * Fired when a tab is closed.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/tabs#event-onRemoved
+ */
+chrome.tabs.onRemoved;
+
+/**
+ * Fired when a tab is replaced with another tab due to prerendering or instant.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/tabs#event-onReplaced
+ */
+chrome.tabs.onReplaced;
+
+/**
+ * Fired when a tab is zoomed.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/tabs#event-onZoomChange
+ */
+chrome.tabs.onZoomChange;
diff --git a/chromium/third_party/closure_compiler/externs/terminal_private.js b/chromium/third_party/closure_compiler/externs/terminal_private.js
new file mode 100644
index 00000000000..b88422c178b
--- /dev/null
+++ b/chromium/third_party/closure_compiler/externs/terminal_private.js
@@ -0,0 +1,155 @@
+// Copyright 2020 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This file was generated by:
+// tools/json_schema_compiler/compiler.py.
+// NOTE: The format of types has changed. 'FooType' is now
+// 'chrome.terminalPrivate.FooType'.
+// Please run the closure compiler before committing changes.
+// See https://chromium.googlesource.com/chromium/src/+/master/docs/closure_compilation.md
+
+/** @fileoverview Externs generated from namespace: terminalPrivate */
+
+/** @const */
+chrome.terminalPrivate = {};
+
+/**
+ * @enum {string}
+ */
+chrome.terminalPrivate.OutputType = {
+ STDOUT: 'stdout',
+ STDERR: 'stderr',
+ EXIT: 'exit',
+};
+
+/**
+ * Starts new process.
+ * @param {string} processName Name of the process to open. May be 'crosh' or
+ * 'vmshell'.
+ * @param {?Array<string>|undefined} args Command line arguments to pass to the
+ * process.
+ * @param {function(string): void} callback Returns id of the launched process.
+ * If no process was launched returns -1.
+ */
+chrome.terminalPrivate.openTerminalProcess = function(processName, args, callback) {};
+
+/**
+ * Starts new vmshell process.
+ * @param {?Array<string>|undefined} args Command line arguments to pass to
+ * vmshell.
+ * @param {function(string): void} callback Returns id of the launched vmshell
+ * process. If no process was launched returns -1.
+ */
+chrome.terminalPrivate.openVmshellProcess = function(args, callback) {};
+
+/**
+ * Closes previously opened process from either openTerminalProcess or
+ * openVmshellProcess.
+ * @param {string} id Unique id of the process we want to close.
+ * @param {function(boolean): void=} callback Function that gets called when
+ * close operation is started for the process. Returns success of the
+ * function.
+ */
+chrome.terminalPrivate.closeTerminalProcess = function(id, callback) {};
+
+/**
+ * Sends input that will be routed to stdin of the process with the specified
+ * id.
+ * @param {string} id The id of the process to which we want to send input.
+ * @param {string} input Input we are sending to the process.
+ * @param {function(boolean): void=} callback Callback that will be called when
+ * sendInput method ends. Returns success.
+ */
+chrome.terminalPrivate.sendInput = function(id, input, callback) {};
+
+/**
+ * Notify the process with the id id that terminal window size has changed.
+ * @param {string} id The id of the process.
+ * @param {number} width New window width (as column count).
+ * @param {number} height New window height (as row count).
+ * @param {function(boolean): void=} callback Callback that will be called when
+ * sendInput method ends. Returns success.
+ */
+chrome.terminalPrivate.onTerminalResize = function(id, width, height, callback) {};
+
+/**
+ * Called from |onProcessOutput| when the event is dispatched to terminal
+ * extension. Observing the terminal process output will be paused after
+ * |onProcessOutput| is dispatched until this method is called.
+ * @param {number} tabId Tab ID from |onProcessOutput| event.
+ * @param {string} id The id of the process to which |onProcessOutput| was
+ * dispatched.
+ */
+chrome.terminalPrivate.ackOutput = function(tabId, id) {};
+
+/**
+ * Open the Terminal tabbed window.
+ * @param {function(): void} callback Callback that will be called when
+ * complete.
+ */
+chrome.terminalPrivate.openWindow = function(callback) {};
+
+/**
+ * Open the Terminal Settings page.
+ * @param {function(): void} callback Callback that will be called when
+ * complete.
+ */
+chrome.terminalPrivate.openOptionsPage = function(callback) {};
+
+/**
+ * Returns an object (DictionaryValue) containing UI settings such as font style
+ * and color used by the crosh extension. This function is called by the
+ * terminal system app the first time it is run to migrate any previous
+ * settings.
+ * @param {function(Object): void} callback Callback that will be called with
+ * settings.
+ */
+chrome.terminalPrivate.getCroshSettings = function(callback) {};
+
+/**
+ * Returns an object (DictionaryValue) containing UI settings such as font style
+ * and colors used by terminal and stored as a syncable pref. The UI currently
+ * has ~70 properties and we wish to allow flexibility for these to change in
+ * the UI without updating this API, so we allow any properties.
+ * @param {function(Object): void} callback Callback that will be called with
+ * settings.
+ */
+chrome.terminalPrivate.getSettings = function(callback) {};
+
+/**
+ * Sets terminal UI settings which are stored as a syncable pref.
+ * @param {Object} settings Settings to update into prefs.
+ * @param {function(): void} callback Callback that will be called when
+ * complete.
+ */
+chrome.terminalPrivate.setSettings = function(settings, callback) {};
+
+/**
+ * Returns a boolean indicating whether the accessibility spoken feedback is on.
+ * @param {function(boolean): void} callback Callback that will be called with
+ * the a11y status.
+ */
+chrome.terminalPrivate.getA11yStatus = function(callback) {};
+
+/**
+ * Fired when an opened process writes something to its output. Observing
+ * further process output will be blocked until |ackOutput| for the terminal is
+ * called. Internally, first event argument will be ID of the tab that contains
+ * terminal instance for which this event is intended. This argument will be
+ * stripped before passing the event to the extension.
+ * @type {!ChromeEvent}
+ */
+chrome.terminalPrivate.onProcessOutput;
+
+/**
+ * Fired when terminal UI settings change.
+ * @type {!ChromeEvent}
+ */
+chrome.terminalPrivate.onSettingsChanged;
+
+/**
+ * Fired when a11y spoken feedback is enabled/disabled.
+ * @type {!ChromeEvent}
+ */
+chrome.terminalPrivate.onA11yStatusChanged;
diff --git a/chromium/third_party/closure_compiler/externs/test.js b/chromium/third_party/closure_compiler/externs/test.js
new file mode 100644
index 00000000000..a67d23d291e
--- /dev/null
+++ b/chromium/third_party/closure_compiler/externs/test.js
@@ -0,0 +1,252 @@
+// Copyright 2020 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This file was generated by:
+// tools/json_schema_compiler/compiler.py.
+// NOTE: The format of types has changed. 'FooType' is now
+// 'chrome.test.FooType'.
+// Please run the closure compiler before committing changes.
+// See https://chromium.googlesource.com/chromium/src/+/master/docs/closure_compilation.md
+
+/** @fileoverview Externs generated from namespace: test */
+
+/** @const */
+chrome.test = {};
+
+/**
+ * Gives configuration options set by the test.
+ * @param {function({
+ * customArg: (string|undefined),
+ * ftpServer: ({
+ * port: number
+ * }|undefined),
+ * testServer: ({
+ * port: number
+ * }|undefined),
+ * testDataDirectory: (string|undefined),
+ * testWebSocketPort: (number|undefined),
+ * loginStatus: ({
+ * isLoggedIn: (boolean|undefined),
+ * isScreenLocked: (boolean|undefined)
+ * }|undefined)
+ * }): void} callback
+ * @see https://developer.chrome.com/extensions/test#method-getConfig
+ */
+chrome.test.getConfig = function(callback) {};
+
+/**
+ * Notifies the browser process that test code running in the extension failed.
+ * This is only used for internal unit testing.
+ * @param {string} message
+ * @see https://developer.chrome.com/extensions/test#method-notifyFail
+ */
+chrome.test.notifyFail = function(message) {};
+
+/**
+ * Notifies the browser process that test code running in the extension passed.
+ * This is only used for internal unit testing.
+ * @param {string=} message
+ * @see https://developer.chrome.com/extensions/test#method-notifyPass
+ */
+chrome.test.notifyPass = function(message) {};
+
+/**
+ * Logs a message during internal unit testing.
+ * @param {string} message
+ * @see https://developer.chrome.com/extensions/test#method-log
+ */
+chrome.test.log = function(message) {};
+
+/**
+ * Sends a string message to the browser process, generating a Notification that
+ * C++ test code can wait for.
+ * @param {string} message
+ * @param {function(string): void=} callback
+ * @see https://developer.chrome.com/extensions/test#method-sendMessage
+ */
+chrome.test.sendMessage = function(message, callback) {};
+
+/**
+ * @see https://developer.chrome.com/extensions/test#method-callbackAdded
+ */
+chrome.test.callbackAdded = function() {};
+
+/**
+ * @see https://developer.chrome.com/extensions/test#method-runNextTest
+ */
+chrome.test.runNextTest = function() {};
+
+/**
+ * @param {*=} message
+ * @see https://developer.chrome.com/extensions/test#method-fail
+ */
+chrome.test.fail = function(message) {};
+
+/**
+ * @param {*=} message
+ * @see https://developer.chrome.com/extensions/test#method-succeed
+ */
+chrome.test.succeed = function(message) {};
+
+/**
+ * Returns an instance of the module system for the given context.
+ * @param {*} context
+ * @return {*} The module system
+ * @see https://developer.chrome.com/extensions/test#method-getModuleSystem
+ */
+chrome.test.getModuleSystem = function(context) {};
+
+/**
+ * @param {(string|boolean)} test
+ * @param {string=} message
+ * @see https://developer.chrome.com/extensions/test#method-assertTrue
+ */
+chrome.test.assertTrue = function(test, message) {};
+
+/**
+ * @param {(string|boolean)} test
+ * @param {string=} message
+ * @see https://developer.chrome.com/extensions/test#method-assertFalse
+ */
+chrome.test.assertFalse = function(test, message) {};
+
+/**
+ * @param {(string|boolean)} test
+ * @param {boolean} expected
+ * @param {string=} message
+ * @see https://developer.chrome.com/extensions/test#method-assertBool
+ */
+chrome.test.assertBool = function(test, expected, message) {};
+
+/**
+ * @param {*=} expected
+ * @param {*=} actual
+ * @see https://developer.chrome.com/extensions/test#method-checkDeepEq
+ */
+chrome.test.checkDeepEq = function(expected, actual) {};
+
+/**
+ * @param {*=} expected
+ * @param {*=} actual
+ * @param {string=} message
+ * @see https://developer.chrome.com/extensions/test#method-assertEq
+ */
+chrome.test.assertEq = function(expected, actual, message) {};
+
+/**
+ * @see https://developer.chrome.com/extensions/test#method-assertNoLastError
+ */
+chrome.test.assertNoLastError = function() {};
+
+/**
+ * @param {string} expectedError
+ * @see https://developer.chrome.com/extensions/test#method-assertLastError
+ */
+chrome.test.assertLastError = function(expectedError) {};
+
+/**
+ * @param {function(): void} fn
+ * @param {?Object|undefined} self
+ * @param {!Array<*>} args
+ * @param {(string|RegExp)=} message
+ * @see https://developer.chrome.com/extensions/test#method-assertThrows
+ */
+chrome.test.assertThrows = function(fn, self, args, message) {};
+
+/**
+ * @param {function(): void=} func
+ * @param {string=} expectedError
+ * @see https://developer.chrome.com/extensions/test#method-callback
+ */
+chrome.test.callback = function(func, expectedError) {};
+
+/**
+ * @param {*} event
+ * @param {function(): void} func
+ * @see https://developer.chrome.com/extensions/test#method-listenOnce
+ */
+chrome.test.listenOnce = function(event, func) {};
+
+/**
+ * @param {*} event
+ * @param {function(): void} func
+ * @see https://developer.chrome.com/extensions/test#method-listenForever
+ */
+chrome.test.listenForever = function(event, func) {};
+
+/**
+ * @param {function(): void=} func
+ * @see https://developer.chrome.com/extensions/test#method-callbackPass
+ */
+chrome.test.callbackPass = function(func) {};
+
+/**
+ * @param {string} expectedError
+ * @param {function(): void=} func
+ * @see https://developer.chrome.com/extensions/test#method-callbackFail
+ */
+chrome.test.callbackFail = function(expectedError, func) {};
+
+/**
+ * @param {!Array<function(): void>} tests
+ * @see https://developer.chrome.com/extensions/test#method-runTests
+ */
+chrome.test.runTests = function(tests) {};
+
+/**
+ * @see https://developer.chrome.com/extensions/test#method-getApiFeatures
+ */
+chrome.test.getApiFeatures = function() {};
+
+/**
+ * @param {!Array<string>=} apiNames
+ * @see https://developer.chrome.com/extensions/test#method-getApiDefinitions
+ */
+chrome.test.getApiDefinitions = function(apiNames) {};
+
+/**
+ * @see https://developer.chrome.com/extensions/test#method-isProcessingUserGesture
+ */
+chrome.test.isProcessingUserGesture = function() {};
+
+/**
+ * Runs the callback in the context of a user gesture.
+ * @param {function(): void} callback
+ * @see https://developer.chrome.com/extensions/test#method-runWithUserGesture
+ */
+chrome.test.runWithUserGesture = function(callback) {};
+
+/**
+ * Sends a string message one round trip from the renderer to the browser
+ * process and back.
+ * @param {string} message
+ * @param {function(string): void} callback
+ * @see https://developer.chrome.com/extensions/test#method-waitForRoundTrip
+ */
+chrome.test.waitForRoundTrip = function(message, callback) {};
+
+/**
+ * Sets the function to be called when an exception occurs. By default this is a
+ * function which fails the test. This is reset for every test run through
+ * $ref:test.runTests.
+ * @param {function(string, *): void} callback
+ * @see https://developer.chrome.com/extensions/test#method-setExceptionHandler
+ */
+chrome.test.setExceptionHandler = function(callback) {};
+
+/**
+ * Returns the wake-event-page API function, which can be called to wake up the
+ * extension's event page.
+ * @return {function(): void} The API function which wakes the extension's event
+ * page
+ * @see https://developer.chrome.com/extensions/test#method-getWakeEventPage
+ */
+chrome.test.getWakeEventPage = function() {};
+
+/**
+ * Used to test sending messages to extensions.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/test#event-onMessage
+ */
+chrome.test.onMessage;
diff --git a/chromium/third_party/closure_compiler/externs/users_private.js b/chromium/third_party/closure_compiler/externs/users_private.js
index 5f33819d883..7298b022147 100644
--- a/chromium/third_party/closure_compiler/externs/users_private.js
+++ b/chromium/third_party/closure_compiler/externs/users_private.js
@@ -11,9 +11,7 @@
/** @fileoverview Externs generated from namespace: usersPrivate */
-/**
- * @const
- */
+/** @const */
chrome.usersPrivate = {};
/**
@@ -38,14 +36,14 @@ chrome.usersPrivate.LoginStatusDict;
/**
* Gets a list of the currently whitelisted users.
- * @param {function(!Array<!chrome.usersPrivate.User>):void} callback
+ * @param {function(!Array<!chrome.usersPrivate.User>): void} callback
*/
chrome.usersPrivate.getWhitelistedUsers = function(callback) {};
/**
* Checks to see if the user is already present as a whitelisted user.
* @param {string} email
- * @param {function(boolean):void} callback
+ * @param {function(boolean): void} callback
*/
chrome.usersPrivate.isWhitelistedUser = function(email, callback) {};
@@ -54,7 +52,7 @@ chrome.usersPrivate.isWhitelistedUser = function(email, callback) {};
* with true if the user was added succesfully, or with false if not (e.g.
* because the user was already present, or the current user isn't the owner).
* @param {string} email
- * @param {function(boolean):void} callback
+ * @param {function(boolean): void} callback
*/
chrome.usersPrivate.addWhitelistedUser = function(email, callback) {};
@@ -64,24 +62,24 @@ chrome.usersPrivate.addWhitelistedUser = function(email, callback) {};
* (e.g. because the user was not already present, or the current user isn't the
* owner).
* @param {string} email
- * @param {function(boolean):void} callback
+ * @param {function(boolean): void} callback
*/
chrome.usersPrivate.removeWhitelistedUser = function(email, callback) {};
/**
* Whether the whitelist is managed by enterprise.
- * @param {function(boolean):void} callback
+ * @param {function(boolean): void} callback
*/
chrome.usersPrivate.isWhitelistManaged = function(callback) {};
/**
* Returns the current user.
- * @param {function(!chrome.usersPrivate.User):void} callback
+ * @param {function(!chrome.usersPrivate.User): void} callback
*/
chrome.usersPrivate.getCurrentUser = function(callback) {};
/**
* Get login status.
- * @param {function(!chrome.usersPrivate.LoginStatusDict):void} callback
+ * @param {function(!chrome.usersPrivate.LoginStatusDict): void} callback
*/
chrome.usersPrivate.getLoginStatus = function(callback) {};
diff --git a/chromium/third_party/closure_compiler/externs/virtual_keyboard_private.js b/chromium/third_party/closure_compiler/externs/virtual_keyboard_private.js
new file mode 100644
index 00000000000..112ca97574a
--- /dev/null
+++ b/chromium/third_party/closure_compiler/externs/virtual_keyboard_private.js
@@ -0,0 +1,209 @@
+// Copyright 2020 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This file was generated by:
+// tools/json_schema_compiler/compiler.py.
+// NOTE: The format of types has changed. 'FooType' is now
+// 'chrome.virtualKeyboardPrivate.FooType'.
+// Please run the closure compiler before committing changes.
+// See https://chromium.googlesource.com/chromium/src/+/master/docs/closure_compilation.md
+
+/** @fileoverview Externs generated from namespace: virtualKeyboardPrivate */
+
+/** @const */
+chrome.virtualKeyboardPrivate = {};
+
+/**
+ * @enum {string}
+ */
+chrome.virtualKeyboardPrivate.VirtualKeyboardEventType = {
+ KEYUP: 'keyup',
+ KEYDOWN: 'keydown',
+};
+
+/**
+ * @typedef {{
+ * type: !chrome.virtualKeyboardPrivate.VirtualKeyboardEventType,
+ * charValue: number,
+ * keyCode: number,
+ * keyName: string,
+ * modifiers: (number|undefined)
+ * }}
+ */
+chrome.virtualKeyboardPrivate.VirtualKeyboardEvent;
+
+/**
+ * @enum {string}
+ */
+chrome.virtualKeyboardPrivate.KeyboardMode = {
+ FULL_WIDTH: 'FULL_WIDTH',
+ FLOATING: 'FLOATING',
+};
+
+/**
+ * @enum {string}
+ */
+chrome.virtualKeyboardPrivate.KeyboardState = {
+ ENABLED: 'ENABLED',
+ DISABLED: 'DISABLED',
+ AUTO: 'AUTO',
+};
+
+/**
+ * @typedef {{
+ * left: number,
+ * top: number,
+ * width: number,
+ * height: number
+ * }}
+ */
+chrome.virtualKeyboardPrivate.Bounds;
+
+/**
+ * @typedef {{
+ * layout: string,
+ * hotrodmode: boolean,
+ * a11ymode: boolean,
+ * features: !Array<string>
+ * }}
+ */
+chrome.virtualKeyboardPrivate.KeyboardConfig;
+
+/**
+ * @typedef {{
+ * mode: !chrome.virtualKeyboardPrivate.KeyboardMode,
+ * bounds: !chrome.virtualKeyboardPrivate.Bounds
+ * }}
+ */
+chrome.virtualKeyboardPrivate.ContainerBehaviorOptions;
+
+/**
+ * Inserts text into the currently focused text field.
+ * @param {string} text The text that will be inserted.
+ * @param {function(): void=} callback Called when the insertion is completed.
+ */
+chrome.virtualKeyboardPrivate.insertText = function(text, callback) {};
+
+/**
+ * Sends a fabricated key event to the focused input field.
+ * @param {!chrome.virtualKeyboardPrivate.VirtualKeyboardEvent} keyEvent
+ * @param {function(): void=} callback Called after processing the event.
+ */
+chrome.virtualKeyboardPrivate.sendKeyEvent = function(keyEvent, callback) {};
+
+/**
+ * Hides the virtual keyboard.
+ * @param {function(): void=} callback Called when the keyboard is hidden.
+ */
+chrome.virtualKeyboardPrivate.hideKeyboard = function(callback) {};
+
+/**
+ * Sets the state of the hotrod virtual keyboard. This API should only be used
+ * by hotrod.
+ * @param {boolean} enable
+ */
+chrome.virtualKeyboardPrivate.setHotrodKeyboard = function(enable) {};
+
+/**
+ * Sets the lock state of the virtual keyboard. A locked keyboard remains
+ * visible even after a text area loses input focus.
+ * @param {boolean} lock
+ */
+chrome.virtualKeyboardPrivate.lockKeyboard = function(lock) {};
+
+/**
+ * Inform the system that the keyboard has loaded.
+ * @param {function(): void=} callback Called when load acknowledgement is
+ * complete.
+ */
+chrome.virtualKeyboardPrivate.keyboardLoaded = function(callback) {};
+
+/**
+ * Gets the virtual keyboard configuration.
+ * @param {function(!chrome.virtualKeyboardPrivate.KeyboardConfig): void}
+ * callback Called when querying virtual keyboard configuration is complete.
+ */
+chrome.virtualKeyboardPrivate.getKeyboardConfig = function(callback) {};
+
+/**
+ * Opens chrome://settings/languages page.
+ */
+chrome.virtualKeyboardPrivate.openSettings = function() {};
+
+/**
+ * Sets the virtual keyboard container behavior
+ * @param {!chrome.virtualKeyboardPrivate.ContainerBehaviorOptions} options
+ * Optional parameters for new container behavior.
+ * @param {function(boolean): void=} callback Called when container mode is
+ * ready to change, or if the operation failed.
+ */
+chrome.virtualKeyboardPrivate.setContainerBehavior = function(options, callback) {};
+
+/**
+ * Sets the virtual keyboard draggable area bounds.
+ * @param {!chrome.virtualKeyboardPrivate.Bounds} bounds The value of draggable
+ * rect area of floating keyboard.
+ */
+chrome.virtualKeyboardPrivate.setDraggableArea = function(bounds) {};
+
+/**
+ * Requests the virtual keyboard to change state.
+ * @param {!chrome.virtualKeyboardPrivate.KeyboardState} state The value of the
+ * virtual keyboard state to change to.
+ */
+chrome.virtualKeyboardPrivate.setKeyboardState = function(state) {};
+
+/**
+ * Sets the areas on the screen that are blocked by the virtual keyboard.
+ * @param {!Array<!chrome.virtualKeyboardPrivate.Bounds>} boundsList List of
+ * rectangles representing regions occluded by the keyboard.
+ */
+chrome.virtualKeyboardPrivate.setOccludedBounds = function(boundsList) {};
+
+/**
+ * Sets the areas on the keyboard window where events are handled. Any event
+ * outside of these areas are passed on to the window behind it.
+ * @param {!Array<!chrome.virtualKeyboardPrivate.Bounds>} boundsList List of
+ * rectangles representing regions where events targeting the keyboard
+ * should be handled.
+ */
+chrome.virtualKeyboardPrivate.setHitTestBounds = function(boundsList) {};
+
+/**
+ * Sets the area of the keyboard window that should not move off screen. Any
+ * area outside of this can be moved off the user's screen.
+ * @param {!chrome.virtualKeyboardPrivate.Bounds} bounds The bounds of the area
+ * inside the keyboard window, relative to the window origin, that should
+ * not be moved off screen. Any area outside of this bounds can be moved off
+ * screen.
+ */
+chrome.virtualKeyboardPrivate.setAreaToRemainOnScreen = function(bounds) {};
+
+/**
+ * Sets the bounds of the keyboard window in screen coordinates.
+ * @param {!chrome.virtualKeyboardPrivate.Bounds} bounds A rectangle defining
+ * the new bounds of the window in screen coordinates.
+ */
+chrome.virtualKeyboardPrivate.setWindowBoundsInScreen = function(bounds) {};
+
+/**
+ * This event is sent when virtual keyboard bounds changed and overscroll/resize
+ * is enabled.
+ * @type {!ChromeEvent}
+ */
+chrome.virtualKeyboardPrivate.onBoundsChanged;
+
+/**
+ * Fired when the virtual keyboard window has been closed. For example, this can
+ * happen when turning off on-screen keyboard or exiting tablet mode.
+ * @type {!ChromeEvent}
+ */
+chrome.virtualKeyboardPrivate.onKeyboardClosed;
+
+/**
+ * Fired when a configuration for virtual keyboard IME has changed, e.g. auto
+ * complete disabled.
+ * @type {!ChromeEvent}
+ */
+chrome.virtualKeyboardPrivate.onKeyboardConfigChanged;
diff --git a/chromium/third_party/closure_compiler/externs/webview_tag.js b/chromium/third_party/closure_compiler/externs/webview_tag.js
index 184e921d907..30acbc66518 100644
--- a/chromium/third_party/closure_compiler/externs/webview_tag.js
+++ b/chromium/third_party/closure_compiler/externs/webview_tag.js
@@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// TODO(crbug.com/1085633): Inline enums need to be cleaned up in the source
+// specification before we can autogenerate this.
+
/**
* @typedef {{
* since: (number|undefined)
diff --git a/chromium/third_party/closure_compiler/externs/windows.js b/chromium/third_party/closure_compiler/externs/windows.js
new file mode 100644
index 00000000000..a551a2e0635
--- /dev/null
+++ b/chromium/third_party/closure_compiler/externs/windows.js
@@ -0,0 +1,207 @@
+// Copyright 2020 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This file was generated by:
+// tools/json_schema_compiler/compiler.py.
+// NOTE: The format of types has changed. 'FooType' is now
+// 'chrome.windows.FooType'.
+// Please run the closure compiler before committing changes.
+// See https://chromium.googlesource.com/chromium/src/+/master/docs/closure_compilation.md
+
+// IMPORTANT NOTE: Work-around for crbug.com/543822
+// s/chrome.windows.tabs.Tab/chrome.tabs.Tab/
+
+/** @fileoverview Externs generated from namespace: windows */
+
+/** @const */
+chrome.windows = {};
+
+/**
+ * @enum {string}
+ * @see https://developer.chrome.com/extensions/windows#type-WindowType
+ */
+chrome.windows.WindowType = {
+ NORMAL: 'normal',
+ POPUP: 'popup',
+ PANEL: 'panel',
+ APP: 'app',
+ DEVTOOLS: 'devtools',
+};
+
+/**
+ * @enum {string}
+ * @see https://developer.chrome.com/extensions/windows#type-WindowState
+ */
+chrome.windows.WindowState = {
+ NORMAL: 'normal',
+ MINIMIZED: 'minimized',
+ MAXIMIZED: 'maximized',
+ FULLSCREEN: 'fullscreen',
+ LOCKED_FULLSCREEN: 'locked-fullscreen',
+};
+
+/**
+ * @typedef {{
+ * id: (number|undefined),
+ * focused: boolean,
+ * top: (number|undefined),
+ * left: (number|undefined),
+ * width: (number|undefined),
+ * height: (number|undefined),
+ * tabs: (!Array<!chrome.tabs.Tab>|undefined),
+ * incognito: boolean,
+ * type: (!chrome.windows.WindowType|undefined),
+ * state: (!chrome.windows.WindowState|undefined),
+ * alwaysOnTop: boolean,
+ * sessionId: (string|undefined)
+ * }}
+ * @see https://developer.chrome.com/extensions/windows#type-Window
+ */
+chrome.windows.Window;
+
+/**
+ * @enum {string}
+ * @see https://developer.chrome.com/extensions/windows#type-CreateType
+ */
+chrome.windows.CreateType = {
+ NORMAL: 'normal',
+ POPUP: 'popup',
+ PANEL: 'panel',
+};
+
+/**
+ * The windowId value that represents the absence of a chrome browser window.
+ * @type {number}
+ * @see https://developer.chrome.com/extensions/windows#type-WINDOW_ID_NONE
+ */
+chrome.windows.WINDOW_ID_NONE;
+
+/**
+ * The windowId value that represents the <a href='windows#current-window'>current window</a>.
+ * @type {number}
+ * @see https://developer.chrome.com/extensions/windows#type-WINDOW_ID_CURRENT
+ */
+chrome.windows.WINDOW_ID_CURRENT;
+
+/**
+ * Gets details about a window.
+ * @param {number} windowId
+ * @param {?{
+ populate: (boolean|undefined),
+ windowTypes: (!Array<!chrome.windows.WindowType>|undefined)
+}|undefined}
+ * getInfo
+ * @param {function(!chrome.windows.Window):void} callback
+ * @see https://developer.chrome.com/extensions/windows#method-get
+ */
+chrome.windows.get = function(windowId, getInfo, callback) {};
+
+/**
+ * Gets the <a href='#current-window'>current window</a>.
+ * @param {?{
+ populate: (boolean|undefined),
+ windowTypes: (!Array<!chrome.windows.WindowType>|undefined)
+}|undefined}
+ * getInfo
+ * @param {function(!chrome.windows.Window):void} callback
+ * @see https://developer.chrome.com/extensions/windows#method-getCurrent
+ */
+chrome.windows.getCurrent = function(getInfo, callback) {};
+
+/**
+ * Gets the window that was most recently focused &mdash; typically the window
+ * 'on top'.
+ * @param {?{
+ populate: (boolean|undefined),
+ windowTypes: (!Array<!chrome.windows.WindowType>|undefined)
+}|undefined}
+ * getInfo
+ * @param {function(!chrome.windows.Window):void} callback
+ * @see https://developer.chrome.com/extensions/windows#method-getLastFocused
+ */
+chrome.windows.getLastFocused = function(getInfo, callback) {};
+
+/**
+ * Gets all windows.
+ * @param {?{
+ populate: (boolean|undefined),
+ windowTypes: (!Array<!chrome.windows.WindowType>|undefined)
+}|undefined}
+ * getInfo
+ * @param {function(!Array<!chrome.windows.Window>):void} callback
+ * @see https://developer.chrome.com/extensions/windows#method-getAll
+ */
+chrome.windows.getAll = function(getInfo, callback) {};
+
+/**
+ * Creates (opens) a new browser window with any optional sizing, position, or
+ * default URL provided.
+ * @param {{
+ * url: ((string|!Array<string>)|undefined),
+ * tabId: (number|undefined),
+ * left: (number|undefined),
+ * top: (number|undefined),
+ * width: (number|undefined),
+ * height: (number|undefined),
+ * focused: (boolean|undefined),
+ * incognito: (boolean|undefined),
+ * type: (!chrome.windows.CreateType|undefined),
+ * state: (!chrome.windows.WindowState|undefined),
+ * setSelfAsOpener: (boolean|undefined)
+ * }=} createData
+ * @param {function((!chrome.windows.Window|undefined)):void=} callback
+ * @see https://developer.chrome.com/extensions/windows#method-create
+ */
+chrome.windows.create = function(createData, callback) {};
+
+/**
+ * Updates the properties of a window. Specify only the properties that to be
+ * changed; unspecified properties are unchanged.
+ * @param {number} windowId
+ * @param {{
+ * left: (number|undefined),
+ * top: (number|undefined),
+ * width: (number|undefined),
+ * height: (number|undefined),
+ * focused: (boolean|undefined),
+ * drawAttention: (boolean|undefined),
+ * state: (!chrome.windows.WindowState|undefined)
+ * }} updateInfo
+ * @param {function(!chrome.windows.Window):void=} callback
+ * @see https://developer.chrome.com/extensions/windows#method-update
+ */
+chrome.windows.update = function(windowId, updateInfo, callback) {};
+
+/**
+ * Removes (closes) a window and all the tabs inside it.
+ * @param {number} windowId
+ * @param {function():void=} callback
+ * @see https://developer.chrome.com/extensions/windows#method-remove
+ */
+chrome.windows.remove = function(windowId, callback) {};
+
+/**
+ * Fired when a window is created.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/windows#event-onCreated
+ */
+chrome.windows.onCreated;
+
+/**
+ * Fired when a window is removed (closed).
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/windows#event-onRemoved
+ */
+chrome.windows.onRemoved;
+
+/**
+ * Fired when the currently focused window changes. Returns
+ * <code>chrome.windows.WINDOW_ID_NONE</code> if all Chrome windows have lost
+ * focus. <b>Note:</b> On some Linux window managers,
+ * <code>WINDOW_ID_NONE</code> is always sent immediately preceding a switch
+ * from one Chrome window to another.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/windows#event-onFocusChanged
+ */
+chrome.windows.onFocusChanged;
diff --git a/chromium/third_party/closure_compiler/interfaces/bluetooth_interface.js b/chromium/third_party/closure_compiler/interfaces/bluetooth_interface.js
index 992665fa54f..81c348bbb4b 100644
--- a/chromium/third_party/closure_compiler/interfaces/bluetooth_interface.js
+++ b/chromium/third_party/closure_compiler/interfaces/bluetooth_interface.js
@@ -1,48 +1,46 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
+// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This file was generated by:
-// tools/json_schema_compiler/compiler.py.
+// ./tools/json_schema_compiler/compiler.py.
/** @fileoverview Interface for bluetooth that can be overriden. */
-assertNotReached('Interface file for Closure Compiler should not be executed.');
-
/** @interface */
function Bluetooth() {}
Bluetooth.prototype = {
/**
* Get information about the Bluetooth adapter.
- * @param {function(!chrome.bluetooth.AdapterState):void} callback Called with
- * an AdapterState object describing the adapter state.
+ * @param {function(!chrome.bluetooth.AdapterState): void} callback Called
+ * with an AdapterState object describing the adapter state.
* @see https://developer.chrome.com/extensions/bluetooth#method-getAdapterState
*/
- getAdapterState: assertNotReached,
+ getAdapterState: function(callback) {},
/**
* Get information about a Bluetooth device known to the system.
* @param {string} deviceAddress Address of device to get.
- * @param {function(!chrome.bluetooth.Device):void} callback Called with the
+ * @param {function(!chrome.bluetooth.Device): void} callback Called with the
* Device object describing the device.
* @see https://developer.chrome.com/extensions/bluetooth#method-getDevice
*/
- getDevice: assertNotReached,
+ getDevice: function(deviceAddress, callback) {},
/**
* Get a list of Bluetooth devices known to the system, including paired and
* recently discovered devices.
- * @param {!chrome.bluetooth.BluetoothFilter=} filter Some criteria to filter
- * the list of returned bluetooth devices. If the filter is not set or set
- * to <code>{}</code>, returned device list will contain all bluetooth
- * devices. Right now this is only supported in ChromeOS, for other
- * platforms, a full list is returned.
- * @param {function(!Array<!chrome.bluetooth.Device>):void=} callback Called
+ * @param {?chrome.bluetooth.BluetoothFilter|undefined} filter Some criteria
+ * to filter the list of returned bluetooth devices. If the filter is not
+ * set or set to <code>{}</code>, returned device list will contain all
+ * bluetooth devices. Right now this is only supported in ChromeOS, for
+ * other platforms, a full list is returned.
+ * @param {function(!Array<!chrome.bluetooth.Device>): void} callback Called
* when the search is completed.
* @see https://developer.chrome.com/extensions/bluetooth#method-getDevices
*/
- getDevices: assertNotReached,
+ getDevices: function(filter, callback) {},
/**
* <p>Start discovery. Newly discovered devices will be returned via the
@@ -52,17 +50,17 @@ Bluetooth.prototype = {
* changes.</p><p>Discovery will fail to start if this application has already
* called startDiscovery. Discovery can be resource intensive: stopDiscovery
* should be called as soon as possible.</p>
- * @param {function():void=} callback Called to indicate success or failure.
+ * @param {function(): void=} callback Called to indicate success or failure.
* @see https://developer.chrome.com/extensions/bluetooth#method-startDiscovery
*/
- startDiscovery: assertNotReached,
+ startDiscovery: function(callback) {},
/**
* Stop discovery.
- * @param {function():void=} callback Called to indicate success or failure.
+ * @param {function(): void=} callback Called to indicate success or failure.
* @see https://developer.chrome.com/extensions/bluetooth#method-stopDiscovery
*/
- stopDiscovery: assertNotReached,
+ stopDiscovery: function(callback) {},
};
/**
diff --git a/chromium/third_party/closure_compiler/interfaces/bluetooth_private_interface.js b/chromium/third_party/closure_compiler/interfaces/bluetooth_private_interface.js
index 744a57be709..2399ca0c821 100644
--- a/chromium/third_party/closure_compiler/interfaces/bluetooth_private_interface.js
+++ b/chromium/third_party/closure_compiler/interfaces/bluetooth_private_interface.js
@@ -1,4 +1,4 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
+// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -7,81 +7,95 @@
/** @fileoverview Interface for bluetoothPrivate that can be overriden. */
-assertNotReached('Interface file for Closure Compiler should not be executed.');
-
/** @interface */
function BluetoothPrivate() {}
BluetoothPrivate.prototype = {
/**
* Changes the state of the Bluetooth adapter.
- * @param {!chrome.bluetoothPrivate.NewAdapterState} adapterState
- * @param {function():void=} callback
- * @see https://developer.chrome.com/extensions/bluetoothPrivate#method-setAdapterState
+ * @param {!chrome.bluetoothPrivate.NewAdapterState} adapterState The new
+ * state of the adapter.
+ * @param {function(): void=} callback Called when all the state changes have
+ * been completed.
*/
- setAdapterState: assertNotReached,
+ setAdapterState: function(adapterState, callback) {},
/**
* @param {!chrome.bluetoothPrivate.SetPairingResponseOptions} options
- * @param {function():void=} callback
- * @see https://developer.chrome.com/extensions/bluetoothPrivate#method-setPairingResponse
+ * @param {function(): void=} callback
*/
- setPairingResponse: assertNotReached,
+ setPairingResponse: function(options, callback) {},
/**
* Tears down all connections to the given device.
* @param {string} deviceAddress
- * @param {function():void=} callback
- * @see https://developer.chrome.com/extensions/bluetoothPrivate#method-disconnectAll
+ * @param {function(): void=} callback
*/
- disconnectAll: assertNotReached,
+ disconnectAll: function(deviceAddress, callback) {},
/**
* Forgets the given device.
* @param {string} deviceAddress
- * @param {function():void=} callback
- * @see https://developer.chrome.com/extensions/bluetoothPrivate#method-forgetDevice
+ * @param {function(): void=} callback
*/
- forgetDevice: assertNotReached,
+ forgetDevice: function(deviceAddress, callback) {},
/**
* Set or clear discovery filter.
* @param {!chrome.bluetoothPrivate.DiscoveryFilter} discoveryFilter
- * @param {function():void=} callback
- * @see https://developer.chrome.com/extensions/bluetoothPrivate#method-setDiscoveryFilter
+ * @param {function(): void=} callback
*/
- setDiscoveryFilter: assertNotReached,
+ setDiscoveryFilter: function(discoveryFilter, callback) {},
/**
* Connects to the given device. This will only throw an error if the device
* address is invalid or the device is already connected. Otherwise this will
* succeed and invoke |callback| with ConnectResultType.
* @param {string} deviceAddress
- * @param {function(!chrome.bluetoothPrivate.ConnectResultType):void=}
+ * @param {function(!chrome.bluetoothPrivate.ConnectResultType): void=}
* callback
- * @see https://developer.chrome.com/extensions/bluetoothPrivate#method-connect
*/
- connect: assertNotReached,
+ connect: function(deviceAddress, callback) {},
/**
* Pairs the given device.
* @param {string} deviceAddress
- * @param {function():void=} callback
- * @see https://developer.chrome.com/extensions/bluetoothPrivate#method-pair
+ * @param {function(): void=} callback
+ */
+ pair: function(deviceAddress, callback) {},
+
+ /**
+ * Record that a pairing attempt finished. Ignores cancellations.
+ * @param {!chrome.bluetoothPrivate.TransportType} transport
+ * @param {number} pairingDurationMs
+ * @param {!chrome.bluetoothPrivate.ConnectResultType=} result
+ */
+ recordPairing: function(transport, pairingDurationMs, result) {},
+
+ /**
+ * Record that a user-initiated reconnection attempt to an already paired
+ * device finished. Ignores cancellations.
+ * @param {!chrome.bluetoothPrivate.ConnectResultType=} result
+ */
+ recordReconnection: function(result) {},
+
+ /**
+ * Record that a user selected a device to connect to.
+ * @param {number} selectionDurationMs
+ * @param {boolean} wasPaired
+ * @param {!chrome.bluetoothPrivate.TransportType} transport
*/
- pair: assertNotReached,
+ recordDeviceSelection: function(selectionDurationMs, wasPaired, transport) {},
};
/**
* Fired when a pairing event occurs.
* @type {!ChromeEvent}
- * @see https://developer.chrome.com/extensions/bluetoothPrivate#event-onPairing
*/
BluetoothPrivate.prototype.onPairing;
/**
* Fired when a Bluetooth device changed its address.
* @type {!ChromeEvent}
- * @see https://developer.chrome.com/extensions/bluetoothPrivate#event-onDeviceAddressChanged
*/
BluetoothPrivate.prototype.onDeviceAddressChanged;
diff --git a/chromium/third_party/closure_compiler/js_minify.py b/chromium/third_party/closure_compiler/js_minify.py
deleted file mode 100755
index fb888505fe2..00000000000
--- a/chromium/third_party/closure_compiler/js_minify.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-''' Javascript minifier using the closure compiler
-
-This minifier strips spaces and comments out of Javascript using the closure
-compiler. It takes the original Javascript on standard input, and outputs
-the minified output on standard output.
-
-Any errors or other messages from the compiler are output on standard error.
-'''
-
-import argparse
-import sys
-import tempfile
-
-from compiler import Compiler
-
-
-def Minify(source):
- parser = argparse.ArgumentParser()
- parser.add_argument("-c", "--closure_args", nargs=argparse.ZERO_OR_MORE,
- help="Arguments passed directly to the Closure compiler")
- args = parser.parse_args()
- with tempfile.NamedTemporaryFile(suffix='.js') as t1, \
- tempfile.NamedTemporaryFile(suffix='.js') as t2:
- t1.write(source)
- t1.seek(0)
- (compile_error, compile_stderr) = Compiler().run(
- [t1.name],
- out_file=t2.name,
- closure_args=args.closure_args)
- if compile_error:
- print compile_stderr
- t2.seek(0)
- result = t2.read()
- return result
-
-
-if __name__ == '__main__':
- orig_stdout = sys.stdout
- result = ''
- try:
- sys.stdout = sys.stderr
- result = Minify(sys.stdin.read())
- finally:
- sys.stdout = orig_stdout
- print result
diff --git a/chromium/third_party/closure_compiler/roll_closure_compiler b/chromium/third_party/closure_compiler/roll_closure_compiler
index f1e7f29c1fb..e30d3ee08e8 100755
--- a/chromium/third_party/closure_compiler/roll_closure_compiler
+++ b/chromium/third_party/closure_compiler/roll_closure_compiler
@@ -69,6 +69,10 @@ EOT
(echo "${WARNING}" && cat polymer-1.0.js) > "${EXTERNS_DIR}/polymer-1.0.js"
(echo "${WARNING}" && cat mocha-2.5.js) > "${EXTERNS_DIR}/mocha-2.5.js"
+# Apply local Chromium patch.
+cd "${SCRIPT_DIR}"
+git apply chromium_patch.diff
+
new_chrome_sha1=$(get_sha1 "${EXTERNS_DIR}/chrome.js")
if [[ "${new_chrome_sha1}" != "${old_chrome_sha1}" ]]; then
chrome_range="chrome.js: ${old_chrome_sha1} -> ${new_chrome_sha1}"