summaryrefslogtreecommitdiff
path: root/chromium/chrome/common/extensions/api
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-12-10 16:19:40 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-12-10 16:01:50 +0000
commit51f6c2793adab2d864b3d2b360000ef8db1d3e92 (patch)
tree835b3b4446b012c75e80177cef9fbe6972cc7dbe /chromium/chrome/common/extensions/api
parent6036726eb981b6c4b42047513b9d3f4ac865daac (diff)
downloadqtwebengine-chromium-51f6c2793adab2d864b3d2b360000ef8db1d3e92.tar.gz
BASELINE: Update Chromium to 71.0.3578.93
Change-Id: I6a32086c33670e1b033f8b10e6bf1fd4da1d105d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/chrome/common/extensions/api')
-rw-r--r--chromium/chrome/common/extensions/api/BUILD.gn51
-rw-r--r--chromium/chrome/common/extensions/api/_api_features.json42
-rw-r--r--chromium/chrome/common/extensions/api/_manifest_features.json1
-rw-r--r--chromium/chrome/common/extensions/api/_permission_features.json72
-rw-r--r--chromium/chrome/common/extensions/api/accessibility_private.json50
-rw-r--r--chromium/chrome/common/extensions/api/api_sources.gni6
-rw-r--r--chromium/chrome/common/extensions/api/automation.idl9
-rw-r--r--chromium/chrome/common/extensions/api/automation_api_constants.h20
-rw-r--r--chromium/chrome/common/extensions/api/automation_internal.idl22
-rw-r--r--chromium/chrome/common/extensions/api/autotest_private.idl53
-rw-r--r--chromium/chrome/common/extensions/api/bookmark_manager_private.json6
-rw-r--r--chromium/chrome/common/extensions/api/browser.idl26
-rw-r--r--chromium/chrome/common/extensions/api/browser_action.json38
-rw-r--r--chromium/chrome/common/extensions/api/commands/commands_manifest_unittest.cc2
-rw-r--r--chromium/chrome/common/extensions/api/common_extension_api_unittest.cc10
-rw-r--r--chromium/chrome/common/extensions/api/context_menus.json30
-rw-r--r--chromium/chrome/common/extensions/api/cryptotoken_private.idl2
-rw-r--r--chromium/chrome/common/extensions/api/declarative_content.json18
-rw-r--r--chromium/chrome/common/extensions/api/developer_private.idl21
-rw-r--r--chromium/chrome/common/extensions/api/easy_unlock_private.idl90
-rw-r--r--chromium/chrome/common/extensions/api/enterprise_reporting_private.idl6
-rw-r--r--chromium/chrome/common/extensions/api/file_browser_handlers/file_browser_handler.cc2
-rw-r--r--chromium/chrome/common/extensions/api/file_browser_handlers/file_browser_handler_manifest_unittest.cc4
-rw-r--r--chromium/chrome/common/extensions/api/file_manager_private.idl48
-rw-r--r--chromium/chrome/common/extensions/api/file_manager_private_internal.idl10
-rw-r--r--chromium/chrome/common/extensions/api/media_galleries.idl255
-rw-r--r--chromium/chrome/common/extensions/api/music_manager_private.idl16
-rw-r--r--chromium/chrome/common/extensions/api/speech/tts_engine_manifest_handler.cc22
-rw-r--r--chromium/chrome/common/extensions/api/storage/storage_schema_manifest_handler.cc5
-rw-r--r--chromium/chrome/common/extensions/api/streams_private.idl57
-rw-r--r--chromium/chrome/common/extensions/api/sync_file_system.idl199
-rw-r--r--chromium/chrome/common/extensions/api/tab_capture.idl43
-rw-r--r--chromium/chrome/common/extensions/api/tabs.json108
-rw-r--r--chromium/chrome/common/extensions/api/tts.json6
-rw-r--r--chromium/chrome/common/extensions/api/tts_engine.json4
-rw-r--r--chromium/chrome/common/extensions/api/url_handlers/url_handlers_parser.cc5
-rw-r--r--chromium/chrome/common/extensions/api/webview_tag.json29
-rw-r--r--chromium/chrome/common/extensions/api/windows.json80
38 files changed, 474 insertions, 994 deletions
diff --git a/chromium/chrome/common/extensions/api/BUILD.gn b/chromium/chrome/common/extensions/api/BUILD.gn
index 6f90411fa1f..3d25c0a332e 100644
--- a/chromium/chrome/common/extensions/api/BUILD.gn
+++ b/chromium/chrome/common/extensions/api/BUILD.gn
@@ -12,7 +12,31 @@ import("//tools/json_schema_compiler/json_schema_api.gni")
assert(enable_extensions)
-# TODO(devlin): Enforce visibility restrictions on more of these targets?
+################################################################################
+# Public Targets
+
+group("api") {
+ public_deps = [
+ ":generated_api_json_strings",
+ ":generated_api_types",
+ ]
+}
+
+group("extensions_features") {
+ public_deps = [
+ ":api_features",
+ ":manifest_features",
+ ":permission_features",
+
+ # TODO(devlin): It would be nicer to have this dependency hoisted up to
+ # //extensions/common (since that's where it's consumed), but there's some
+ # cycles to be resolved first.
+ "//extensions/common/api:extensions_features",
+ ]
+}
+
+################################################################################
+# Private Targets
generated_json_strings("generated_api_json_strings") {
sources = chrome_extensions_api_schema_sources +
@@ -71,6 +95,7 @@ json_features("api_features") {
sources = [
"_api_features.json",
]
+ visibility = [ ":extensions_features" ]
}
json_features("permission_features") {
@@ -79,6 +104,7 @@ json_features("permission_features") {
sources = [
"_permission_features.json",
]
+ visibility = [ ":extensions_features" ]
}
json_features("manifest_features") {
@@ -87,26 +113,5 @@ json_features("manifest_features") {
sources = [
"_manifest_features.json",
]
-}
-
-# Public Targets
-
-group("api") {
- public_deps = [
- ":generated_api_json_strings",
- ":generated_api_types",
- ]
-}
-
-group("extensions_features") {
- public_deps = [
- ":api_features",
- ":manifest_features",
- ":permission_features",
-
- # TODO(devlin): It would be nicer to have this dependency hoisted up to
- # //extensions/common (since that's where it's consumed), but there's some
- # cycles to be resolved first.
- "//extensions/common/api:extensions_features",
- ]
+ visibility = [ ":extensions_features" ]
}
diff --git a/chromium/chrome/common/extensions/api/_api_features.json b/chromium/chrome/common/extensions/api/_api_features.json
index c23d625b063..87da3c0dd86 100644
--- a/chromium/chrome/common/extensions/api/_api_features.json
+++ b/chromium/chrome/common/extensions/api/_api_features.json
@@ -172,10 +172,6 @@
"dependencies": ["permission:brailleDisplayPrivate"],
"contexts": ["blessed_extension"]
},
- "browser": {
- "dependencies": ["permission:browser"],
- "contexts": ["blessed_extension"]
- },
"browserAction": {
"dependencies": ["manifest:browser_action"],
"contexts": ["blessed_extension"]
@@ -257,7 +253,8 @@
"chrome://chrome-signin/*",
"chrome://media-router/*",
"chrome://mobilesetup/*",
- "chrome://oobe/*"
+ "chrome://oobe/*",
+ "chrome://assistant-optin/*"
]
}],
"cloudPrintPrivate": {
@@ -364,10 +361,6 @@
"channel": "stable",
"contexts": ["blessed_extension"]
},
- "easyUnlockPrivate": {
- "dependencies": ["permission:easyUnlockPrivate"],
- "contexts": ["blessed_extension"]
- },
"echoPrivate": {
"dependencies": ["permission:echoPrivate"],
"contexts": ["blessed_extension"]
@@ -578,10 +571,6 @@
"channel": "stable",
"contexts": ["blessed_extension"]
},
- "mediaGalleries": {
- "dependencies": ["permission:mediaGalleries"],
- "contexts": ["blessed_extension"]
- },
"mediaPlayerPrivate": {
"dependencies": ["permission:mediaPlayerPrivate"],
"contexts": ["blessed_extension"]
@@ -596,10 +585,6 @@
"channel": "stable",
"matches": ["<all_urls>"]
},
- "musicManagerPrivate": {
- "dependencies": ["permission:musicManagerPrivate"],
- "contexts": ["blessed_extension"]
- },
"networking.castPrivate": {
"channel": "stable",
"contexts": ["blessed_extension"],
@@ -674,7 +659,8 @@
"contexts": ["webui"],
"matches": [
"chrome://multidevice-setup/*",
- "chrome://settings/*"
+ "chrome://settings/*",
+ "chrome://oobe/*"
],
"platforms": ["chromeos"]
},
@@ -714,14 +700,6 @@
"dependencies": ["permission:signedInDevices"],
"contexts": ["blessed_extension"]
},
- "streamsPrivate": {
- "dependencies": ["permission:streamsPrivate"],
- "contexts": ["blessed_extension"]
- },
- "syncFileSystem": {
- "dependencies": ["permission:syncFileSystem"],
- "contexts": ["blessed_extension"]
- },
"systemIndicator": {
"dependencies": ["manifest:system_indicator"],
"contexts": ["blessed_extension"]
@@ -811,18 +789,6 @@
"81986D4F846CEDDDB962643FA501D1780DD441BB" // http://crbug.com/775961
]
},
- "webstore": {
- // Hosted apps can use the webstore API from within a blessed context.
- "channel": "stable",
- // Set extension_types to 'all' to prevent webstore from being filtered.
- // Technically, webstore is not in apps or extensions, but it is currently
- // displayed on /extensions/webstore and /apps/webstore. The "contexts"
- // restriction effectively restricts this to hosted apps and webpages.
- "extension_types": "all",
- "contexts": ["blessed_web_page", "web_page"],
- // Any webpage can use the webstore API.
- "matches": ["<all_urls>"]
- },
"webstorePrivate": {
"dependencies": ["permission:webstorePrivate"],
// NOTE: even though this is only used by the webstore hosted app, which
diff --git a/chromium/chrome/common/extensions/api/_manifest_features.json b/chromium/chrome/common/extensions/api/_manifest_features.json
index 785d37905f3..68a19407418 100644
--- a/chromium/chrome/common/extensions/api/_manifest_features.json
+++ b/chromium/chrome/common/extensions/api/_manifest_features.json
@@ -111,7 +111,6 @@
"extension_types": ["legacy_packaged_app", "platform_app"],
"whitelist": [
"64291898C201DAF15B090EC4B9EC270BEB6BE6FF",
- "1630F9F78E4527E19E5D9008B99847A8D690F65D", // ZIP unpacker.
"07BD6A765FFC289FF755D7CAB2893A40EC337FEC", // http://crbug.com/453955
"896B85CC7E913E11C34892C1425A093C0701D386", // http://crbug.com/453955
"11A01C82EF355E674E4F9728A801F5C3CB40D83F", // http://crbug.com/453955
diff --git a/chromium/chrome/common/extensions/api/_permission_features.json b/chromium/chrome/common/extensions/api/_permission_features.json
index 59d8079f7fd..4e41d76e845 100644
--- a/chromium/chrome/common/extensions/api/_permission_features.json
+++ b/chromium/chrome/common/extensions/api/_permission_features.json
@@ -93,10 +93,6 @@
"extension_types": ["extension", "legacy_packaged_app", "platform_app"],
"location": "component"
},
- "browser": {
- "channel": "stable",
- "extension_types": ["platform_app"]
- },
"browsingData": {
"channel": "stable",
"extension_types": ["extension", "legacy_packaged_app"]
@@ -276,12 +272,6 @@
"channel": "stable",
"extension_types": ["extension"]
},
- "easyUnlockPrivate": {
- "channel": "stable",
- "extension_types": ["platform_app"],
- "location": "component",
- "platforms": ["chromeos"]
- },
"embeddedExtensionOptions": {
"channel": "trunk",
"extension_types": ["extension"]
@@ -293,7 +283,7 @@
"location": "policy"
},
"enterprise.hardwarePlatform": {
- "channel": "beta",
+ "channel": "stable",
"extension_types": ["extension"],
"location": "policy"
},
@@ -330,7 +320,12 @@
"platforms" : ["win", "mac", "linux"],
"whitelist" : [
"FD15C63ABA854733FDCBC1D4D34A71E963A12ABD", // https://crbug.com/825015
- "08455FA7CB8734168378F731B00B354CEEE0088F" // https://crbug.com/825015 - Test Extension
+ "08455FA7CB8734168378F731B00B354CEEE0088F", // https://crbug.com/825015 - Test Extension
+ "86D63D90308742AA65B8B29AE2D39FED2D6DC310", // https://crbug.com/882461 SecureConnect
+ "031E5E4A54C39E4F46E11CE643584E9187915908", // https://crbug.com/882461 SecureConnect
+ "349E89FE0296161007623C0B4096B617D7CECD54", // https://crbug.com/882461 SecureConnect
+ "18B761AA5B58FA89E596EB7996B4C92C86775C7F", // https://crbug.com/882461 SecureConnect
+ "2012C0122892D332325339998251D1CC3CAE396A" // https://crbug.com/882461 SecureConnect
]
},
"experimental": {
@@ -520,30 +515,6 @@
"session_types": ["kiosk"]
}
],
- "mediaGalleries": {
- "channel": "stable",
- "extension_types": [ "platform_app" ]
- },
- "mediaGalleries.allAutoDetected": {
- "channel": "stable",
- "extension_types": [ "platform_app" ]
- },
- "mediaGalleries.scan": {
- "channel": "dev",
- "extension_types": [ "platform_app" ]
- },
- "mediaGalleries.read": {
- "channel": "stable",
- "extension_types": [ "platform_app" ]
- },
- "mediaGalleries.copyTo": {
- "channel": "stable",
- "extension_types": [ "platform_app" ]
- },
- "mediaGalleries.delete": {
- "channel": "stable",
- "extension_types": [ "platform_app" ]
- },
"mediaPlayerPrivate": {
"channel": "stable",
"extension_types": ["extension", "legacy_packaged_app", "platform_app"],
@@ -571,19 +542,6 @@
"channel": "stable",
"extension_types": ["platform_app"]
}],
- "musicManagerPrivate": {
- "channel": "stable",
- "extension_types": ["platform_app"],
- "whitelist": [
- "4B1D0E19C6C43C008C44A8278C8B5BFE15ABEB3C", // Music Manager
- "B8F61FD1B25DE03706DBB8906A73261E4DBB992A", // Test
- "F7FA7ABC1ECB89BA8EE6656847EFABBF43BB9BCA",
- "4FE45FA56EF6A25FDE8C302C44045CA9CE8A605A",
- "3D14248405B8A59043420AAC160077C99E7788A9",
- "A6C87307BBE5886CC5F1393025000E2FE8060BF2",
- "3407516021EA3669C0EC8E65E6B9837E5A521B9C"
- ]
- },
"notifications": {
// The chrome.notifications functionality listed in notifications.idl is
// available only to extension/platform_app types. The implementation of
@@ -771,22 +729,6 @@
"channel": "dev",
"extension_types": ["extension", "legacy_packaged_app", "platform_app"]
},
- "streamsPrivate": {
- "channel": "stable",
- "extension_types": ["extension", "legacy_packaged_app", "platform_app"],
- "whitelist": [
- "787000072C6FBB934AF5A42275CDE73FC977D995", // browser_tests
- "2FC374607C2DF285634B67C64A2E356C607091C3", // QuickOffice
- "5D3851BEFF680AB6D954B76678EFCCE834465C23", // QuickOffice Dev
- "12E618C3C6E97495AAECF2AC12DEB082353241C6", // QO component extension
- "3727DD3E564B6055387425027AD74C58784ACC15", // Editor
- "CBCC42ABED43A4B58FE3810E62AFFA010EB0349F" // PDF
- ]
- },
- "syncFileSystem": {
- "channel": "stable",
- "extension_types": ["platform_app"]
- },
"systemPrivate": {
"channel": "stable",
"extension_types": ["extension", "legacy_packaged_app", "platform_app"],
diff --git a/chromium/chrome/common/extensions/api/accessibility_private.json b/chromium/chrome/common/extensions/api/accessibility_private.json
index b408c7fe7a3..c9459a74db8 100644
--- a/chromium/chrome/common/extensions/api/accessibility_private.json
+++ b/chromium/chrome/common/extensions/api/accessibility_private.json
@@ -35,7 +35,7 @@
{
"id": "Gesture",
"type": "string",
- "enum": [ "click", "swipeLeft1", "swipeUp1", "swipeRight1", "swipeDown1", "swipeLeft2", "swipeUp2", "swipeRight2", "swipeDown2", "swipeLeft3", "swipeUp3", "swipeRight3", "swipeDown3", "swipeLeft4", "swipeUp4", "swipeRight4", "swipeDown4" ],
+ "enum": [ "click", "swipeLeft1", "swipeUp1", "swipeRight1", "swipeDown1", "swipeLeft2", "swipeUp2", "swipeRight2", "swipeDown2", "swipeLeft3", "swipeUp3", "swipeRight3", "swipeDown3", "swipeLeft4", "swipeUp4", "swipeRight4", "swipeDown4", "tap2", "tap3", "tap4" ],
"description": "Accessibility gestures fired by the touch exploration controller."
},
{
@@ -84,6 +84,21 @@
}
},
{
+ "id": "SyntheticMouseEventType",
+ "type": "string",
+ "description": "The type of event to send",
+ "enum": ["press", "release", "drag", "move", "enter", "exit"]
+ },
+ {
+ "id": "SyntheticMouseEvent",
+ "type": "object",
+ "properties": {
+ "type": {"$ref": "SyntheticMouseEventType"},
+ "x": {"type": "integer", "description": "X coordinate for mouse event in global screen coordinates"},
+ "y": {"type": "integer", "description": "Y coordinate for mouse event in global screen coordinates"}
+ }
+ },
+ {
"id": "SelectToSpeakState",
"type": "string",
"description": "The state of the Select-to-Speak extension",
@@ -215,6 +230,32 @@
"platforms": ["chromeos"]
},
{
+ "name": "enableChromeVoxMouseEvents",
+ "type": "function",
+ "description": "Enables or disables mouse events in ChromeVox.",
+ "parameters": [
+ {
+ "name": "enabled",
+ "type": "boolean",
+ "description": "True if ChromeVox should receive mouse events."
+ }
+ ],
+ "platforms": ["chromeos"]
+ },
+ {
+ "name": "sendSyntheticMouseEvent",
+ "type": "function",
+ "description": "Sends a fabricated mouse event.",
+ "parameters": [
+ {
+ "name": "mouseEvent",
+ "$ref": "SyntheticMouseEvent",
+ "description": "The event to send."
+ }
+ ],
+ "platforms": ["chromeos"]
+ },
+ {
"name": "onSelectToSpeakStateChanged",
"type": "function",
"description": "Called by the Select-to-Speak extension when Select-to-Speak has changed states, between selecting with the mouse, speaking, and inactive.",
@@ -225,6 +266,13 @@
}
],
"platforms": ["chromeos"]
+ },
+ {
+ "name": "toggleDictation",
+ "type": "function",
+ "description": "Toggles dictation between active and inactive states.",
+ "parameters": [],
+ "platforms": ["chromeos"]
}
],
"events": [
diff --git a/chromium/chrome/common/extensions/api/api_sources.gni b/chromium/chrome/common/extensions/api/api_sources.gni
index a26827fa30d..a10fa68d904 100644
--- a/chromium/chrome/common/extensions/api/api_sources.gni
+++ b/chromium/chrome/common/extensions/api/api_sources.gni
@@ -22,7 +22,6 @@ schema_sources_ = [
"bookmark_manager_private.json",
"bookmarks.json",
"braille_display_private.idl",
- "browser.idl",
"chrome_web_view_internal.json",
"command_line_private.json",
"content_settings.json",
@@ -49,7 +48,6 @@ schema_sources_ = [
"instance_id.json",
"language_settings_private.idl",
"manifest_types.json",
- "media_galleries.idl",
"notifications.idl",
"omnibox.json",
"page_capture.json",
@@ -61,8 +59,6 @@ schema_sources_ = [
"sessions.json",
"settings_private.idl",
"signed_in_devices.idl",
- "streams_private.idl",
- "sync_file_system.idl",
"system_indicator.idl",
"system_private.json",
"tab_capture.idl",
@@ -94,7 +90,6 @@ if (is_chromeos) {
"arc_apps_private.idl",
"certificate_provider.idl",
"certificate_provider_internal.idl",
- "easy_unlock_private.idl",
"echo_private.json",
"enterprise_device_attributes.idl",
"enterprise_platform_keys.idl",
@@ -138,7 +133,6 @@ uncompiled_sources_ = [
"browsing_data.json",
"extension.json",
"idltest.idl",
- "music_manager_private.idl",
"top_sites.json",
]
diff --git a/chromium/chrome/common/extensions/api/automation.idl b/chromium/chrome/common/extensions/api/automation.idl
index 760950787a3..299d02c67e2 100644
--- a/chromium/chrome/common/extensions/api/automation.idl
+++ b/chromium/chrome/common/extensions/api/automation.idl
@@ -35,6 +35,7 @@
liveRegionCreated,
liveRegionChanged,
loadComplete,
+ loadStart,
locationChanged,
mediaStartedPlaying,
mediaStoppedPlaying,
@@ -353,9 +354,11 @@
uninitialized,
attribute,
attributeExplicitlyEmpty,
+ caption,
contents,
placeholder,
relatedElement,
+ title,
value
};
@@ -652,6 +655,9 @@
long? scrollYMin;
long? scrollYMax;
+ // Indicates whether this node is scrollable.
+ boolean? scrollable;
+
//
// Editable text field attributes.
//
@@ -667,9 +673,6 @@
// The input type, like email or number.
DOMString? textInputType;
- // An array of indexes of the break between lines in editable text.
- long[] lineBreaks;
-
// An array of indexes of the start position of each text marker.
long[] markerStarts;
diff --git a/chromium/chrome/common/extensions/api/automation_api_constants.h b/chromium/chrome/common/extensions/api/automation_api_constants.h
deleted file mode 100644
index c171202839d..00000000000
--- a/chromium/chrome/common/extensions/api/automation_api_constants.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// 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.
-
-#ifndef CHROME_COMMON_EXTENSIONS_API_AUTOMATION_API_CONSTANTS_H_
-#define CHROME_COMMON_EXTENSIONS_API_AUTOMATION_API_CONSTANTS_H_
-
-namespace extensions {
-namespace api {
-namespace automation {
-
-// The accessibility tree ID of the desktop tree. All other tree IDs are
-// for web content.
-const int kDesktopTreeID = 0;
-
-} // namespace automation
-} // namespace api
-} // namespace extensions
-
-#endif // CHROME_COMMON_EXTENSIONS_API_AUTOMATION_API_CONSTANTS_H_
diff --git a/chromium/chrome/common/extensions/api/automation_internal.idl b/chromium/chrome/common/extensions/api/automation_internal.idl
index 342cfdb170a..115a045c061 100644
--- a/chromium/chrome/common/extensions/api/automation_internal.idl
+++ b/chromium/chrome/common/extensions/api/automation_internal.idl
@@ -11,7 +11,7 @@ namespace automationInternal {
// the tree update format.
[nocompile] dictionary AXEventParams {
// The tree id of the web contents that this update is for.
- long treeID;
+ DOMString treeID;
// ID of the node that the event applies to.
long targetID;
@@ -41,7 +41,7 @@ namespace automationInternal {
// Arguments required for all actions supplied to performAction.
dictionary PerformActionRequiredParams {
- long treeID;
+ DOMString treeID;
long automationNodeID;
// This can be either automation::ActionType or
@@ -78,7 +78,7 @@ namespace automationInternal {
// Arguments for the querySelector function.
dictionary QuerySelectorRequiredParams {
- long treeID;
+ DOMString treeID;
long automationNodeID;
DOMString selector;
};
@@ -103,7 +103,7 @@ namespace automationInternal {
// Returns the accessibility tree id of the web contents who's accessibility
// was enabled using enableTab().
- callback EnableTabCallback = void(long tree_id);
+ callback EnableTabCallback = void(DOMString tree_id);
// Callback called when enableDesktop() returns.
callback EnableDesktopCallback = void();
@@ -119,7 +119,7 @@ namespace automationInternal {
EnableTabCallback callback);
// Enable automation of the frame with the given tree id.
- static void enableFrame(long tree_id);
+ static void enableFrame(DOMString tree_id);
// Enables desktop automation.
static void enableDesktop(EnableDesktopCallback callback);
@@ -137,19 +137,19 @@ namespace automationInternal {
// Fired when an accessibility event occurs
static void onAccessibilityEvent(AXEventParams update);
- static void onAccessibilityTreeDestroyed(long treeID);
+ static void onAccessibilityTreeDestroyed(DOMString treeID);
static void onTreeChange(long observerID,
- long treeID,
+ DOMString treeID,
long nodeID,
DOMString changeType);
- static void onChildTreeID(long treeID);
+ static void onChildTreeID(DOMString treeID);
- static void onNodesRemoved(long treeID, long[] nodeIDs);
+ static void onNodesRemoved(DOMString treeID, long[] nodeIDs);
- static void onAccessibilityTreeSerializationError(long treeID);
+ static void onAccessibilityTreeSerializationError(DOMString treeID);
- static void onActionResult(long treeID, long requestID, boolean result);
+ static void onActionResult(DOMString treeID, long requestID, boolean result);
};
};
diff --git a/chromium/chrome/common/extensions/api/autotest_private.idl b/chromium/chrome/common/extensions/api/autotest_private.idl
index 27dc5444194..82588eeb042 100644
--- a/chromium/chrome/common/extensions/api/autotest_private.idl
+++ b/chromium/chrome/common/extensions/api/autotest_private.idl
@@ -4,6 +4,8 @@
// API for integration testing. To be used on test images with a test component
// extension.
+[platforms=("chromeos"),
+ implemented_in="chrome/browser/chromeos/extensions/autotest_private/autotest_private_api.h"]
namespace autotestPrivate {
dictionary LoginStatusDict {
@@ -86,6 +88,26 @@ namespace autotestPrivate {
};
callback PlayStoreStateCallback = void (PlayStoreState result);
+ dictionary HistogramBucket {
+ // Minimum sample value that can be stored in this bucket (i.e. inclusive).
+ long min;
+ // Exclusive maximum value for samples stored this bucket.
+ long max;
+ // Number of samples stored in this bucket.
+ long count;
+ };
+ dictionary Histogram {
+ // Buckets containing samples.
+ HistogramBucket[] buckets;
+ };
+ callback HistogramCallback = void (Histogram histogram);
+
+ callback IsAppShownCallback = void (boolean appShown);
+
+ callback IsArcProvisionedCallback = void (boolean arcProvisioned);
+
+ callback TakeScreenshotCallback = void (DOMString base64Png);
+
callback VoidCallback = void ();
interface Functions {
@@ -152,6 +174,15 @@ namespace autotestPrivate {
// Get list of available printers
static void getPrinterList(PrinterArrayCallback callback);
+ // Returns true if requested app is shown in Chrome.
+ static void isAppShown(DOMString appId, IsAppShownCallback callback);
+
+ // Returns true if ARC is provisioned.
+ static void isArcProvisioned(IsArcProvisionedCallback callback);
+
+ // Launches an application from the launcher with the given appId.
+ static void launchApp(DOMString appId, VoidCallback callback);
+
// Update printer. Printer with empty ID is considered new.
static void updatePrinter(Printer printer);
@@ -163,11 +194,33 @@ namespace autotestPrivate {
// |callback|: Called when the operation has completed.
static void setPlayStoreEnabled(boolean enabled, VoidCallback callback);
+ // Get details about a histogram displayed at chrome://histogram.
+ // |name|: Histogram name, e.g. "Accessibility.CrosAutoclick".
+ // |callback|: Invoked with details.
+ static void getHistogram(DOMString name, HistogramCallback callback);
+
// Run the crostini installer GUI to install the default crostini
// vm / container and create sshfs mount. The installer launches the
// crostini terminal app on completion. The installer expects that
// crostini is not already installed.
// |callback|: Called when the operation has completed.
static void runCrostiniInstaller(VoidCallback callback);
+
+ // Run the crostini uninstaller GUI to remove the default crostini
+ // vm / container. The callback is invoked upon completion.
+ static void runCrostiniUninstaller(VoidCallback callback);
+
+ // Enable/disable Crostini in preferences.
+ // |enabled|: Enable Crostini.
+ // |callback|: Called when the operation has completed.
+ static void setCrostiniEnabled(boolean enabled, VoidCallback callback);
+
+ // Takes a screenshot and returns the data in base64 encoded PNG format.
+ static void takeScreenshot(TakeScreenshotCallback callback);
+
+ // Makes a basic request to ML Service, triggering 1. ML Service
+ // daemon startup, and 2. the initial D-Bus -> Mojo IPC bootstrap.
+ // |callback|: Called when the operation has completed.
+ static void bootstrapMachineLearningService(VoidCallback callback);
};
};
diff --git a/chromium/chrome/common/extensions/api/bookmark_manager_private.json b/chromium/chrome/common/extensions/api/bookmark_manager_private.json
index 526b4e095c8..c65c190d9ce 100644
--- a/chromium/chrome/common/extensions/api/bookmark_manager_private.json
+++ b/chromium/chrome/common/extensions/api/bookmark_manager_private.json
@@ -149,6 +149,12 @@
"minItems": 1
},
{
+ "name": "dragNodeIndex",
+ "type": "integer",
+ "minimum": 0,
+ "description": "The index of the dragged node in |idList|"
+ },
+ {
"name": "isFromTouch",
"type": "boolean",
"description": "True if the drag was initiated from touch."
diff --git a/chromium/chrome/common/extensions/api/browser.idl b/chromium/chrome/common/extensions/api/browser.idl
deleted file mode 100644
index 971164bd068..00000000000
--- a/chromium/chrome/common/extensions/api/browser.idl
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2014 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.
-
-// Use the <code>chrome.browser</code> API to interact with the Chrome browser
-// associated with the current application and Chrome profile.
-namespace browser {
- // Options for the $(ref:openTab) function.
- dictionary OpenTabOptions {
- // The URL to navigate to when the new tab is initially opened.
- DOMString url;
- };
-
- callback Callback = void();
-
- interface Functions {
- // Opens a new tab in a browser window associated with the current
- // application and Chrome profile. If no browser window for the Chrome
- // profile is opened, a new one is opened prior to creating the new tab.
- // |options|: Configures how the tab should be opened.
- // |callback|: Called when the tab was successfully created, or failed to
- // be created. If failed, $(ref:runtime.lastError) will be set.
- static void openTab(OpenTabOptions options,
- optional Callback callback);
- };
-};
diff --git a/chromium/chrome/common/extensions/api/browser_action.json b/chromium/chrome/common/extensions/api/browser_action.json
index 77dd3e6afb1..8b2c59f0b35 100644
--- a/chromium/chrome/common/extensions/api/browser_action.json
+++ b/chromium/chrome/common/extensions/api/browser_action.json
@@ -5,7 +5,7 @@
[
{
"namespace": "browserAction",
- "description": "Use browser actions to put icons in the main Google Chrome toolbar, to the right of the address bar. In addition to its <a href='browserAction#icon'>icon</a>, a browser action can also have a <a href='browserAction#tooltip'>tooltip</a>, a <a href='browserAction#badge'>badge</a>, and a <a href='browserAction#popups'>popup</a>.",
+ "description": "Use browser actions to put icons in the main Google Chrome toolbar, to the right of the address bar. In addition to its <a href='browserAction#icon'>icon</a>, a browser action can have a <a href='browserAction#tooltip'>tooltip</a>, a <a href='browserAction#badge'>badge</a>, and a <a href='browserAction#popups'>popup</a>.",
"types": [
{
"id": "ColorArray",
@@ -23,14 +23,14 @@
"type": "object",
"isInstanceOf": "ImageData",
"additionalProperties": { "type": "any" },
- "description": "Pixel data for an image. Must be an ImageData object (for example, from a <code>canvas</code> element)."
+ "description": "Pixel data for an image. Must be an ImageData object; for example, from a <code>canvas</code> element."
}
],
"functions": [
{
"name": "setTitle",
"type": "function",
- "description": "Sets the title of the browser action. This shows up in the tooltip.",
+ "description": "Sets the title of the browser action. This title appears in the tooltip.",
"parameters": [
{
"name": "details",
@@ -62,7 +62,7 @@
"tabId": {
"type": "integer",
"optional": true,
- "description": "Specify the tab to get the title from. If no tab is specified, the non-tab-specific title is returned."
+ "description": "The tab to get the title from. If no tab is specified, the default title is returned."
}
}
},
@@ -81,7 +81,7 @@
{
"name": "setIcon",
"type": "function",
- "description": "Sets the icon for the browser action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the <b>path</b> or the <b>imageData</b> property must be specified.",
+ "description": "Sets the icon for the browser action. The icon can be specified as the path to an image file, as the pixel data from a canvas element, or as a dictionary of one of those. Either the <code>path</code> or the <code>imageData</code> property must be specified.",
"parameters": [
{
"name": "details",
@@ -96,7 +96,7 @@
}
],
"optional": true,
- "description": "Either an ImageData object or a dictionary {size -> ImageData} representing icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals <code>scale</code>, then image with size <code>scale</code> * n will be selected, where n is the size of the icon in the UI. At least one image must be specified. Note that 'details.imageData = foo' is equivalent to 'details.imageData = {'16': foo}'"
+ "description": "Either an ImageData object or a dictionary {size -> ImageData} representing an icon to be set. If the icon is specified as a dictionary, the image used is chosen depending on the screen's pixel density. If the number of image pixels that fit into one screen space unit equals <code>scale</code>, then an image with size <code>scale</code> * n is selected, where <i>n</i> is the size of the icon in the UI. At least one image must be specified. Note that 'details.imageData = foo' is equivalent to 'details.imageData = {'16': foo}'"
},
"path": {
"choices": [
@@ -107,7 +107,7 @@
}
],
"optional": true,
- "description": "Either a relative image path or a dictionary {size -> relative image path} pointing to icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals <code>scale</code>, then image with size <code>scale</code> * n will be selected, where n is the size of the icon in the UI. At least one image must be specified. Note that 'details.path = foo' is equivalent to 'details.path = {'16': foo}'"
+ "description": "Either a relative image path or a dictionary {size -> relative image path} pointing to an icon to be set. If the icon is specified as a dictionary, the image used is chosen depending on the screen's pixel density. If the number of image pixels that fit into one screen space unit equals <code>scale</code>, then an image with size <code>scale</code> * n is selected, where <i>n</i> is the size of the icon in the UI. At least one image must be specified. Note that 'details.path = foo' is equivalent to 'details.path = {'16': foo}'"
},
"tabId": {
"type": "integer",
@@ -127,7 +127,7 @@
{
"name": "setPopup",
"type": "function",
- "description": "Sets the html document to be opened as a popup when the user clicks on the browser action's icon.",
+ "description": "Sets the HTML document to be opened as a popup when the user clicks the browser action icon.",
"parameters": [
{
"name": "details",
@@ -141,7 +141,7 @@
},
"popup": {
"type": "string",
- "description": "The html file to show in a popup. If set to the empty string (''), no popup is shown."
+ "description": "The HTML file to show in a popup. If set to the empty string (''), no popup is shown."
}
}
},
@@ -151,7 +151,7 @@
{
"name": "getPopup",
"type": "function",
- "description": "Gets the html document set as the popup for this browser action.",
+ "description": "Gets the HTML document that is set as the popup for this browser action.",
"parameters": [
{
"name": "details",
@@ -160,7 +160,7 @@
"tabId": {
"type": "integer",
"optional": true,
- "description": "Specify the tab to get the popup from. If no tab is specified, the non-tab-specific popup is returned."
+ "description": "The tab to get the popup from. If no tab is specified, the non-tab-specific popup is returned."
}
}
},
@@ -187,7 +187,7 @@
"properties": {
"text": {
"type": "string",
- "description": "Any number of characters can be passed, but only about four can fit in the space."
+ "description": "Any number of characters can be passed, but only about four can fit into the space."
},
"tabId": {
"type": "integer",
@@ -211,7 +211,7 @@
"tabId": {
"type": "integer",
"optional": true,
- "description": "Specify the tab to get the badge text from. If no tab is specified, the non-tab-specific badge text is returned."
+ "description": "The tab to get the badge text from. If no tab is specified, the non-tab-specific badge text is returned."
}
}
},
@@ -237,7 +237,7 @@
"type": "object",
"properties": {
"color": {
- "description": "An array of four integers in the range [0,255] that make up the RGBA color of the badge. Can also be a string with a CSS value, red being <code>#FF0000</code> or <code>#F00</code>. Renders colors at full opacity.",
+ "description": "An array of four integers in the range 0-255 that make up the RGBA color of the badge. Can also be a string with a CSS hex color value; for example, <code>#FF0000</code> or <code>#F00</code> (red). Renders colors at full opacity.",
"choices": [
{"type": "string"},
{"$ref": "ColorArray"}
@@ -265,7 +265,7 @@
"tabId": {
"type": "integer",
"optional": true,
- "description": "Specify the tab to get the badge background color from. If no tab is specified, the non-tab-specific badge background color is returned."
+ "description": "The tab to get the badge background color from. If no tab is specified, the non-tab-specific badge background color is returned."
}
}
},
@@ -284,14 +284,14 @@
{
"name": "enable",
"type": "function",
- "description": "Enables the browser action for a tab. By default, browser actions are enabled.",
+ "description": "Enables the browser action for a tab. Defaults to enabled.",
"parameters": [
{
"type": "integer",
"optional": true,
"name": "tabId",
"minimum": 0,
- "description": "The id of the tab for which you want to modify the browser action."
+ "description": "The ID of the tab for which to modify the browser action."
},
{"type": "function", "name": "callback", "parameters": [], "optional": true}
]
@@ -306,7 +306,7 @@
"optional": true,
"name": "tabId",
"minimum": 0,
- "description": "The id of the tab for which you want to modify the browser action."
+ "description": "The ID of the tab for which to modify the browser action."
},
{"type": "function", "name": "callback", "parameters": [], "optional": true}
]
@@ -337,7 +337,7 @@
{
"name": "onClicked",
"type": "function",
- "description": "Fired when a browser action icon is clicked. This event will not fire if the browser action has a popup.",
+ "description": "Fired when a browser action icon is clicked. Does not fire if the browser action has a popup.",
"parameters": [
{
"name": "tab",
diff --git a/chromium/chrome/common/extensions/api/commands/commands_manifest_unittest.cc b/chromium/chrome/common/extensions/api/commands/commands_manifest_unittest.cc
index c5f156d8b56..12fde8b4099 100644
--- a/chromium/chrome/common/extensions/api/commands/commands_manifest_unittest.cc
+++ b/chromium/chrome/common/extensions/api/commands/commands_manifest_unittest.cc
@@ -41,7 +41,7 @@ TEST_F(CommandsManifestTest, CommandManifestSimple) {
const CommandMap* commands = CommandsInfo::GetNamedCommands(extension.get());
ASSERT_TRUE(commands);
ASSERT_EQ(1u, commands->size());
- CommandMap::const_iterator iter = commands->begin();
+ auto iter = commands->begin();
ASSERT_TRUE(commands->end() != iter);
const Command* named_command = &(*iter).second;
ASSERT_STREQ("feature1", named_command->command_name().c_str());
diff --git a/chromium/chrome/common/extensions/api/common_extension_api_unittest.cc b/chromium/chrome/common/extensions/api/common_extension_api_unittest.cc
index a37895e4a63..5e95e482e40 100644
--- a/chromium/chrome/common/extensions/api/common_extension_api_unittest.cc
+++ b/chromium/chrome/common/extensions/api/common_extension_api_unittest.cc
@@ -429,8 +429,7 @@ scoped_refptr<Extension> CreateExtensionWithPermissions(
manifest.SetInteger("manifest_version", 2);
{
std::unique_ptr<base::ListValue> permissions_list(new base::ListValue());
- for (std::set<std::string>::const_iterator i = permissions.begin();
- i != permissions.end(); ++i) {
+ for (auto i = permissions.begin(); i != permissions.end(); ++i) {
permissions_list->AppendString(*i);
}
manifest.Set("permissions", std::move(permissions_list));
@@ -542,8 +541,7 @@ scoped_refptr<Extension> CreatePackagedAppWithPermissions(
values.Set(manifest_keys::kApp, std::move(app));
{
auto permissions_list = std::make_unique<base::ListValue>();
- for (std::set<std::string>::const_iterator i = permissions.begin();
- i != permissions.end(); ++i) {
+ for (auto i = permissions.begin(); i != permissions.end(); ++i) {
permissions_list->AppendString(*i);
}
values.Set("permissions", std::move(permissions_list));
@@ -916,7 +914,7 @@ TEST(ExtensionAPITest, NoPermissions) {
std::unique_ptr<ExtensionAPI> extension_api(
ExtensionAPI::CreateWithDefaultConfiguration());
- scoped_refptr<Extension> extension = ExtensionBuilder("Test").Build();
+ scoped_refptr<const Extension> extension = ExtensionBuilder("Test").Build();
for (size_t i = 0; i < arraysize(kTests); ++i) {
EXPECT_EQ(kTests[i].expect_success,
@@ -935,7 +933,7 @@ TEST(ExtensionAPITest, ManifestKeys) {
std::unique_ptr<ExtensionAPI> extension_api(
ExtensionAPI::CreateWithDefaultConfiguration());
- scoped_refptr<Extension> extension =
+ scoped_refptr<const Extension> extension =
ExtensionBuilder("Test")
.SetAction(ExtensionBuilder::ActionType::BROWSER_ACTION)
.Build();
diff --git a/chromium/chrome/common/extensions/api/context_menus.json b/chromium/chrome/common/extensions/api/context_menus.json
index e17331849c2..fe2f7a1d674 100644
--- a/chromium/chrome/common/extensions/api/context_menus.json
+++ b/chromium/chrome/common/extensions/api/context_menus.json
@@ -17,7 +17,7 @@
"id": "ContextType",
"type": "string",
"enum": ["all", "page", "frame", "selection", "link", "editable", "image", "video", "audio", "launcher", "browser_action", "page_action"],
- "description": "The different contexts a menu can appear in. Specifying 'all' is equivalent to the combination of all other contexts except for 'launcher'. The 'launcher' context is only supported by apps and is used to add menu items to the context menu that appears when clicking on the app icon in the launcher/taskbar/dock/etc. Different platforms might put limitations on what is actually supported in a launcher context menu."
+ "description": "The different contexts a menu can appear in. Specifying 'all' is equivalent to the combination of all other contexts except for 'launcher'. The 'launcher' context is only supported by apps and is used to add menu items to the context menu that appears when clicking the app icon in the launcher/taskbar/dock/etc. Different platforms might put limitations on what is actually supported in a launcher context menu."
},
{
"id": "ItemType",
@@ -30,7 +30,7 @@
{
"name": "create",
"type": "function",
- "description": "Creates a new context menu item. Note that if an error occurs during creation, you may not find out until the creation callback fires (the details will be in chrome.runtime.lastError).",
+ "description": "Creates a new context menu item. If an error occurs during creation, it may not be detected until the creation callback fires; details will be in <code>chrome.runtime.lastError</code>.",
"returns": {
"choices": [
{ "type": "integer" },
@@ -46,7 +46,7 @@
"type": {
"$ref": "ItemType",
"optional": true,
- "description": "The type of menu item. Defaults to 'normal' if not specified."
+ "description": "The type of menu item. Defaults to <code>normal</code>."
},
"id": {
"type": "string",
@@ -56,12 +56,12 @@
"title": {
"type": "string",
"optional": true,
- "description": "The text to be displayed in the item; this is <em>required</em> unless <code>type</code> is 'separator'. When the context is 'selection', you can use <code>%s</code> within the string to show the selected text. For example, if this parameter's value is \"Translate '%s' to Pig Latin\" and the user selects the word \"cool\", the context menu item for the selection is \"Translate 'cool' to Pig Latin\"."
+ "description": "The text to display in the item; this is <em>required</em> unless <code>type</code> is <code>separator</code>. When the context is <code>selection</code>, use <code>%s</code> within the string to show the selected text. For example, if this parameter's value is \"Translate '%s' to Pig Latin\" and the user selects the word \"cool\", the context menu item for the selection is \"Translate 'cool' to Pig Latin\"."
},
"checked": {
"type": "boolean",
"optional": true,
- "description": "The initial state of a checkbox or radio item: true for selected and false for unselected. Only one radio item can be selected at a time in a given group of radio items."
+ "description": "The initial state of a checkbox or radio button: <code>true</code> for selected, <code>false</code> for unselected. Only one radio button can be selected at a time in a given group."
},
"contexts": {
"type": "array",
@@ -70,7 +70,7 @@
},
"minItems": 1,
"optional": true,
- "description": "List of contexts this menu item will appear in. Defaults to ['page'] if not specified."
+ "description": "List of contexts this menu item will appear in. Defaults to <code>['page']</code>."
},
"visible": {
"type": "boolean",
@@ -80,7 +80,7 @@
"onclick": {
"type": "function",
"optional": true,
- "description": "A function that will be called back when the menu item is clicked. Event pages cannot use this; instead, they should register a listener for chrome.contextMenus.onClicked.",
+ "description": "A function that is called back when the menu item is clicked. Event pages cannot use this; instead, they should register a listener for $(ref:contextMenus.onClicked).",
"parameters": [
{
"name": "info",
@@ -90,7 +90,7 @@
{
"name": "tab",
"$ref": "tabs.Tab",
- "description": "The details of the tab where the click took place. Note: this parameter only present for extensions."
+ "description": "The details of the tab where the click took place. This parameter is not present for platform apps."
}
]
},
@@ -106,18 +106,18 @@
"type": "array",
"items": {"type": "string"},
"optional": true,
- "description": "Lets you restrict the item to apply only to documents whose URL matches one of the given patterns. (This applies to frames as well.) For details on the format of a pattern, see <a href='match_patterns'>Match Patterns</a>."
+ "description": "Restricts the item to apply only to documents or frames whose URL matches one of the given patterns. For details on pattern formats, see <a href='match_patterns'>Match Patterns</a>."
},
"targetUrlPatterns": {
"type": "array",
"items": {"type": "string"},
"optional": true,
- "description": "Similar to documentUrlPatterns, but lets you filter based on the src attribute of img/audio/video tags and the href of anchor tags."
+ "description": "Similar to <code>documentUrlPatterns</code>, filters based on the <code>src</code> attribute of <code>img</code>, <code>audio</code>, and <code>video</code> tags and the <code>href</code> attribute of <code>a</code> tags."
},
"enabled": {
"type": "boolean",
"optional": true,
- "description": "Whether this context menu item is enabled or disabled. Defaults to true."
+ "description": "Whether this context menu item is enabled or disabled. Defaults to <code>true</code>."
}
}
},
@@ -125,7 +125,7 @@
"type": "function",
"name": "callback",
"optional": true,
- "description": "Called when the item has been created in the browser. If there were any problems creating the item, details will be available in chrome.runtime.lastError.",
+ "description": "Called when the item has been created in the browser. If an error occurs during creation, details will be available in <code>chrome.runtime.lastError</code>.",
"parameters": []
}
]
@@ -146,7 +146,7 @@
{
"type": "object",
"name": "updateProperties",
- "description": "The properties to update. Accepts the same values as the create function.",
+ "description": "The properties to update. Accepts the same values as the $(ref:contextMenus.create) function.",
// We need to preserve null because we use it as an indication to clear the callback.
"preserveNull": true,
"properties": {
@@ -186,7 +186,7 @@
{
"name": "tab",
"$ref": "tabs.Tab",
- "description": "The details of the tab where the click took place. Note: this parameter only present for extensions."
+ "description": "The details of the tab where the click took place. This parameter is not present for platform apps."
}
]
},
@@ -196,7 +196,7 @@
{ "type": "string" }
],
"optional": true,
- "description": "Note: You cannot change an item to be a child of one of its own descendants."
+ "description": "The ID of the item to be made this item's parent. Note: You cannot set an item to become a child of its own descendant."
},
"documentUrlPatterns": {
"type": "array",
diff --git a/chromium/chrome/common/extensions/api/cryptotoken_private.idl b/chromium/chrome/common/extensions/api/cryptotoken_private.idl
index 0e4b70d9fd6..99c2e3f67a8 100644
--- a/chromium/chrome/common/extensions/api/cryptotoken_private.idl
+++ b/chromium/chrome/common/extensions/api/cryptotoken_private.idl
@@ -17,6 +17,8 @@ namespace cryptotokenPrivate {
// The AppId (see definition, above) that was used in the registration
// request and which has been authenticated by |canOriginAssertAppId|.
DOMString appId;
+ // The origin of the caller.
+ DOMString origin;
// Identifies the tab in which the registration is occuring so that any
// permissions prompt is correctly located.
long tabId;
diff --git a/chromium/chrome/common/extensions/api/declarative_content.json b/chromium/chrome/common/extensions/api/declarative_content.json
index 3c5d180f5ca..3e9e4f7c65f 100644
--- a/chromium/chrome/common/extensions/api/declarative_content.json
+++ b/chromium/chrome/common/extensions/api/declarative_content.json
@@ -38,17 +38,17 @@
{
"id": "PageStateMatcher",
"type": "object",
- "description": "Matches the state of a web page by various criteria.",
+ "description": "Matches the state of a web page based on various criteria.",
"properties": {
"pageUrl": {
"$ref": "events.UrlFilter",
- "description": "Matches if the condition of the UrlFilter are fulfilled for the top-level URL of the page.",
+ "description": "Matches if the conditions of the <code>UrlFilter</code> are fulfilled for the top-level URL of the page.",
"optional": true
},
"css": {
"type": "array",
"optional": true,
- "description": "Matches if all of the CSS selectors in the array match displayed elements in a frame with the same origin as the page's main frame. All selectors in this array must be <a href=\"http://www.w3.org/TR/selectors4/#compound\">compound selectors</a> to speed up matching. Note that listing hundreds of CSS selectors or CSS selectors that match hundreds of times per page can still slow down web sites.",
+ "description": "Matches if all of the CSS selectors in the array match displayed elements in a frame with the same origin as the page's main frame. All selectors in this array must be <a href=\"http://www.w3.org/TR/selectors4/#compound\">compound selectors</a> to speed up matching. Note: Listing hundreds of CSS selectors or listing CSS selectors that match hundreds of times per page can slow down web sites.",
// TODO(jyasskin): Figure out if we want to require all
// the selectors to match in the same frame, or allow several
// frames to contribute to a match.
@@ -73,7 +73,7 @@
},
{
"id": "ShowPageAction",
- "description": "Declarative event action that shows the extension's $(ref:pageAction page action) while the corresponding conditions are met. This action can be used without <a href=\"declare_permissions#host-permissions\">host permissions</a>, but the extension must have a page action. If the extension takes the <a href=\"activeTab.html\">activeTab</a> permission, a click on the page action will grant access to the active tab.",
+ "description": "Declarative event action that shows the extension's $(ref:pageAction page action) while the corresponding conditions are met. This action can be used without <a href=\"declare_permissions#host-permissions\">host permissions</a>, but the extension must have a page action. If the extension has the <a href=\"activeTab.html\">activeTab</a> permission, clicking the page action grants access to the active tab.",
"type": "object",
"properties": {
"instanceType": {
@@ -84,7 +84,7 @@
},
{
"id": "SetIcon",
- "description": "Declarative event action that sets the n-<abbr title=\"device-independent pixel\">dip</abbr> square icon for the extension's $(ref:pageAction page action) or $(ref:browserAction browser action) while the corresponding conditions are met. This action can be used without <a href=\"declare_permissions.html#host-permissions\">host permissions</a>, but the extension must have page or browser action.<p>Exactly one of <code>imageData</code> or <code>path</code> must be specified. Both are dictionaries mapping a number of pixels to an image representation. The image representation in <code>imageData</code> is an<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ImageData\">ImageData</a> object, for example from a <code>&lt;canvas></code> element, while the image representation in <code>path</code> is the path to an image file relative to the extension's manifest. If <code>scale</code> screen pixels fit into a device-independent pixel, the <code>scale * n</code> icon will be used. If that scale is missing, another image will be resized to the needed size.",
+ "description": "Declarative event action that sets the n-<abbr title=\"device-independent pixel\">dip</abbr> square icon for the extension's $(ref:pageAction page action) or $(ref:browserAction browser action) while the corresponding conditions are met. This action can be used without <a href=\"declare_permissions.html#host-permissions\">host permissions</a>, but the extension must have a page or browser action.<p>Exactly one of <code>imageData</code> or <code>path</code> must be specified. Both are dictionaries mapping a number of pixels to an image representation. The image representation in <code>imageData</code> is an <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/ImageData\">ImageData</a> object; for example, from a <code>canvas</code> element, while the image representation in <code>path</code> is the path to an image file relative to the extension's manifest. If <code>scale</code> screen pixels fit into a device-independent pixel, the <code>scale * n</code> icon is used. If that scale is missing, another image is resized to the required size.</p>",
"type": "object",
"properties": {
"instanceType": {
@@ -100,7 +100,7 @@
}
],
"optional": true,
- "description": "Either an ImageData object or a dictionary {size -> ImageData} representing icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals <code>scale</code>, then image with size <code>scale</code> * n will be selected, where n is the size of the icon in the UI. At least one image must be specified. Note that 'details.imageData = foo' is equivalent to 'details.imageData = {'16': foo}'"
+ "description": "Either an <code>ImageData</code> object or a dictionary {size -> ImageData} representing an icon to be set. If the icon is specified as a dictionary, the image used is chosen depending on the screen's pixel density. If the number of image pixels that fit into one screen space unit equals <code>scale</code>, then an image with size <code>scale * n</code> is selected, where <i>n</i> is the size of the icon in the UI. At least one image must be specified. Note that <code>details.imageData = foo</code> is equivalent to <code>details.imageData = {'16': foo}</code>."
}
// TODO: "path": {
// "choices": [
@@ -129,18 +129,18 @@
"js": {
"type": "array",
"optional": true,
- "description": "Names of Javascript files to be injected as a part of the content script.",
+ "description": "Names of JavaScript files to be injected as a part of the content script.",
"items": { "type": "string" }
},
"allFrames": {
"type": "boolean",
"optional": true,
- "description": "Whether the content script runs in all frames of the matching page, or only the top frame. Default is false."
+ "description": "Whether the content script runs in all frames of the matching page, or in only the top frame. Default is <code>false</code>."
},
"matchAboutBlank": {
"type": "boolean",
"optional": true,
- "description": "Whether to insert the content script on about:blank and about:srcdoc. Default is false."
+ "description": "Whether to insert the content script on <code>about:blank</code> and <code>about:srcdoc</code>. Default is <code>false</code>."
},
"instanceType": {
"$ref": "RequestContentScriptInstanceType",
diff --git a/chromium/chrome/common/extensions/api/developer_private.idl b/chromium/chrome/common/extensions/api/developer_private.idl
index 836318c27da..a63582e2b2b 100644
--- a/chromium/chrome/common/extensions/api/developer_private.idl
+++ b/chromium/chrome/common/extensions/api/developer_private.idl
@@ -194,16 +194,31 @@ namespace developerPrivate {
DOMString[] submessages;
};
+ dictionary SiteControl {
+ // The host pattern for the site.
+ DOMString host;
+ // Whether the pattern has been granted.
+ boolean granted;
+ };
+
+ dictionary SpecificSiteControls {
+ // True if |hosts| contains an all hosts like pattern.
+ boolean hasAllHosts;
+
+ // The site controls for all granted and requested patterns.
+ SiteControl[] hosts;
+ };
+
dictionary Permissions {
Permission[] simplePermissions;
- // Only populated for extensions affected by the runtime host
- // permissions feature.
+ // Only populated for extensions that can be affected by the runtime host
+ // permissions feature.The current host access.
HostAccess? hostAccess;
// Only populated for extensions affected by the runtime host
// permissions feature and |hostAccess| is equal to ON_SPECIFIC_SITES.
- DOMString[]? runtimeHostPermissions;
+ SpecificSiteControls? specificSiteControls;
};
dictionary ExtensionInfo {
diff --git a/chromium/chrome/common/extensions/api/easy_unlock_private.idl b/chromium/chrome/common/extensions/api/easy_unlock_private.idl
deleted file mode 100644
index c37aad6f67e..00000000000
--- a/chromium/chrome/common/extensions/api/easy_unlock_private.idl
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright 2014 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.
-
-// <code>chrome.easyUnlockPrivate</code> API that provides hooks to Chrome to
-// be used by Easy Unlock component app.
-namespace easyUnlockPrivate {
- enum ConnectionStatus {DISCONNECTED, IN_PROGRESS, CONNECTED};
-
- // A range.
- dictionary Range {
- long start;
- long end;
- };
-
- // A rectangle, in screen coordinates, measured in device-independent pixels.
- dictionary Rect {
- long left;
- long top;
- long width;
- long height;
- };
-
- // An empty callback used purely for signalling success vs. failure.
- callback EmptyCallback = void();
-
- // Callback for the getStrings() method.
- callback GetStringsCallback = void(object strings);
-
- // Callback for the |FindSetupConnectionCallback| method.
- // |connectionId|: The identifier of the connection found. To be used in
- // future calls refering to this connection.
- callback FindSetupConnectionCallback = void(long connectionId);
-
- interface Functions {
- // Gets localized strings required to render the API.
- //
- // |callback| : Called with a dictionary mapping names to resource strings.
- // TODO(isherman): This is essentially copied from identity_private.idl.
- // Perhaps this should be extracted to a common API instead?
- static void getStrings(GetStringsCallback callback);
-
- // Shows an error bubble with the given |message|, anchored to an edge of
- // the given |anchorRect| -- typically the right edge, but possibly a
- // different edge if there is not space for the bubble to the right of the
- // anchor rectangle. If the |link_range| is non-empty, renders the text
- // within the |message| that is contained in the |link_range| as a link with
- // the given |link_target| URL.
- static void showErrorBubble(DOMString message,
- Range link_range,
- DOMString link_target,
- Rect anchorRect);
-
- // Hides the currently visible error bubble, if there is one.
- static void hideErrorBubble();
-
- // Finds and connects the remote BLE device that is advertising:
- // |setupServiceUUID|. Returns when a connection is found or |timeOut|
- // seconds have elapsed.
- static void findSetupConnection(DOMString setupServiceUuid,
- long timeOut,
- FindSetupConnectionCallback callback);
-
- // Disconnects the connection with |connectionId|.
- static void setupConnectionDisconnect(long connectionId,
- optional EmptyCallback callback);
-
- // Sends |data| through the connection with |connnectionId|.
- static void setupConnectionSend(long connectionId,
- ArrayBuffer data,
- optional EmptyCallback callback);
- };
-
- interface Events {
- // Event fired when |connectionId| change status.
- static void onConnectionStatusChanged(long connectionId,
- ConnectionStatus oldStatus,
- ConnectionStatus newStatus);
-
- // Event fired when |connectionId| receives |data|.
- static void onDataReceived(long connectionId,
- ArrayBuffer data);
-
- // Event fired when |connectionId| sends |data|. |success| is true
- // if the send operation was successful.
- static void onSendCompleted(long connectionId,
- ArrayBuffer data,
- boolean success);
- };
-};
diff --git a/chromium/chrome/common/extensions/api/enterprise_reporting_private.idl b/chromium/chrome/common/extensions/api/enterprise_reporting_private.idl
index f8d158e3f18..ec0e63df8c7 100644
--- a/chromium/chrome/common/extensions/api/enterprise_reporting_private.idl
+++ b/chromium/chrome/common/extensions/api/enterprise_reporting_private.idl
@@ -9,6 +9,8 @@ namespace enterprise.reportingPrivate {
// finished.
callback DoneCallback = void();
+ // Invoked by <code>getDeviceId</code> to return the ID.
+ callback GetDeviceIdCallback = void(DOMString id);
interface Functions {
// Uploads the status of Chrome browser to the admin console by sending
@@ -16,6 +18,10 @@ namespace enterprise.reportingPrivate {
static void uploadChromeDesktopReport(
object report,
optional DoneCallback callback);
+
+ // Gets the identity of device that Chrome browser is running on. The ID is
+ // retrieved from the local device and used by the Google admin console.
+ static void getDeviceId(optional GetDeviceIdCallback callback);
};
};
diff --git a/chromium/chrome/common/extensions/api/file_browser_handlers/file_browser_handler.cc b/chromium/chrome/common/extensions/api/file_browser_handlers/file_browser_handler.cc
index 66d4ca82957..6a1c71c94e8 100644
--- a/chromium/chrome/common/extensions/api/file_browser_handlers/file_browser_handler.cc
+++ b/chromium/chrome/common/extensions/api/file_browser_handlers/file_browser_handler.cc
@@ -214,7 +214,7 @@ std::unique_ptr<FileBrowserHandler> LoadFileBrowserHandler(
// wildcards in URLPattern, so transform to what will match correctly.
filter.replace(0, 11, "chrome-extension://*/");
URLPattern pattern(URLPattern::SCHEME_EXTENSION);
- if (pattern.Parse(filter) != URLPattern::PARSE_SUCCESS) {
+ if (pattern.Parse(filter) != URLPattern::ParseResult::kSuccess) {
*error = extensions::ErrorUtils::FormatErrorMessageUTF16(
errors::kInvalidURLPatternError, filter);
return nullptr;
diff --git a/chromium/chrome/common/extensions/api/file_browser_handlers/file_browser_handler_manifest_unittest.cc b/chromium/chrome/common/extensions/api/file_browser_handlers/file_browser_handler_manifest_unittest.cc
index efa6c7ade34..84385e5ca63 100644
--- a/chromium/chrome/common/extensions/api/file_browser_handlers/file_browser_handler_manifest_unittest.cc
+++ b/chromium/chrome/common/extensions/api/file_browser_handlers/file_browser_handler_manifest_unittest.cc
@@ -60,12 +60,12 @@ TEST_F(FileBrowserHandlerManifestTest, GetHandlersRequiresPermission) {
extensions::ExtensionBuilder bad_app_builder;
bad_app_builder.SetManifest(std::move(bad_manifest_value));
- scoped_refptr<extensions::Extension> bad_app(bad_app_builder.Build());
+ scoped_refptr<const extensions::Extension> bad_app(bad_app_builder.Build());
EXPECT_FALSE(FileBrowserHandler::GetHandlers(bad_app.get()));
extensions::ExtensionBuilder good_app_builder;
good_app_builder.SetManifest(good_manifest_builder.Build());
- scoped_refptr<extensions::Extension> good_app(good_app_builder.Build());
+ scoped_refptr<const extensions::Extension> good_app(good_app_builder.Build());
EXPECT_TRUE(FileBrowserHandler::GetHandlers(good_app.get()));
}
diff --git a/chromium/chrome/common/extensions/api/file_manager_private.idl b/chromium/chrome/common/extensions/api/file_manager_private.idl
index 1b0e015e11f..f0f8029b8db 100644
--- a/chromium/chrome/common/extensions/api/file_manager_private.idl
+++ b/chromium/chrome/common/extensions/api/file_manager_private.idl
@@ -736,11 +736,22 @@ callback GetDirectorySizeCallback = void(double size);
// |entries| Recently modified entries.
callback GetRecentFilesCallback = void([instanceOf=Entry] object[] entries);
+// |entries| Entries shared with crostini container.
+callback GetCrostiniSharedPathsCallback =
+ void([instanceOf = Entry] object[] entries);
+
// |status| Result of starting the install
// |failure_reason| Reason for failure for a 'failed' status
callback InstallLinuxPackageCallback = void(
InstallLinuxPackageResponse response, DOMString failure_reason);
+// |result| String representing the detected coding system.
+callback DetectCharacterEncodingCallback = void(DOMString result);
+
+// |thumbnailDataUrl| A data URL for the thumbnail as a PNG; |thumbnailDataUrl|
+// is empty if no thumbnail was available.
+callback GetThumbnailCallback = void(DOMString thumbnailDataUrl);
+
interface Functions {
// Logout the current user for navigating to the re-authentication screen for
// the Google account.
@@ -1010,13 +1021,6 @@ interface Functions {
static void requestWebStoreAccessToken(
RequestWebStoreAccessTokenCallback callback);
- // Requests a share dialog url for the specified file.
- // |entry| The entry to share.
- // |callback|
- [nocompile]
- static void getShareUrl([instanceof=Entry] object entry,
- GetUrlCallback callback);
-
// Requests a download url to download the file contents.
// |entry| The entry to download.
// |callback|
@@ -1109,12 +1113,40 @@ interface Functions {
// Starts and mounts crostini container.
// |callback|
- static void mountCrostiniContainer(SimpleCallback callback);
+ static void mountCrostini(SimpleCallback callback);
+
+ // Shares directory with crostini container.
+ // |entry| Entry of the directory to share.
+ // |callback|
+ [nocompile]
+ static void sharePathWithCrostini(
+ [instanceof=DirectoryEntry] object entry, SimpleCallback callback);
+
+ // Returns list of paths shared with crostini container.
+ [nocompile]
+ static void getCrostiniSharedPaths(GetCrostiniSharedPathsCallback callback);
// Starts installation of a Linux package.
[nocompile]
static void installLinuxPackage([instanceof=Entry] object entry,
InstallLinuxPackageCallback callback);
+
+ // For a file in DriveFS, retrieves its thumbnail. If |cropToSquare| is true,
+ // returns a thumbnail appropriate for file list or grid views; otherwise,
+ // returns a thumbnail appropriate for quickview.
+ [nocompile]
+ static void getThumbnail([instanceOf=FileEntry] object entry,
+ boolean cropToSquare,
+ GetThumbnailCallback callback);
+
+ // Returns a guessed character encoding of a hex-encoded string. Every 2
+ // characters of |bytes| represent one byte by 2-digit hexadecimal number.
+ // The result is preferred MIME name of the detected character encoding
+ // system. It is slightly different from IANA name.
+ // See third_party/ced/src/util/encodings/encodings.cc
+ // Returns an empty string if failed.
+ static DOMString detectCharacterEncoding(DOMString bytes,
+ DetectCharacterEncodingCallback callback);
};
interface Events {
diff --git a/chromium/chrome/common/extensions/api/file_manager_private_internal.idl b/chromium/chrome/common/extensions/api/file_manager_private_internal.idl
index 5a53b4561bd..51236b33938 100644
--- a/chromium/chrome/common/extensions/api/file_manager_private_internal.idl
+++ b/chromium/chrome/common/extensions/api/file_manager_private_internal.idl
@@ -32,9 +32,11 @@ namespace fileManagerPrivateInternal {
callback ValidatePathNameLengthCallback = void(boolean result);
callback GetDirectorySizeCallback = void(double size);
callback GetRecentFilesCallback = void(EntryDescription[] entries);
+ callback GetCrostiniSharedPathsCallback = void(EntryDescription[] entries);
callback InstallLinuxPackageCallback =
void(fileManagerPrivate.InstallLinuxPackageResponse response,
optional DOMString failure_reason);
+ callback GetThumbnailCallback = void(DOMString ThumbnailDataUrl);
interface Functions {
static void resolveIsolatedEntries(DOMString[] urls,
@@ -72,7 +74,6 @@ namespace fileManagerPrivateInternal {
SimpleCallback callback);
static void getFileTasks(DOMString[] urls,
GetFileTasksCallback callback);
- static void getShareUrl(DOMString url, GetUrlCallback callback);
static void getDownloadUrl(DOMString url, GetUrlCallback callback);
static void requestDriveShare(DOMString url,
fileManagerPrivate.DriveShareType shareType,
@@ -100,7 +101,14 @@ namespace fileManagerPrivateInternal {
GetDirectorySizeCallback callback);
static void getRecentFiles(fileManagerPrivate.SourceRestriction restriction,
GetRecentFilesCallback callback);
+ static void sharePathWithCrostini(DOMString url,
+ SimpleCallback callback);
+ static void getCrostiniSharedPaths(
+ GetCrostiniSharedPathsCallback callback);
static void installLinuxPackage(DOMString url,
InstallLinuxPackageCallback callback);
+ static void getThumbnail(DOMString url,
+ boolean cropToSquare,
+ GetThumbnailCallback callback);
};
};
diff --git a/chromium/chrome/common/extensions/api/media_galleries.idl b/chromium/chrome/common/extensions/api/media_galleries.idl
deleted file mode 100644
index ebbb1f35db3..00000000000
--- a/chromium/chrome/common/extensions/api/media_galleries.idl
+++ /dev/null
@@ -1,255 +0,0 @@
-// Copyright (c) 2012 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.
-
-
-// Use the <code>chrome.mediaGalleries</code> API to access media files (audio,
-// images, video) from the user's local disks (with the user's consent).
-namespace mediaGalleries {
-
- [inline_doc] enum GalleryChangeType {
- // The contents of the gallery have changed.
- contents_changed,
- // The watch has been dropped because the device has been detached,
- // the gallery permission has been removed, or any other reason.
- watch_dropped
- };
-
- [inline_doc] enum GetMediaFileSystemsInteractivity {
- // Do not act interactively.
- no,
- // Ask the user to manage permitted media galleries.
- yes,
- // Ask the user to manage permitted galleries only if the return set would
- // otherwise be empty.
- if_needed
- };
-
- [inline_doc] enum GetMetadataType {
- // Retrieve the mime type, metadata tags, and attached images.
- all,
- // Retrieve only the mime type and the metadata tags.
- mimeTypeAndTags,
- // Retrieve only the mime type.
- mimeTypeOnly
- };
-
- [nodefine, inline_doc] enum ScanProgressType {
- // The scan started.
- start,
- // The scan was cancelled.
- cancel,
- // The scan finished but none of the result have been added,
- // addScanResults() has to be called to ask the user for permission.
- finish,
- // The scan encountered an error and could not proceed.
- error
- };
-
- [inline_doc] dictionary GalleryChangeDetails {
- // Type of change event.
- GalleryChangeType type;
-
- // Identifies the modified gallery.
- DOMString galleryId;
- };
-
- [inline_doc] dictionary MediaFileSystemsDetails {
- // Whether to prompt the user for permission to additional media galleries
- // before returning the permitted set. Default is silent. If the value
- // 'yes' is passed, or if the application has not been granted access to
- // any media galleries and the value 'if_needed' is passed, then the
- // media gallery configuration dialog will be displayed.
- GetMediaFileSystemsInteractivity? interactive;
- };
-
- [inline_doc] dictionary MediaMetadataOptions {
- // Specifies which subset of the metadata to retrieve. Defaults to 'all'
- // if the option is omitted.
- GetMetadataType? metadataType;
- };
-
- callback MediaFileSystemsCallback =
- void ([instanceOf=DOMFileSystem] object[] mediaFileSystems);
-
- callback AddUserFolderCallback =
- void ([instanceOf=DOMFileSystem] object[] mediaFileSystems,
- DOMString selectedFileSystemName);
-
- [nodefine] callback DropPermissionForMediaFileSystemCallback = void ();
-
- [inline_doc] dictionary MediaFileSystemMetadata {
- // The name of the file system.
- DOMString name;
-
- // A unique and persistent id for the media gallery.
- DOMString galleryId;
-
- // If the media gallery is on a removable device, a unique id for the
- // device while the device is online.
- DOMString? deviceId;
-
- // True if the media gallery is on a removable device.
- boolean isRemovable;
-
- // True if the device the media gallery is on was detected as a media
- // device. i.e. a PTP or MTP device, or a DCIM directory is present.
- boolean isMediaDevice;
-
- // True if the device is currently available.
- boolean isAvailable;
- };
-
- [nodefine, inline_doc] dictionary ScanProgressDetails {
- // The type of progress event, i.e. start, finish, etc.
- ScanProgressType type;
-
- // The number of Galleries found.
- long? galleryCount;
-
- // Appoximate number of media files found; some file types can be either
- // audio or video and are included in both counts.
- long? audioCount;
- long? imageCount;
- long? videoCount;
- };
-
- callback MediaFileSystemsMetadataCallback =
- void (MediaFileSystemMetadata[] metadata);
-
- dictionary StreamInfo {
- // Describes format of container or codec of stream, i.e. "mp3", "h264".
- DOMString type;
-
- // An unfiltered string->string dictionary of tags for the stream.
- object tags;
- };
-
- dictionary MediaMetadata {
- // The browser sniffed mime type.
- DOMString mimeType;
-
- // Defined for video. In pixels.
- long? height;
- long? width;
-
- // Defined for audio and video. In seconds.
- double? duration;
-
- // Defined for video. In degrees.
- long? rotation;
-
- // Defined for audio and video.
- DOMString? album;
- DOMString? artist;
- DOMString? comment;
- DOMString? copyright;
- long? disc;
- DOMString? genre;
- DOMString? language;
- DOMString? title;
- long? track;
-
- // All the metadata in the media file. For formats with multiple streams,
- // stream order will be preserved. Container metadata is the first element.
- StreamInfo[] rawTags;
-
- // The images embedded in the media file's metadata. This is most often
- // used for album art or video thumbnails.
- [instanceOf=Blob] object[] attachedImages;
- };
-
- callback MediaMetadataCallback = void (MediaMetadata metadata);
-
- // A dictionary that describes the add gallery watch request results.
- dictionary AddGalleryWatchResult {
- DOMString galleryId;
- boolean success;
- };
-
- callback AddGalleryWatchCallback = void (AddGalleryWatchResult result);
- [nodefine] callback GetAllGalleryWatchCallback =
- void (DOMString[] galleryIds);
-
- interface Functions {
- // Get the media galleries configured in this user agent. If none are
- // configured or available, the callback will receive an empty array.
- static void getMediaFileSystems(optional MediaFileSystemsDetails details,
- MediaFileSystemsCallback callback);
-
- // Present a directory picker to the user and add the selected directory
- // as a gallery. If the user cancels the picker, selectedFileSystemName
- // will be empty.
- // A user gesture is required for the dialog to display. Without a user
- // gesture, the callback will run as though the user canceled.
- static void addUserSelectedFolder(AddUserFolderCallback callback);
-
- // Give up access to a given media gallery.
- [nodefine, deprecated="The user can manually drop access to galleries
- via the permissions dialog."]
- static void dropPermissionForMediaFileSystem(
- DOMString galleryId,
- optional DropPermissionForMediaFileSystemCallback callback);
-
- // Start a scan of the user's hard disks for directories containing media.
- // The scan may take a long time so progress and completion is communicated
- // by events. No permission is granted as a result of the scan, see
- // addScanResults.
- [nodefine, deprecated="The mediaGalleries API no longer supports scanning."]
- static void startMediaScan();
-
- // Cancel any pending media scan. Well behaved apps should provide a way
- // for the user to cancel scans they start.
- [nodefine, deprecated="The mediaGalleries API no longer supports scanning."]
- static void cancelMediaScan();
-
- // Show the user the scan results and let them add any or all of them as
- // galleries. This should be used after the 'finish' onScanProgress()
- // event has happened. All galleries the app has access to are returned, not
- // just the newly added galleries.
- [nodefine, deprecated="The mediaGalleries API no longer supports scanning."]
- static void addScanResults(MediaFileSystemsCallback callback);
-
- // Get metadata about a specific media file system.
- [nocompile] static MediaFileSystemMetadata getMediaFileSystemMetadata(
- [instanceOf=DOMFileSystem] object mediaFileSystem);
-
- // Get metadata for all available media galleries.
- [nodefine, deprecated="Use getMediaFileSystemMetadata instead."]
- static void getAllMediaFileSystemMetadata(
- MediaFileSystemsMetadataCallback callback);
-
- // Gets the media-specific metadata for a media file. This should work
- // for files in media galleries as well as other DOM filesystems.
- static void getMetadata([instanceOf=Blob] object mediaFile,
- optional MediaMetadataOptions options,
- MediaMetadataCallback callback);
-
- // Adds a gallery watch for the gallery with the specified gallery ID.
- // The given callback is then fired with a success or failure result.
- static void addGalleryWatch(DOMString galleryId,
- AddGalleryWatchCallback callback);
-
- // Removes a gallery watch for the gallery with the specified gallery ID.
- static void removeGalleryWatch(DOMString galleryId);
-
- // Notifies which galleries are being watched via the given callback.
- [nodefine, deprecated="Applications should store their own gallery watches
- as they are added."]
- static void getAllGalleryWatch(GetAllGalleryWatchCallback callback);
-
- // Removes all gallery watches.
- [nodefine, deprecated="Use removeGalleryWatch instead."]
- static void removeAllGalleryWatch();
- };
-
- interface Events {
- // Fired when a media gallery is changed or a gallery watch is dropped.
- static void onGalleryChanged(GalleryChangeDetails details);
-
- // The pending media scan has changed state. See details for more
- // information.
- [nodefine, deprecated="The mediaGalleries API no longer supports scanning."]
- static void onScanProgress(ScanProgressDetails details);
- };
-};
diff --git a/chromium/chrome/common/extensions/api/music_manager_private.idl b/chromium/chrome/common/extensions/api/music_manager_private.idl
deleted file mode 100644
index b6d13fba921..00000000000
--- a/chromium/chrome/common/extensions/api/music_manager_private.idl
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2013 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.
-
-// musicManagerPrivate.
-namespace musicManagerPrivate {
-
- callback GetDeviceIdCallback = void (DOMString device_id);
-
- interface Functions {
- // Returns an identifier stable across users and reboots.
- //
- // |callback| : Called with the stable identifier value.
- static void getDeviceId(GetDeviceIdCallback callback);
- };
-};
diff --git a/chromium/chrome/common/extensions/api/speech/tts_engine_manifest_handler.cc b/chromium/chrome/common/extensions/api/speech/tts_engine_manifest_handler.cc
index 029a5b29ea7..f947c4c86a9 100644
--- a/chromium/chrome/common/extensions/api/speech/tts_engine_manifest_handler.cc
+++ b/chromium/chrome/common/extensions/api/speech/tts_engine_manifest_handler.cc
@@ -60,20 +60,14 @@ bool TtsVoices::Parse(const base::ListValue* tts_voices,
return false;
}
}
- if (one_tts_voice->HasKey(keys::kTtsVoicesGender)) {
- if (!added_gender_warning) {
- extension->AddInstallWarning(
- InstallWarning(errors::kTtsGenderIsDeprecated));
- // No need to add a warning for each voice, that's noisy.
- added_gender_warning = true;
- }
- if (!one_tts_voice->GetString(
- keys::kTtsVoicesGender, &voice_data.gender) ||
- (voice_data.gender != keys::kTtsGenderMale &&
- voice_data.gender != keys::kTtsGenderFemale)) {
- *error = base::ASCIIToUTF16(errors::kInvalidTtsVoicesGender);
- return false;
- }
+ // TODO(katie): After M73, consider deprecating this installation warning,
+ // since the warning landed in M70 and gender was deprecated in M71.
+ if (one_tts_voice->HasKey(keys::kTtsVoicesGender) &&
+ !added_gender_warning) {
+ extension->AddInstallWarning(
+ InstallWarning(errors::kTtsGenderIsDeprecated));
+ // No need to add a warning for each voice, that's noisy.
+ added_gender_warning = true;
}
if (one_tts_voice->HasKey(keys::kTtsVoicesRemote)) {
if (!one_tts_voice->GetBoolean(
diff --git a/chromium/chrome/common/extensions/api/storage/storage_schema_manifest_handler.cc b/chromium/chrome/common/extensions/api/storage/storage_schema_manifest_handler.cc
index b4981aa51b7..d8bac56f3a4 100644
--- a/chromium/chrome/common/extensions/api/storage/storage_schema_manifest_handler.cc
+++ b/chromium/chrome/common/extensions/api/storage/storage_schema_manifest_handler.cc
@@ -45,13 +45,14 @@ policy::Schema StorageSchemaManifestHandler::GetSchema(
}
file = extension->path().AppendASCII(path);
if (!base::PathExists(file)) {
- *error = base::StringPrintf("File does not exist: %" PRIsFP,
+ *error = base::StringPrintf("File does not exist: %" PRFilePath,
file.value().c_str());
return policy::Schema();
}
std::string content;
if (!base::ReadFileToString(file, &content)) {
- *error = base::StringPrintf("Can't read %" PRIsFP, file.value().c_str());
+ *error =
+ base::StringPrintf("Can't read %" PRFilePath, file.value().c_str());
return policy::Schema();
}
return policy::Schema::Parse(content, error);
diff --git a/chromium/chrome/common/extensions/api/streams_private.idl b/chromium/chrome/common/extensions/api/streams_private.idl
deleted file mode 100644
index ed24130849d..00000000000
--- a/chromium/chrome/common/extensions/api/streams_private.idl
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2014 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.
-
-// Streams Private API.
-namespace streamsPrivate {
- dictionary StreamInfo {
- // The MIME type of the intercepted URL request.
- DOMString mimeType;
-
- // The original URL that was intercepted.
- DOMString originalUrl;
-
- // The URL that the stream can be read from.
- DOMString streamUrl;
-
- // The ID of the tab that opened the stream. If the stream is not opened in
- // a tab, it will be -1.
- long tabId;
-
- // The ID of the view that will render the stream, if the viewer was opened
- // in a plugin.
- DOMString? viewId;
-
- // The amount of data the Stream should contain, if known. If there is no
- // information on the size it will be -1.
- long expectedContentSize;
-
- // The HTTP response headers of the intercepted request stored as a
- // dictionary mapping header name to header value. If a header name appears
- // multiple times, the header values are merged in the dictionary and
- // separated by a ", ".
- object responseHeaders;
-
- // Whether the stream is embedded within another document.
- boolean embedded;
- };
-
- callback AbortCallback = void ();
-
- interface Functions {
- // Abort the URL request on the given stream.
- // |streamUrl| : The URL of the stream to abort.
- // |callback| : Called when the stream URL is guaranteed to be invalid. The
- // underlying URL request may not yet have been aborted when this is run.
- static void abort(DOMString streamUrl,
- optional AbortCallback callback);
- };
-
- interface Events {
- // Fired when a resource is fetched which matches a mime type handled by
- // this extension. The resource request is cancelled, and the extension is
- // expected to handle the request. The event is restricted to a small number
- // of white-listed extensions.
- static void onExecuteMimeTypeHandler(StreamInfo streamInfo);
- };
-};
diff --git a/chromium/chrome/common/extensions/api/sync_file_system.idl b/chromium/chrome/common/extensions/api/sync_file_system.idl
deleted file mode 100644
index 711625661e9..00000000000
--- a/chromium/chrome/common/extensions/api/sync_file_system.idl
+++ /dev/null
@@ -1,199 +0,0 @@
-// Copyright (c) 2012 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.
-
-// Use the <code>chrome.syncFileSystem</code> API to save and synchronize data
-// on Google Drive. This API is NOT for accessing arbitrary user docs stored in
-// Google Drive. It provides app-specific syncable storage for offline and
-// caching usage so that the same data can be available across different
-// clients. Read <a href="app_storage.html">Manage Data</a> for more on using
-// this API.
-namespace syncFileSystem {
- enum SyncAction {
- added, updated, deleted
- };
-
- enum ServiceStatus {
- // The sync service is being initialized (e.g. restoring data from the
- // database, checking connectivity and authenticating to the service etc).
- initializing,
-
- // The sync service is up and running.
- running,
-
- // The sync service is not synchronizing files because the remote service
- // needs to be authenticated by the user to proceed.
- authentication_required,
-
- // The sync service is not synchronizing files because the remote service
- // is (temporarily) unavailable due to some recoverable errors, e.g.
- // network is offline, the remote service is down or not
- // reachable etc. More details should be given by |description| parameter
- // in OnServiceInfoUpdated (which could contain service-specific details).
- temporary_unavailable,
-
- // The sync service is disabled and the content will never sync.
- // (E.g. this could happen when the user has no account on
- // the remote service or the sync service has had an unrecoverable
- // error.)
- disabled
- };
-
- enum FileStatus {
- // Not conflicting and has no pending local changes.
- synced,
-
- // Has one or more pending local changes that haven't been synchronized.
- pending,
-
- // File conflicts with remote version and must be resolved manually.
- conflicting
- };
-
- enum SyncDirection {
- local_to_remote, remote_to_local
- };
-
- enum ConflictResolutionPolicy {
- last_write_win, manual
- };
-
- dictionary FileInfo {
- // <code>fileEntry</code> for the target file whose status has changed.
- // Contains name and path information of synchronized file.
- // On file deletion,
- // <code>fileEntry</code> information will still be available
- // but file will no longer exist.
- [instanceOf=Entry] object fileEntry;
-
- // Resulting file status after $(ref:onFileStatusChanged) event.
- // The status value can be <code>'synced'</code>,
- // <code>'pending'</code> or <code>'conflicting'</code>.
- FileStatus status;
-
- // Sync action taken to fire $(ref:onFileStatusChanged) event.
- // The action value can be
- // <code>'added'</code>, <code>'updated'</code> or <code>'deleted'</code>.
- // Only applies if status is <code>'synced'</code>.
- SyncAction? action;
-
- // Sync direction for the $(ref:onFileStatusChanged) event.
- // Sync direction value can be
- // <code>'local_to_remote'</code> or <code>'remote_to_local'</code>.
- // Only applies if status is <code>'synced'</code>.
- SyncDirection? direction;
- };
-
- dictionary FileStatusInfo {
- // One of the Entry's originally given to getFileStatuses.
- [instanceOf=Entry] object fileEntry;
-
- // The status value can be <code>'synced'</code>,
- // <code>'pending'</code> or <code>'conflicting'</code>.
- FileStatus status;
-
- // Optional error that is only returned if there was a problem retrieving
- // the FileStatus for the given file.
- DOMString? error;
- };
-
- dictionary StorageInfo {
- long usageBytes;
- long quotaBytes;
- };
-
- dictionary ServiceInfo {
- ServiceStatus state;
- DOMString description;
- };
-
- // A callback type for requestFileSystem.
- callback GetFileSystemCallback =
- void ([instanceOf=DOMFileSystem] object fileSystem);
-
- // A callback type for getUsageAndQuota.
- callback QuotaAndUsageCallback = void (StorageInfo info);
-
- // Returns true if operation was successful.
- callback DeleteFileSystemCallback = void (boolean result);
-
- // A callback type for getFileStatus.
- callback GetFileStatusCallback = void (FileStatus status);
-
- // A callback type for getFileStatuses.
- callback GetFileStatusesCallback = void (FileStatusInfo[] status);
-
- // A callback type for getServiceStatus.
- callback GetServiceStatusCallback = void (ServiceStatus status);
-
- // A callback type for getConflictResolutionPolicy.
- callback GetConflictResolutionPolicyCallback =
- void (ConflictResolutionPolicy policy);
-
- // A generic result callback to indicate success or failure.
- callback ResultCallback = void ();
-
- interface Functions {
- // Returns a syncable filesystem backed by Google Drive.
- // The returned <code>DOMFileSystem</code> instance can be operated on
- // in the same way as the Temporary and Persistant file systems (see
- // <a href="http://dev.w3.org/2009/dap/file-system/file-dir-sys.html">
- // http://dev.w3.org/2009/dap/file-system/file-dir-sys.html</a>).
- //
- // Calling this multiple times from
- // the same app will return the same handle to the same file system.
- //
- // Note this call can fail. For example, if the user is not signed in to
- // Chrome or if there is no network operation. To handle these errors it is
- // important chrome.runtime.lastError is checked in the callback.
- static void requestFileSystem(GetFileSystemCallback callback);
-
- // Sets the default conflict resolution policy
- // for the <code>'syncable'</code> file storage for the app.
- // By default it is set to <code>'last_write_win'</code>.
- // When conflict resolution policy is set to <code>'last_write_win'</code>
- // conflicts for existing files are automatically resolved next time
- // the file is updated.
- // |callback| can be optionally given to know if the request has
- // succeeded or not.
- static void setConflictResolutionPolicy(
- ConflictResolutionPolicy policy,
- optional ResultCallback callback);
-
- // Gets the current conflict resolution policy.
- static void getConflictResolutionPolicy(
- GetConflictResolutionPolicyCallback callback);
-
- // Returns the current usage and quota in bytes
- // for the <code>'syncable'</code> file storage for the app.
- static void getUsageAndQuota([instanceOf=DOMFileSystem] object fileSystem,
- QuotaAndUsageCallback callback);
-
- // Returns the $(ref:FileStatus) for the given <code>fileEntry</code>.
- // The status value can be <code>'synced'</code>,
- // <code>'pending'</code> or <code>'conflicting'</code>.
- // Note that <code>'conflicting'</code> state only happens when
- // the service's conflict resolution policy is set to <code>'manual'</code>.
- static void getFileStatus([instanceOf=Entry] object fileEntry,
- GetFileStatusCallback callback);
-
- // Returns each $(ref:FileStatus) for the given <code>fileEntry</code> array.
- // Typically called with the result from dirReader.readEntries().
- static void getFileStatuses(object[] fileEntries,
- GetFileStatusesCallback callback);
-
- // Returns the current sync backend status.
- static void getServiceStatus(GetServiceStatusCallback callback);
- };
-
- interface Events {
- // Fired when an error or other status change has happened in the
- // sync backend (for example, when the sync is temporarily disabled due to
- // network or authentication error).
- static void onServiceStatusChanged(ServiceInfo detail);
-
- // Fired when a file has been updated by the background sync service.
- static void onFileStatusChanged(FileInfo detail);
- };
-
-};
diff --git a/chromium/chrome/common/extensions/api/tab_capture.idl b/chromium/chrome/common/extensions/api/tab_capture.idl
index ae0f0b2507c..5dd0e6c25d2 100644
--- a/chromium/chrome/common/extensions/api/tab_capture.idl
+++ b/chromium/chrome/common/extensions/api/tab_capture.idl
@@ -42,11 +42,41 @@ namespace tabCapture {
[nodoc] DOMString? presentationId;
};
+ dictionary GetMediaStreamOptions {
+ // Optional tab id of the tab which will later invoke
+ // <code>getUserMedia()</code> to consume the stream. If not specified
+ // then the resulting stream can be used only by the calling extension.
+ // The stream can only be used by frames in the given tab whose security
+ // origin matches the consumber tab's origin. The tab's origin must be a
+ // secure origin, e.g. HTTPS.
+ long? consumerTabId;
+
+ // Optional tab id of the tab which will be captured. If not specified
+ // then the current active tab will be selected. Only tabs for which the
+ // extension has been granted the <code>activeTab</code> permission can be
+ // used as the target tab.
+ long? targetTabId;
+ };
+
callback GetTabMediaCallback =
void ([instanceOf=LocalMediaStream] object stream);
callback GetCapturedTabsCallback = void (CaptureInfo[] result);
+ // To assemble MediaConstraints with this |streamId|, source type must be
+ // assigned as 'tab'. For example:
+ // <code>
+ // const constraints = {
+ // mandatory: {
+ // chromeMediaSource: 'tab',
+ // chromeMediaSourceId: streamId
+ // }
+ // };
+ // navigator.getUserMedia({audio: constraints, video: constraints},
+ // successCallback, failCallback);
+ // </code>
+ callback GetMediaStreamIdCallback = void (DOMString streamId);
+
interface Functions {
// Captures the visible area of the currently active tab. Capture can
// only be started on the currently active tab after the extension has been
@@ -101,6 +131,19 @@ namespace tabCapture {
static void captureOffscreenTab(DOMString startUrl,
CaptureOptions options,
GetTabMediaCallback callback);
+
+ // Creates a stream ID to capture the target tab.
+ // Similar to chrome.tabCapture.capture() method, but returns a media
+ // stream ID, instead of a media stream, to the consumer tab.
+ //
+ // |GetMediaStreamOptions| : Options for the media stream id to retrieve.
+ // |callback| : Callback to invoke with the result. If successful, the
+ // result is an opaque string that can be passed to the
+ // <code>getUserMedia()</code> API to generate a media stream that
+ // corresponds to the target tab. The created <code>streamId</code> can
+ // only be used once and expires after a few seconds if it is not used.
+ static void getMediaStreamId(optional GetMediaStreamOptions options,
+ GetMediaStreamIdCallback callback);
};
interface Events {
diff --git a/chromium/chrome/common/extensions/api/tabs.json b/chromium/chrome/common/extensions/api/tabs.json
index 20526ffb5e3..158b4b7e8e1 100644
--- a/chromium/chrome/common/extensions/api/tabs.json
+++ b/chromium/chrome/common/extensions/api/tabs.json
@@ -11,19 +11,19 @@
"type": "string",
"description": "An event that caused a muted state change.",
"enum": [
- {"name": "user", "description": "A user input action has set/overridden the muted state."},
- {"name": "capture", "description": "Tab capture started, forcing a muted state change."},
+ {"name": "user", "description": "A user input action set the muted state."},
+ {"name": "capture", "description": "Tab capture was started, forcing a muted state change."},
{"name": "extension", "description": "An extension, identified by the extensionId field, set the muted state."}
]
},
{
"id": "MutedInfo",
"type": "object",
- "description": "Tab muted state and the reason for the last state change.",
+ "description": "The tab's muted state and the reason for the last state change.",
"properties": {
"muted": {
"type": "boolean",
- "description": "Whether the tab is prevented from playing sound (but hasn't necessarily recently produced sound). Equivalent to whether the muted audio indicator is showing."
+ "description": "Whether the tab is muted (prevented from playing sound). The tab may be muted even if it has not played or is not currently playing sound. Equivalent to whether the 'muted' audio indicator is showing."
},
"reason": {
"$ref": "MutedInfoReason",
@@ -41,19 +41,19 @@
"id": "Tab",
"type": "object",
"properties": {
- "id": {"type": "integer", "minimum": -1, "optional": true, "description": "The ID of the tab. Tab IDs are unique within a browser session. Under some circumstances a Tab may not be assigned an ID, for example when querying foreign tabs using the $(ref:sessions) API, in which case a session ID may be present. Tab ID can also be set to chrome.tabs.TAB_ID_NONE for apps and devtools windows."},
+ "id": {"type": "integer", "minimum": -1, "optional": true, "description": "The ID of the tab. Tab IDs are unique within a browser session. Under some circumstances a tab may not be assigned an ID; for example, when querying foreign tabs using the $(ref:sessions) API, in which case a session ID may be present. Tab ID can also be set to <code>chrome.tabs.TAB_ID_NONE</code> for apps and devtools windows."},
// TODO(kalman): Investigate how this is ending up as -1 (based on window type? a bug?) and whether it should be optional instead.
"index": {"type": "integer", "minimum": -1, "description": "The zero-based index of the tab within its window."},
- "windowId": {"type": "integer", "minimum": 0, "description": "The ID of the window the tab is contained within."},
+ "windowId": {"type": "integer", "minimum": 0, "description": "The ID of the window that contains the tab."},
"openerTabId": {"type": "integer", "minimum": 0, "optional": true, "description": "The ID of the tab that opened this tab, if any. This property is only present if the opener tab still exists."},
"selected": {"type": "boolean", "description": "Whether the tab is selected.", "deprecated": "Please use $(ref:tabs.Tab.highlighted)."},
"highlighted": {"type": "boolean", "description": "Whether the tab is highlighted."},
- "active": {"type": "boolean", "description": "Whether the tab is active in its window. (Does not necessarily mean the window is focused.)"},
+ "active": {"type": "boolean", "description": "Whether the tab is active in its window. Does not necessarily mean the window is focused."},
"pinned": {"type": "boolean", "description": "Whether the tab is pinned."},
- "audible": {"type": "boolean", "optional": true, "description": "Whether the tab has produced sound over the past couple of seconds (but it might not be heard if also muted). Equivalent to whether the speaker audio indicator is showing."},
- "discarded": {"type": "boolean", "description": "Whether the tab is discarded. A discarded tab is one whose content has been unloaded from memory, but is still visible in the tab strip. Its content gets reloaded the next time it's activated."},
+ "audible": {"type": "boolean", "optional": true, "description": "Whether the tab has produced sound over the past couple of seconds (but it might not be heard if also muted). Equivalent to whether the 'speaker audio' indicator is showing."},
+ "discarded": {"type": "boolean", "description": "Whether the tab is discarded. A discarded tab is one whose content has been unloaded from memory, but is still visible in the tab strip. Its content is reloaded the next time it is activated."},
"autoDiscardable": {"type": "boolean", "description": "Whether the tab can be discarded automatically by the browser when resources are low."},
- "mutedInfo": {"$ref": "MutedInfo", "optional": true, "description": "Current tab muted state and the reason for the last state change."},
+ "mutedInfo": {"$ref": "MutedInfo", "optional": true, "description": "The tab's muted state and the reason for the last state change."},
"url": {"type": "string", "optional": true, "description": "The URL the tab is displaying. This property is only present if the extension's manifest includes the <code>\"tabs\"</code> permission."},
"title": {"type": "string", "optional": true, "description": "The title of the tab. This property is only present if the extension's manifest includes the <code>\"tabs\"</code> permission."},
"favIconUrl": {"type": "string", "optional": true, "description": "The URL of the tab's favicon. This property is only present if the extension's manifest includes the <code>\"tabs\"</code> permission. It may also be an empty string if the tab is loading."},
@@ -61,13 +61,13 @@
"incognito": {"type": "boolean", "description": "Whether the tab is in an incognito window."},
"width": {"type": "integer", "optional": true, "description": "The width of the tab in pixels."},
"height": {"type": "integer", "optional": true, "description": "The height of the tab in pixels."},
- "sessionId": {"type": "string", "optional": true, "description": "The session ID used to uniquely identify a Tab obtained from the $(ref:sessions) API."}
+ "sessionId": {"type": "string", "optional": true, "description": "The session ID used to uniquely identify a tab obtained from the $(ref:sessions) API."}
}
},
{
"id": "ZoomSettingsMode",
"type": "string",
- "description": "Defines how zoom changes are handled, i.e. which entity is responsible for the actual scaling of the page; defaults to <code>automatic</code>.",
+ "description": "Defines how zoom changes are handled, i.e., which entity is responsible for the actual scaling of the page; defaults to <code>automatic</code>.",
"enum": [
{
"name": "automatic",
@@ -75,26 +75,26 @@
},
{
"name": "manual",
- "description": "Overrides the automatic handling of zoom changes. The <code>onZoomChange</code> event will still be dispatched, and it is the responsibility of the extension to listen for this event and manually scale the page. This mode does not support <code>per-origin</code> zooming, and will thus ignore the <code>scope</code> zoom setting and assume <code>per-tab</code>."
+ "description": "Overrides the automatic handling of zoom changes. The <code>onZoomChange</code> event will still be dispatched, and it is the extension's responsibility to listen for this event and manually scale the page. This mode does not support <code>per-origin</code> zooming, and thus ignores the <code>scope</code> zoom setting and assumes <code>per-tab</code>."
},
{
"name": "disabled",
- "description": "Disables all zooming in the tab. The tab will revert to the default zoom level, and all attempted zoom changes will be ignored."
+ "description": "Disables all zooming in the tab. The tab reverts to the default zoom level, and all attempted zoom changes are ignored."
}
]
},
{
"id": "ZoomSettingsScope",
"type": "string",
- "description": "Defines whether zoom changes will persist for the page's origin, or only take effect in this tab; defaults to <code>per-origin</code> when in <code>automatic</code> mode, and <code>per-tab</code> otherwise.",
+ "description": "Defines whether zoom changes persist for the page's origin, or only take effect in this tab; defaults to <code>per-origin</code> when in <code>automatic</code> mode, and <code>per-tab</code> otherwise.",
"enum": [
{
"name": "per-origin",
- "description": "Zoom changes will persist in the zoomed page's origin, i.e. all other tabs navigated to that same origin will be zoomed as well. Moreover, <code>per-origin</code> zoom changes are saved with the origin, meaning that when navigating to other pages in the same origin, they will all be zoomed to the same zoom factor. The <code>per-origin</code> scope is only available in the <code>automatic</code> mode."
+ "description": "Zoom changes persist in the zoomed page's origin, i.e., all other tabs navigated to that same origin are zoomed as well. Moreover, <code>per-origin</code> zoom changes are saved with the origin, meaning that when navigating to other pages in the same origin, they are all zoomed to the same zoom factor. The <code>per-origin</code> scope is only available in the <code>automatic</code> mode."
},
{
"name": "per-tab",
- "description": "Zoom changes only take effect in this tab, and zoom changes in other tabs will not affect the zooming of this tab. Also, <code>per-tab</code> zoom changes are reset on navigation; navigating a tab will always load pages with their <code>per-origin</code> zoom factors."
+ "description": "Zoom changes only take effect in this tab, and zoom changes in other tabs do not affect the zooming of this tab. Also, <code>per-tab</code> zoom changes are reset on navigation; navigating a tab always loads pages with their <code>per-origin</code> zoom factors."
}
]
},
@@ -105,12 +105,12 @@
"properties": {
"mode": {
"$ref": "ZoomSettingsMode",
- "description": "Defines how zoom changes are handled, i.e. which entity is responsible for the actual scaling of the page; defaults to <code>automatic</code>.",
+ "description": "Defines how zoom changes are handled, i.e., which entity is responsible for the actual scaling of the page; defaults to <code>automatic</code>.",
"optional": true
},
"scope": {
"$ref": "ZoomSettingsScope",
- "description": "Defines whether zoom changes will persist for the page's origin, or only take effect in this tab; defaults to <code>per-origin</code> when in <code>automatic</code> mode, and <code>per-tab</code> otherwise.",
+ "description": "Defines whether zoom changes persist for the page's origin, or only take effect in this tab; defaults to <code>per-origin</code> when in <code>automatic</code> mode, and <code>per-tab</code> otherwise.",
"optional": true
},
"defaultZoomFactor": {
@@ -136,7 +136,7 @@
"properties": {
"TAB_ID_NONE": {
"value": -1,
- "description": "An ID which represents the absence of a browser tab."
+ "description": "An ID that represents the absence of a browser tab."
}
},
"functions": [
@@ -162,7 +162,7 @@
{
"name": "getCurrent",
"type": "function",
- "description": "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).",
+ "description": "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).",
"parameters": [
{
"type": "function",
@@ -192,7 +192,7 @@
"type": "object",
"name": "connectInfo",
"properties": {
- "name": { "type": "string", "optional": true, "description": "Will be passed into onConnect for content scripts that are listening for the connection event." },
+ "name": { "type": "string", "optional": true, "description": "Is passed into onConnect for content scripts that are listening for the connection event." },
"frameId": {
"type": "integer",
"optional": true,
@@ -232,7 +232,7 @@
{
"name": "response",
"type": "any",
- "description": "The JSON response object sent by the handler of the request. If an error occurs while connecting to the specified tab, the callback will be called with no arguments and $(ref:runtime.lastError) will be set to the error message."
+ "description": "The JSON response object sent by the handler of the request. If an error occurs while connecting to the specified tab, the callback is called with no arguments and $(ref:runtime.lastError) is set to the error message."
}
]
}
@@ -275,7 +275,7 @@
{
"name": "response",
"type": "any",
- "description": "The JSON response object sent by the handler of the message. If an error occurs while connecting to the specified tab, the callback will be called with no arguments and $(ref:runtime.lastError) will be set to the error message."
+ "description": "The JSON response object sent by the handler of the message. If an error occurs while connecting to the specified tab, the callback is called with no arguments and $(ref:runtime.lastError) is set to the error message."
}
]
}
@@ -338,18 +338,18 @@
"type": "integer",
"minimum": -2,
"optional": true,
- "description": "The window to create the new tab in. Defaults to the <a href='windows#current-window'>current window</a>."
+ "description": "The window in which to create the new tab. Defaults to the <a href='windows#current-window'>current window</a>."
},
"index": {
"type": "integer",
"minimum": 0,
"optional": true,
- "description": "The position the tab should take in the window. The provided value will be clamped to between zero and the number of tabs in the window."
+ "description": "The position the tab should take in the window. The provided value is clamped to between zero and the number of tabs in the window."
},
"url": {
"type": "string",
"optional": true,
- "description": "The URL to navigate the tab to initially. Fully-qualified URLs must include a scheme (i.e. 'http://www.google.com', not 'www.google.com'). Relative URLs will be relative to the current page within the extension. Defaults to the New Tab Page."
+ "description": "The URL to initially navigate the tab to. Fully-qualified URLs must include a scheme (i.e., 'http://www.google.com', not 'www.google.com'). Relative URLs are relative to the current page within the extension. Defaults to the New Tab Page."
},
"active": {
"type": "boolean",
@@ -383,7 +383,7 @@
{
"name": "tab",
"$ref": "Tab",
- "description": "Details about the created tab. Will contain the ID of the new tab."
+ "description": "The created tab."
}
]
}
@@ -398,7 +398,7 @@
"type": "integer",
"name": "tabId",
"minimum": 0,
- "description": "The ID of the tab which is to be duplicated."
+ "description": "The ID of the tab to duplicate."
},
{
"type": "function",
@@ -408,7 +408,7 @@
{
"name": "tab",
"optional": true,
- "description": "Details about the duplicated tab. The $(ref:tabs.Tab) object doesn't contain <code>url</code>, <code>title</code> and <code>favIconUrl</code> if the <code>\"tabs\"</code> permission has not been requested.",
+ "description": "Details about the duplicated tab. The $(ref:tabs.Tab) object does not contain <code>url</code>, <code>title</code>, and <code>favIconUrl</code> if the <code>\"tabs\"</code> permission has not been requested.",
"$ref": "Tab"
}
]
@@ -452,7 +452,7 @@
"discarded": {
"type": "boolean",
"optional": true,
- "description": "Whether the tabs are discarded. A discarded tab is one whose content has been unloaded from memory, but is still visible in the tab strip. Its content gets reloaded the next time it's activated."
+ "description": "Whether the tabs are discarded. A discarded tab is one whose content has been unloaded from memory, but is still visible in the tab strip. Its content is reloaded the next time it is activated."
},
"autoDiscardable": {
"type": "boolean",
@@ -477,7 +477,7 @@
"title": {
"type": "string",
"optional": true,
- "description": "Match page titles against a pattern. Note that this property is ignored if the extension doesn't have the <code>\"tabs\"</code> permission."
+ "description": "Match page titles against a pattern. This property is ignored if the extension does not have the <code>\"tabs\"</code> permission."
},
"url": {
"choices": [
@@ -485,7 +485,7 @@
{"type": "array", "items": {"type": "string"}}
],
"optional": true,
- "description": "Match tabs against one or more <a href='match_patterns'>URL patterns</a>. Note that fragment identifiers are not matched. Note that this property is ignored if the extension doesn't have the <code>\"tabs\"</code> permission."
+ "description": "Match tabs against one or more <a href='match_patterns'>URL patterns</a>. Fragment identifiers are not matched. This property is ignored if the extension does not have the <code>\"tabs\"</code> permission."
},
"windowId": {
"type": "integer",
@@ -524,7 +524,7 @@
{
"name": "highlight",
"type": "function",
- "description": "Highlights the given tabs and focuses on the first of group. Will appear to do nothing if specified tab is currently active.",
+ "description": "Highlights the given tabs and focuses on the first of group. Will appear to do nothing if the specified tab is currently active.",
"parameters": [
{
"type": "object",
@@ -578,7 +578,7 @@
"url": {
"type": "string",
"optional": true,
- "description": "A URL to navigate the tab to."
+ "description": "A URL to navigate the tab to. JavaScript URLs are not supported; use $(ref:tabs.executeScript) instead."
},
"active": {
"type": "boolean",
@@ -628,7 +628,7 @@
"name": "tab",
"$ref": "Tab",
"optional": true,
- "description": "Details about the updated tab. The $(ref:tabs.Tab) object doesn't contain <code>url</code>, <code>title</code> and <code>favIconUrl</code> if the <code>\"tabs\"</code> permission has not been requested."
+ "description": "Details about the updated tab. The $(ref:tabs.Tab) object does not contain <code>url</code>, <code>title</code>, and <code>favIconUrl</code> if the <code>\"tabs\"</code> permission has not been requested."
}
]
}
@@ -641,7 +641,7 @@
"parameters": [
{
"name": "tabIds",
- "description": "The tab or list of tabs to move.",
+ "description": "The tab ID or list of tab IDs to move.",
"choices": [
{"type": "integer", "minimum": 0},
{"type": "array", "items": {"type": "integer", "minimum": 0}}
@@ -660,7 +660,7 @@
"index": {
"type": "integer",
"minimum": -1,
- "description": "The position to move the window to. -1 will place the tab at the end of the window."
+ "description": "The position to move the window to. Use <code>-1</code> to place the tab at the end of the window."
}
}
},
@@ -695,7 +695,7 @@
"bypassCache": {
"type": "boolean",
"optional": true,
- "description": "Whether using any local cache. Default is false."
+ "description": "Whether to bypass local caching. Defaults to <code>false</code>."
}
}
},
@@ -709,7 +709,7 @@
"parameters": [
{
"name": "tabIds",
- "description": "The tab or list of tabs to close.",
+ "description": "The tab ID or list of tab IDs to close.",
"choices": [
{"type": "integer", "minimum": 0},
{"type": "array", "items": {"type": "integer", "minimum": 0}}
@@ -737,7 +737,7 @@
{
"type": "string",
"name": "language",
- "description": "An ISO language code such as <code>en</code> or <code>fr</code>. For a complete list of languages supported by this method, see <a href='http://src.chromium.org/viewvc/chrome/trunk/src/third_party/cld/languages/internal/languages.cc'>kLanguageInfoTable</a>. The 2nd to 4th columns will be checked and the first non-NULL value will be returned except for Simplified Chinese for which zh-CN will be returned. For an unknown language, <code>und</code> will be returned."
+ "description": "An ISO language code such as <code>en</code> or <code>fr</code>. For a complete list of languages supported by this method, see <a href='http://src.chromium.org/viewvc/chrome/trunk/src/third_party/cld/languages/internal/languages.cc'>kLanguageInfoTable</a>. The second to fourth columns are checked and the first non-NULL value is returned, except for Simplified Chinese for which <code>zh-CN</code> is returned. For an unknown/undefined language, <code>und</code> is returned."
}
]
}
@@ -746,7 +746,7 @@
{
"name": "captureVisibleTab",
"type": "function",
- "description": "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 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.",
+ "description": "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.",
"parameters": [
{
"type": "integer",
@@ -762,7 +762,7 @@
},
{
"type": "function", "name": "callback", "parameters": [
- {"type": "string", "name": "dataUrl", "description": "A data URL which encodes an image of the visible area of the captured tab. May be assigned to the 'src' property of an HTML Image element for display."}
+ {"type": "string", "name": "dataUrl", "description": "A data URL that encodes an image of the visible area of the captured tab. May be assigned to the 'src' property of an HTML <code>img</code> element for display."}
]
}
]
@@ -830,7 +830,7 @@
{
"type": "number",
"name": "zoomFactor",
- "description": "The new zoom factor. Use a value of 0 here to set the tab to its current default zoom factor. Values greater than zero specify a (possibly non-default) zoom factor for the tab."
+ "description": "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."
},
{
"type": "function",
@@ -888,7 +888,7 @@
"type": "function",
"name": "callback",
"optional": true,
- "description": "Called after the zoom settings have been changed.",
+ "description": "Called after the zoom settings are changed.",
"parameters": []
}
]
@@ -929,7 +929,7 @@
"name": "tabId",
"optional": true,
"minimum": 0,
- "description": "The ID of the tab to be discarded. If specified, the tab will be discarded unless it's active or already discarded. If omitted, the browser will discard the least important tab. This can fail if no discardable tabs exist."
+ "description": "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."
},
{
"type": "function",
@@ -941,7 +941,7 @@
"name": "tab",
"$ref": "Tab",
"optional": true,
- "description": "Discarded tab if it was successfully discarded. Undefined otherwise."
+ "description": "The discarded tab, if it was successfully discarded; undefined otherwise."
}
]
}
@@ -952,7 +952,7 @@
{
"name": "onCreated",
"type": "function",
- "description": "Fired when a tab is created. Note that the tab's URL may not be set at the time this event fired, but you can listen to onUpdated events to be notified when a URL is set.",
+ "description": "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.",
"parameters": [
{
"$ref": "Tab",
@@ -1029,7 +1029,7 @@
{
"name": "onMoved",
"type": "function",
- "description": "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. This event is not fired when a tab is moved between windows. For that, see $(ref:tabs.onDetached).",
+ "description": "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).",
"parameters": [
{"type": "integer", "name": "tabId", "minimum": 0},
{
@@ -1072,7 +1072,7 @@
"name": "onActiveChanged",
"deprecated": "Please use $(ref:tabs.onActivated).",
"type": "function",
- "description": "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 to be notified when a URL is set.",
+ "description": "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.",
"parameters": [
{
"type": "integer",
@@ -1096,7 +1096,7 @@
{
"name": "onActivated",
"type": "function",
- "description": "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 to be notified when a URL is set.",
+ "description": "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.",
"parameters": [
{
"type": "object",
@@ -1168,7 +1168,7 @@
{
"name": "onDetached",
"type": "function",
- "description": "Fired when a tab is detached from a window, for example because it is being moved between windows.",
+ "description": "Fired when a tab is detached from a window; for example, because it was moved between windows.",
"parameters": [
{"type": "integer", "name": "tabId", "minimum": 0},
{
@@ -1184,7 +1184,7 @@
{
"name": "onAttached",
"type": "function",
- "description": "Fired when a tab is attached to a window, for example because it was moved between windows.",
+ "description": "Fired when a tab is attached to a window; for example, because it was moved between windows.",
"parameters": [
{"type": "integer", "name": "tabId", "minimum": 0},
{
@@ -1208,7 +1208,7 @@
"name": "removeInfo",
"properties": {
"windowId": {"type": "integer", "minimum": 0, "description": "The window whose tab is closed." },
- "isWindowClosing": {"type": "boolean", "description": "True when the tab is being closed because its window is being closed." }
+ "isWindowClosing": {"type": "boolean", "description": "True when the tab was closed because its parent window was closed." }
}
}
]
diff --git a/chromium/chrome/common/extensions/api/tts.json b/chromium/chrome/common/extensions/api/tts.json
index 589dfcf4d83..8928d14da92 100644
--- a/chromium/chrome/common/extensions/api/tts.json
+++ b/chromium/chrome/common/extensions/api/tts.json
@@ -15,7 +15,7 @@
{
"id": "VoiceGender",
"type": "string",
- "deprecated": "Gender is deprecated and will soon be ignored.",
+ "deprecated": "Gender is deprecated and is ignored.",
"enum": ["male", "female"]
},
{
@@ -69,7 +69,7 @@
"gender": {
"$ref": "VoiceGender",
"optional": true,
- "deprecated": "Gender is deprecated and will soon be ignored.",
+ "deprecated": "Gender is deprecated and will be ignored.",
"description": "This voice's gender."
},
"remote": {
@@ -131,7 +131,7 @@
"gender": {
"$ref": "VoiceGender",
"optional": true,
- "deprecated": "Gender is deprecated and will soon be ignored.",
+ "deprecated": "Gender is deprecated and will be ignored.",
"description": "Gender of voice for synthesized speech."
},
"rate": {
diff --git a/chromium/chrome/common/extensions/api/tts_engine.json b/chromium/chrome/common/extensions/api/tts_engine.json
index e4ee45e5d44..aa62c43e534 100644
--- a/chromium/chrome/common/extensions/api/tts_engine.json
+++ b/chromium/chrome/common/extensions/api/tts_engine.json
@@ -10,7 +10,7 @@
{
"id": "VoiceGender",
"type": "string",
- "deprecated": "Gender is deprecated and will soon be ignored.",
+ "deprecated": "Gender is deprecated and will be ignored.",
"enum": ["male", "female"]
}
],
@@ -75,7 +75,7 @@
"gender": {
"$ref": "VoiceGender",
"optional": true,
- "deprecated": "Gender is deprecated and will soon be ignored.",
+ "deprecated": "Gender is deprecated and will be ignored.",
"description": "Gender of voice for synthesized speech."
},
"rate": {
diff --git a/chromium/chrome/common/extensions/api/url_handlers/url_handlers_parser.cc b/chromium/chrome/common/extensions/api/url_handlers/url_handlers_parser.cc
index a9ad5a31b49..701ec1b88c7 100644
--- a/chromium/chrome/common/extensions/api/url_handlers/url_handlers_parser.cc
+++ b/chromium/chrome/common/extensions/api/url_handlers/url_handlers_parser.cc
@@ -128,8 +128,7 @@ bool ParseUrlHandler(const std::string& handler_id,
return false;
}
- for (base::ListValue::const_iterator it = manif_patterns->begin();
- it != manif_patterns->end(); ++it) {
+ for (auto it = manif_patterns->begin(); it != manif_patterns->end(); ++it) {
std::string str_pattern;
it->GetAsString(&str_pattern);
// TODO(sergeygs): Limit this to non-top-level domains.
@@ -137,7 +136,7 @@ bool ParseUrlHandler(const std::string& handler_id,
// URL patterns claimed here belong to the app's author verified sites.
URLPattern pattern(URLPattern::SCHEME_HTTP |
URLPattern::SCHEME_HTTPS);
- if (pattern.Parse(str_pattern) != URLPattern::PARSE_SUCCESS) {
+ if (pattern.Parse(str_pattern) != URLPattern::ParseResult::kSuccess) {
*error = ErrorUtils::FormatErrorMessageUTF16(
merrors::kInvalidURLHandlerPatternElement, handler_id);
return false;
diff --git a/chromium/chrome/common/extensions/api/webview_tag.json b/chromium/chrome/common/extensions/api/webview_tag.json
index 8171d780f3d..cf62c9d6eee 100644
--- a/chromium/chrome/common/extensions/api/webview_tag.json
+++ b/chromium/chrome/common/extensions/api/webview_tag.json
@@ -1120,6 +1120,35 @@
]
},
{
+ "name": "setSpatialNavigationEnabled",
+ "type": "function",
+ "description": "Sets spatial navigation state of the webview.",
+ "parameters": [
+ {
+ "type": "boolean",
+ "name": "enabled",
+ "description": "Spatial navigation state value."
+ }
+ ]
+ },
+ {
+ "name": "isSpatialNavigationEnabled",
+ "type": "function",
+ "description": "Queries whether spatial navigation is enabled for the webview.",
+ "parameters": [
+ {
+ "type": "function",
+ "name": "callback",
+ "parameters": [
+ {
+ "name": "enabled",
+ "type": "boolean"
+ }
+ ]
+ }
+ ]
+ },
+ {
"name": "terminate",
"type": "function",
"description": "Forcibly kills the guest web page's renderer process. This may affect multiple <code>webview</code> tags in the current app if they share the same process, but it will not affect <code>webview</code> tags in other apps.",
diff --git a/chromium/chrome/common/extensions/api/windows.json b/chromium/chrome/common/extensions/api/windows.json
index 6d2adadc432..3d3df03d9d0 100644
--- a/chromium/chrome/common/extensions/api/windows.json
+++ b/chromium/chrome/common/extensions/api/windows.json
@@ -13,13 +13,13 @@
{
"id": "WindowType",
"type": "string",
- "description": "The type of browser window this is. Under some circumstances a Window may not be assigned type property, for example when querying closed windows from the $(ref:sessions) API.",
+ "description": "The type of browser window this is. In some circumstances a window may not be assigned a <code>type</code> property; for example, when querying closed windows from the $(ref:sessions) API.",
"enum": [{
"name": "normal",
"description": "A normal browser window."
}, {
"name": "popup",
- "description": "A browser popup window."
+ "description": "A browser popup."
}, {
"name": "panel",
"description": "<i>Deprecated in this API.</i> A Chrome App panel-style window. Extensions can only see their own panel windows."
@@ -28,13 +28,13 @@
"description": "<i>Deprecated in this API.</i> A Chrome App window. Extensions can only see their app own windows."
}, {
"name": "devtools",
- "description": "A devtools window."
+ "description": "A Developer Tools window."
}]
},
{
"id": "WindowState",
"type": "string",
- "description": "The state of this browser window. Under some circumstances a Window may not be assigned state property, for example when querying closed windows from the $(ref:sessions) API.",
+ "description": "The state of this browser window. In some circumstances a window may not be assigned a <code>state</code> property; for example, when querying closed windows from the $(ref:sessions) API.",
// WARNING: These values are written to logs. New enum values can be
// added, but existing enums must never be renumbered or deleted and
// reused. If something needs to be removed, make sure to remove the
@@ -42,7 +42,7 @@
// valid, and make sure to mark it as obsolete in histograms.xml.
"enum": [{
"name": "normal",
- "description": "Normal window state (i.e. not minimized, maximized, or fullscreen)."
+ "description": "Normal window state (not minimized, maximized, or fullscreen)."
}, {
"name": "minimized",
"description": "Minimized window state."
@@ -58,19 +58,19 @@
}, {
"name": "locked-fullscreen",
"nodoc": true,
- "description": "Locked fullscreen window state. This fullscreen state cannot be exited by user action. It is available only to whitelisted extensions on Chrome OS."
+ "description": "Locked fullscreen window state. This fullscreen state cannot be exited by user action and is available only to allowlisted extensions on Chrome OS."
}]
},
{
"id": "Window",
"type": "object",
"properties": {
- "id": {"type": "integer", "optional": true, "minimum": 0, "description": "The ID of the window. Window IDs are unique within a browser session. Under some circumstances a Window may not be assigned an ID, for example when querying windows using the $(ref:sessions) API, in which case a session ID may be present."},
+ "id": {"type": "integer", "optional": true, "minimum": 0, "description": "The ID of the window. Window IDs are unique within a browser session. In some circumstances a window may not be assigned an <code>ID</code> property; for example, when querying windows using the $(ref:sessions) API, in which case a session ID may be present."},
"focused": {"type": "boolean", "description": "Whether the window is currently the focused window."},
- "top": {"type": "integer", "optional": true, "description": "The offset of the window from the top edge of the screen in pixels. Under some circumstances a Window may not be assigned top property, for example when querying closed windows from the $(ref:sessions) API."},
- "left": {"type": "integer", "optional": true, "description": "The offset of the window from the left edge of the screen in pixels. Under some circumstances a Window may not be assigned left property, for example when querying closed windows from the $(ref:sessions) API."},
- "width": {"type": "integer", "optional": true, "description": "The width of the window, including the frame, in pixels. Under some circumstances a Window may not be assigned width property, for example when querying closed windows from the $(ref:sessions) API."},
- "height": {"type": "integer", "optional": true, "description": "The height of the window, including the frame, in pixels. Under some circumstances a Window may not be assigned height property, for example when querying closed windows from the $(ref:sessions) API."},
+ "top": {"type": "integer", "optional": true, "description": "The offset of the window from the top edge of the screen in pixels. In some circumstances a window may not be assigned a <code>top</code> property; for example, when querying closed windows from the $(ref:sessions) API."},
+ "left": {"type": "integer", "optional": true, "description": "The offset of the window from the left edge of the screen in pixels. In some circumstances a window may not be assigned a <code>left</code> property; for example, when querying closed windows from the $(ref:sessions) API."},
+ "width": {"type": "integer", "optional": true, "description": "The width of the window, including the frame, in pixels. In some circumstances a window may not be assigned a <code>width</code> property; for example, when querying closed windows from the $(ref:sessions) API."},
+ "height": {"type": "integer", "optional": true, "description": "The height of the window, including the frame, in pixels. In some circumstances a window may not be assigned a <code>height</code> property; for example, when querying closed windows from the $(ref:sessions) API."},
"tabs": {"type": "array", "items": { "$ref": "tabs.Tab" }, "optional": true, "description": "Array of $(ref:tabs.Tab) objects representing the current tabs in the window."},
"incognito": {"type": "boolean", "description": "Whether the window is incognito."},
"type": {
@@ -84,13 +84,13 @@
"description": "The state of this browser window."
},
"alwaysOnTop": {"type": "boolean", "description": "Whether the window is set to be always on top."},
- "sessionId": {"type": "string", "optional": true, "description": "The session ID used to uniquely identify a Window obtained from the $(ref:sessions) API."}
+ "sessionId": {"type": "string", "optional": true, "description": "The session ID used to uniquely identify a window, obtained from the $(ref:sessions) API."}
}
},
{
"id": "CreateType",
"type": "string",
- "description": "Specifies what type of browser window to create. 'panel' is deprecated and only available to existing whitelisted extensions on Chrome OS.",
+ "description": "Specifies what type of browser window to create. 'panel' is deprecated and is available only to existing whitelisted extensions on Chrome OS.",
"enum": ["normal", "popup", "panel"]
}
],
@@ -117,8 +117,8 @@
"optional": true,
"description": "",
"properties": {
- "populate": {"type": "boolean", "optional": true, "description": "If true, the $(ref:windows.Window) object will have a <var>tabs</var> property that contains a list of the $(ref:tabs.Tab) objects. The <code>Tab</code> objects only contain the <code>url</code>, <code>title</code> and <code>favIconUrl</code> properties if the extension's manifest file includes the <code>\"tabs\"</code> permission." },
- "windowTypes": {"type": "array", "items": { "$ref": "WindowType" }, "optional": true, "description": "If set, the $(ref:windows.Window) returned will be filtered based on its type. If unset the default filter is set to <code>['normal', 'popup']</code>."}
+ "populate": {"type": "boolean", "optional": true, "description": "If true, the $(ref:windows.Window) object has a <var>tabs</var> property that contains a list of the $(ref:tabs.Tab) objects. The <code>Tab</code> objects only contain the <code>url</code>, <code>title</code>, and <code>favIconUrl</code> properties if the extension's manifest file includes the <code>\"tabs\"</code> permission." },
+ "windowTypes": {"type": "array", "items": { "$ref": "WindowType" }, "optional": true, "description": "If set, the $(ref:windows.Window) returned is filtered based on its type. If unset, the default filter is set to <code>['normal', 'popup']</code>."}
}
},
{
@@ -143,8 +143,8 @@
"optional": true,
"description": "",
"properties": {
- "populate": {"type": "boolean", "optional": true, "description": "If true, the $(ref:windows.Window) object will have a <var>tabs</var> property that contains a list of the $(ref:tabs.Tab) objects. The <code>Tab</code> objects only contain the <code>url</code>, <code>title</code> and <code>favIconUrl</code> properties if the extension's manifest file includes the <code>\"tabs\"</code> permission." },
- "windowTypes": {"type": "array", "items": { "$ref": "WindowType" }, "optional": true, "description": "If set, the $(ref:windows.Window) returned will be filtered based on its type. If unset the default filter is set to <code>['normal', 'popup']</code>."}
+ "populate": {"type": "boolean", "optional": true, "description": "If true, the $(ref:windows.Window) object has a <var>tabs</var> property that contains a list of the $(ref:tabs.Tab) objects. The <code>Tab</code> objects only contain the <code>url</code>, <code>title</code>, and <code>favIconUrl</code> properties if the extension's manifest file includes the <code>\"tabs\"</code> permission." },
+ "windowTypes": {"type": "array", "items": { "$ref": "WindowType" }, "optional": true, "description": "If set, the $(ref:windows.Window) returned is filtered based on its type. If unset, the default filter is set to <code>['normal', 'popup']</code>."}
}
},
{
@@ -169,8 +169,8 @@
"optional": true,
"description": "",
"properties": {
- "populate": {"type": "boolean", "optional": true, "description": "If true, the $(ref:windows.Window) object will have a <var>tabs</var> property that contains a list of the $(ref:tabs.Tab) objects. The <code>Tab</code> objects only contain the <code>url</code>, <code>title</code> and <code>favIconUrl</code> properties if the extension's manifest file includes the <code>\"tabs\"</code> permission." },
- "windowTypes": {"type": "array", "items": { "$ref": "WindowType" }, "optional": true, "description": "If set, the $(ref:windows.Window) returned will be filtered based on its type. If unset the default filter is set to <code>['normal', 'popup']</code>."}
+ "populate": {"type": "boolean", "optional": true, "description": "If true, the $(ref:windows.Window) object has a <var>tabs</var> property that contains a list of the $(ref:tabs.Tab) objects. The <code>Tab</code> objects only contain the <code>url</code>, <code>title</code>, and <code>favIconUrl</code> properties if the extension's manifest file includes the <code>\"tabs\"</code> permission." },
+ "windowTypes": {"type": "array", "items": { "$ref": "WindowType" }, "optional": true, "description": "If set, the $(ref:windows.Window) returned is filtered based on its type. If unset, the default filter is set to <code>['normal', 'popup']</code>."}
}
},
{
@@ -195,8 +195,8 @@
"optional": true,
"description": "",
"properties": {
- "populate": {"type": "boolean", "optional": true, "description": "If true, each $(ref:windows.Window) object will have a <var>tabs</var> property that contains a list of the $(ref:tabs.Tab) objects for that window. The <code>Tab</code> objects only contain the <code>url</code>, <code>title</code> and <code>favIconUrl</code> properties if the extension's manifest file includes the <code>\"tabs\"</code> permission." },
- "windowTypes": {"type": "array", "items": { "$ref": "WindowType" }, "optional": true, "description": "If set, the $(ref:windows.Window) returned will be filtered based on its type. If unset the default filter is set to <code>['normal', 'popup']</code>."}
+ "populate": {"type": "boolean", "optional": true, "description": "If true, each $(ref:windows.Window) object has a <var>tabs</var> property that contains a list of the $(ref:tabs.Tab) objects for that window. The <code>Tab</code> objects only contain the <code>url</code>, <code>title</code>, and <code>favIconUrl</code> properties if the extension's manifest file includes the <code>\"tabs\"</code> permission." },
+ "windowTypes": {"type": "array", "items": { "$ref": "WindowType" }, "optional": true, "description": "If set, the $(ref:windows.Window) returned is filtered based on its type. If unset, the default filter is set to <code>['normal', 'popup']</code>."}
}
},
{
@@ -213,26 +213,26 @@
{
"name": "create",
"type": "function",
- "description": "Creates (opens) a new browser with any optional sizing, position or default URL provided.",
+ "description": "Creates (opens) a new browser window with any optional sizing, position, or default URL provided.",
"parameters": [
{
"type": "object",
"name": "createData",
"properties": {
"url": {
- "description": "A URL or array of URLs to open as tabs in the window. Fully-qualified URLs must include a scheme (i.e. 'http://www.google.com', not 'www.google.com'). Relative URLs will be relative to the current page within the extension. Defaults to the New Tab Page.",
+ "description": "A URL or array of URLs to open as tabs in the window. Fully-qualified URLs must include a scheme, e.g., 'http://www.google.com', not 'www.google.com'. Non-fully-qualified URLs are considered relative within the extension. Defaults to the New Tab Page.",
"optional": true,
"choices": [
{"type": "string"},
{"type": "array", "items": {"type": "string"}}
]
},
- "tabId": {"type": "integer", "minimum": 0, "optional": true, "description": "The id of the tab for which you want to adopt to the new window."},
+ "tabId": {"type": "integer", "minimum": 0, "optional": true, "description": "The ID of the tab to add to the new window."},
"left": {"type": "integer", "optional": true, "description": "The number of pixels to position the new window from the left edge of the screen. If not specified, the new window is offset naturally from the last focused window. This value is ignored for panels."},
"top": {"type": "integer", "optional": true, "description": "The number of pixels to position the new window from the top edge of the screen. If not specified, the new window is offset naturally from the last focused window. This value is ignored for panels."},
- "width": {"type": "integer", "minimum": 0, "optional": true, "description": "The width in pixels of the new window, including the frame. If not specified defaults to a natural width."},
- "height": {"type": "integer", "minimum": 0, "optional": true, "description": "The height in pixels of the new window, including the frame. If not specified defaults to a natural height."},
- "focused": {"type": "boolean", "optional": true, "description": "If true, opens an active window. If false, opens an inactive window."},
+ "width": {"type": "integer", "minimum": 0, "optional": true, "description": "The width in pixels of the new window, including the frame. If not specified, defaults to a natural width."},
+ "height": {"type": "integer", "minimum": 0, "optional": true, "description": "The height in pixels of the new window, including the frame. If not specified, defaults to a natural height."},
+ "focused": {"type": "boolean", "optional": true, "description": "If <code>true</code>, opens an active window. If <code>false</code>, opens an inactive window."},
"incognito": {"type": "boolean", "optional": true, "description": "Whether the new window should be an incognito window."},
"type": {
"$ref": "CreateType",
@@ -242,12 +242,12 @@
"state": {
"$ref": "WindowState",
"optional": true,
- "description": "The initial state of the window. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'."
+ "description": "The initial state of the window. The <code>minimized</code>, <code>maximized</code>, and <code>fullscreen</code> states cannot be combined with <code>left</code>, <code>top</code>, <code>width</code>, or <code>height</code>."
},
"setSelfAsOpener": {
"type": "boolean",
"optional": true,
- "description": "If 'setSelfAsOpener' is true, then the newly created window will have its 'window.opener' set to the caller and will be in the same <a href=\"https://www.w3.org/TR/html51/browsers.html#unit-of-related-browsing-contexts\">unit of related browsing contexts</a> as the caller."
+ "description": "If <code>true</code>, the newly-created window's 'window.opener' is set to the caller and is in the same <a href=\"https://www.w3.org/TR/html51/browsers.html#unit-of-related-browsing-contexts\">unit of related browsing contexts</a> as the caller."
}
},
"optional": true
@@ -268,7 +268,7 @@
{
"name": "update",
"type": "function",
- "description": "Updates the properties of a window. Specify only the properties that you want to change; unspecified properties will be left unchanged.",
+ "description": "Updates the properties of a window. Specify only the properties that to be changed; unspecified properties are unchanged.",
"parameters": [
{"type": "integer", "name": "windowId", "minimum": -2},
{
@@ -279,12 +279,12 @@
"top": {"type": "integer", "optional": true, "description": "The offset from the top edge of the screen to move the window to in pixels. This value is ignored for panels."},
"width": {"type": "integer", "minimum": 0, "optional": true, "description": "The width to resize the window to in pixels. This value is ignored for panels."},
"height": {"type": "integer", "minimum": 0, "optional": true, "description": "The height to resize the window to in pixels. This value is ignored for panels."},
- "focused": {"type": "boolean", "optional": true, "description": "If true, brings the window to the front and cannot be combined with the state 'minimized'. If false, brings the next window in the z-order to the front and cannot be combined with the state 'fullscreen' or 'maximized'."},
- "drawAttention": {"type": "boolean", "optional": true, "description": "If true, causes the window to be displayed in a manner that draws the user's attention to the window, without changing the focused window. The effect lasts until the user changes focus to the window. This option has no effect if the window already has focus. Set to false to cancel a previous draw attention request."},
+ "focused": {"type": "boolean", "optional": true, "description": "If <code>true</code>, brings the window to the front; cannot be combined with the state 'minimized'. If <code>false</code>, brings the next window in the z-order to the front; cannot be combined with the state 'fullscreen' or 'maximized'."},
+ "drawAttention": {"type": "boolean", "optional": true, "description": "If <code>true</code>, causes the window to be displayed in a manner that draws the user's attention to the window, without changing the focused window. The effect lasts until the user changes focus to the window. This option has no effect if the window already has focus. Set to <code>false</code> to cancel a previous <code>drawAttention</code> request."},
"state": {
"$ref": "WindowState",
"optional": true,
- "description": "The new state of the window. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'."
+ "description": "The new state of the window. The 'minimized', 'maximized', and 'fullscreen' states cannot be combined with 'left', 'top', 'width', or 'height'."
}
}
},
@@ -303,7 +303,7 @@
{
"name": "remove",
"type": "function",
- "description": "Removes (closes) a window, and all the tabs inside it.",
+ "description": "Removes (closes) a window and all the tabs inside it.",
"parameters": [
{"type": "integer", "name": "windowId", "minimum": 0},
{"type": "function", "name": "callback", "optional": true, "parameters": []}
@@ -320,14 +320,14 @@
"name": "windowTypes",
"type": "array",
"items": { "$ref": "WindowType" },
- "description": "Conditions that the window's type being created must satisfy. By default it will satisfy <code>['normal', 'popup']</code>."
+ "description": "Conditions that the window's type being created must satisfy. By default it satisfies <code>['normal', 'popup']</code>."
}
],
"parameters": [
{
"$ref": "Window",
"name": "window",
- "description": "Details of the window that was created."
+ "description": "Details of the created window."
}
]
},
@@ -340,7 +340,7 @@
"name": "windowTypes",
"type": "array",
"items": { "$ref": "WindowType" },
- "description": "Conditions that the window's type being removed must satisfy. By default it will satisfy <code>['normal', 'popup']</code>."
+ "description": "Conditions that the window's type being removed must satisfy. By default it satisfies <code>['normal', 'popup']</code>."
}
],
"parameters": [
@@ -350,17 +350,17 @@
{
"name": "onFocusChanged",
"type": "function",
- "description": "Fired when the currently focused window changes. Will be chrome.windows.WINDOW_ID_NONE if all chrome windows have lost focus. Note: On some Linux window managers, WINDOW_ID_NONE will always be sent immediately preceding a switch from one chrome window to another.",
+ "description": "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.",
"filters": [
{
"name": "windowTypes",
"type": "array",
"items": { "$ref": "WindowType" },
- "description": "Conditions that the window's type being removed must satisfy. By default it will satisfy <code>['normal', 'popup']</code>."
+ "description": "Conditions that the window's type being removed must satisfy. By default it satisfies <code>['normal', 'popup']</code>."
}
],
"parameters": [
- {"type": "integer", "name": "windowId", "minimum": -1, "description": "ID of the newly focused window."}
+ {"type": "integer", "name": "windowId", "minimum": -1, "description": "ID of the newly-focused window."}
]
}
]