diff --git a/app/demo/demo.dart b/app/demo/demo.dart
index 7fcd1dde..e1e3ca54 100644
--- a/app/demo/demo.dart
+++ b/app/demo/demo.dart
@@ -20,6 +20,11 @@ void main() {
action("getInfo()", handleAudioGetInfo);
br();
+ label('browser');
+ action('available', handleBrowserAvailable);
+ action('openTab()', handleBrowserOpenTab);
+ br();
+
label('bluetooth');
action('available', handleBluetoothAvailable);
action('getAdapterState()', handleBluetoothGetAdapterState);
@@ -475,6 +480,15 @@ void handleFileDelete() {
summaryFuture(f);
}
+void handleBrowserAvailable() {
+ summary("available = ${chrome.browser.available}");
+}
+
+void handleBrowserOpenTab() {
+ summaryFuture(chrome.browser.openTab(
+ new chrome.OpenTabOptions(url: 'http://www.google.com')));
+}
+
void handleBluetoothAvailable() {
summary("available = ${chrome.bluetooth.available}");
}
diff --git a/app/demo/manifest.json b/app/demo/manifest.json
index cf08f360..b9aa93f3 100644
--- a/app/demo/manifest.json
+++ b/app/demo/manifest.json
@@ -14,6 +14,7 @@
"permissions": [
"alarms",
+ "browser",
{ "fileSystem": ["write", "retainEntries", "directory"] },
"idle",
"identity",
@@ -25,7 +26,7 @@
{ "socket" : ["tcp-connect", "tcp-listen"] },
"tts"
],
-
+
"oauth2": {
// client_id below is specifc to the application key. Follow the
// documentation to obtain one for your app.
diff --git a/idl/_api_features.json b/idl/_api_features.json
index 04e624b1..dbe950e7 100644
--- a/idl/_api_features.json
+++ b/idl/_api_features.json
@@ -4,8 +4,20 @@
// See c/c/e/features/* to understand this file, in particular feature.h,
// simple_feature.h, and base_feature_provider.h.
+//
+// Note that specifying "web_page", "blessed_web_page", or "all" as a context
+// type will require manually updating chrome/renderer/resources/dispatcher.cc.
{
+ "accessibilityFeatures": [{
+ "platforms": ["chromeos"],
+ "dependencies": ["permission:accessibilityFeatures.modify"],
+ "contexts": ["blessed_extension"]
+ }, {
+ "platforms": ["chromeos"],
+ "dependencies": ["permission:accessibilityFeatures.read"],
+ "contexts": ["blessed_extension"]
+ }],
"activityLogPrivate": {
"dependencies": ["permission:activityLogPrivate"],
"contexts": ["blessed_extension"]
@@ -22,7 +34,11 @@
"channel": "stable",
"extension_types": ["hosted_app", "extension", "legacy_packaged_app"],
"contexts": [
- "blessed_extension", "unblessed_extension", "content_script", "web_page"
+ "blessed_extension",
+ "unblessed_extension",
+ "content_script",
+ "web_page",
+ "blessed_web_page"
],
"matches": [
"http://*/*", "https://*/*", "chrome-extension://*/*", "file://*/*"
@@ -46,9 +62,9 @@
"channel": "stable",
"contexts": ["blessed_extension", "unblessed_extension", "content_script"]
},
- "app.currentWindowInternal.setAlwaysOnTop": {
- "channel": "dev",
- "contexts": ["blessed_extension", "unblessed_extension", "content_script"]
+ "app.currentWindowInternal.setShape": {
+ "dependencies": ["permission:app.window.shape"],
+ "contexts": ["blessed_extension"]
},
"app.getDetails": {
"contexts": ["blessed_extension", "unblessed_extension", "content_script"],
@@ -74,12 +90,21 @@
"dependencies": ["permission:audio"],
"contexts": ["blessed_extension"]
},
+ "automationInternal": {
+ "internal": true,
+ "dependencies": ["permission:automation"],
+ "contexts": ["blessed_extension"]
+ },
+ "automation": {
+ "dependencies": ["permission:automation"],
+ "contexts": ["blessed_extension"]
+ },
"autotestPrivate": {
"dependencies": ["permission:autotestPrivate"],
"contexts": ["blessed_extension"]
},
"bluetooth": {
- "dependencies": ["permission:bluetooth"],
+ "dependencies": ["manifest:bluetooth"],
"contexts": ["blessed_extension"]
},
"bookmarkManagerPrivate": {
@@ -134,6 +159,18 @@
"dependencies": ["permission:cast"],
"contexts": ["blessed_extension"]
},
+ "cast.streaming.rtpStream": {
+ "dependencies": ["permission:cast.streaming"],
+ "contexts": ["blessed_extension"]
+ },
+ "cast.streaming.session": {
+ "dependencies": ["permission:cast.streaming"],
+ "contexts": ["blessed_extension"]
+ },
+ "cast.streaming.udpTransport": {
+ "dependencies": ["permission:cast.streaming"],
+ "contexts": ["blessed_extension"]
+ },
"chromeosInfoPrivate": {
"platforms": ["chromeos"],
"dependencies": ["permission:chromeosInfoPrivate"],
@@ -159,6 +196,11 @@
"dependencies": ["permission:contextMenus"],
"contexts": ["blessed_extension"]
},
+ "contextMenusInternal": {
+ "internal": true,
+ "channel": "stable",
+ "contexts": ["blessed_extension"]
+ },
"cookies": {
"dependencies": ["permission:cookies"],
"contexts": ["blessed_extension"]
@@ -231,9 +273,7 @@
"internal": true,
"channel": "stable",
"extension_types": ["platform_app", "extension"],
- "contexts": [
- "blessed_extension", "unblessed_extension", "content_script", "web_page"
- ],
+ "contexts": "all",
"matches": [" The IDs of extensions or apps that are allowed to connect. If left empty or unspecified, no extensions or apps can connect. The wildcard The URL patterns for web pages that are allowed to connect. This does not affect content scripts. If left empty or unspecified, no web pages can connect. Patterns cannot include wildcard domains nor subdomains of (effective) top level domains; The URL patterns for web pages that are allowed to connect. This does not affect content scripts. If left empty or unspecified, no web pages can connect. Patterns cannot include wildcard domains nor subdomains of (effective) top level domains; A single string or a list of strings representing host:port patterns. The host:port pattern for The host:port pattern for The host:port pattern for The host:port pattern for The host:port pattern for The list specified as UUID strings. ",
+ "properties": {
+ "identifier": {
+ "description": "The plugin's identifier string.",
+ "type": "string"
+ },
+ "name": {
+ "description": "The plugin's display name.",
+ "type": "string"
+ }
+ },
+ "functions": [
+ { "name": "allow", "description": "Allow the permission request. This is the default behavior if Describes a rectangle in screen coordinates. The containment semantics are array-like; that is, the coordinate To illustrate how usage differs from the extensions webRequest API, consider the following example code which blocks any guest requests for URLs which match Additionally, this interface supports declarative webRequest rules through chrome.accessibilityFeatures
API to manage Chrome's accessibility features. This API relies on the ChromeSetting prototype of the type API for getting and setting individual accessibility features. In order to get feature states the extension must request accessibilityFeatures.read
permission. For modifying feature state, the extension needs accessibilityFeatures.modify
permission. Note that accessibilityFeatures.modify
does not imply accessibilityFeatures.read
permission.",
+ "properties": {
+ "spokenFeedback": {
+ "$ref": "types.ChromeSetting",
+ "description": "Spoken feedback (text-to-speech). The value indicates whether the feature is enabled or not. get()
requires accessibilityFeatures.read
permission. set()
and clear()
require accessibilityFeatures.modify
permission.",
+ "value": ["spokenFeedback", {"type": "boolean"}]
+ },
+ "largeCursor": {
+ "$ref": "types.ChromeSetting",
+ "description": "Enlarged cursor. The value indicates whether the feature is enabled or not. get()
requires accessibilityFeatures.read
permission. set()
and clear()
require accessibilityFeatures.modify
permission.",
+ "value": ["largeCursor", {"type": "boolean"}]
+ },
+ "stickyKeys": {
+ "$ref": "types.ChromeSetting",
+ "description": "Sticky modifier keys (like shift or alt). The value indicates whether the feature is enabled or not. get()
requires accessibilityFeatures.read
permission. set()
and clear()
require accessibilityFeatures.modify
permission.",
+ "value": ["stickyKeys", {"type": "boolean"}]
+ },
+ "highContrast": {
+ "$ref": "types.ChromeSetting",
+ "description": "High contrast rendering mode. The value indicates whether the feature is enabled or not. get()
requires accessibilityFeatures.read
permission. set()
and clear()
require accessibilityFeatures.modify
permission.",
+ "value": ["highContrast", {"type": "boolean"}]
+ },
+ "screenMagnifier": {
+ "$ref": "types.ChromeSetting",
+ "description": "Full screen magnification. The value indicates whether the feature is enabled or not. get()
requires accessibilityFeatures.read
permission. set()
and clear()
require accessibilityFeatures.modify
permission.",
+ "value": ["screenMagnifier", {"type": "boolean"}]
+ },
+ "autoclick": {
+ "$ref": "types.ChromeSetting",
+ "description":"Auto mouse click after mouse stops moving. The value indicates whether the feature is enabled or not. get()
requires accessibilityFeatures.read
permission. set()
and clear()
require accessibilityFeatures.modify
permission.",
+ "value": ["autoclick", {"type": "boolean"}]
+ },
+ "virtualKeyboard": {
+ "$ref": "types.ChromeSetting",
+ "description": "Virtual on-screen keyboard. The value indicates whether the feature is enabled or not. get()
requires accessibilityFeatures.read
permission. set()
and clear()
require accessibilityFeatures.modify
permission.",
+ "value": ["virtualKeyboard", {"type": "boolean"}]
+ }
+ }
+ }
+]
diff --git a/idl/activity_log_private.json b/idl/activity_log_private.json
index e912874b..39b30868 100644
--- a/idl/activity_log_private.json
+++ b/idl/activity_log_private.json
@@ -12,6 +12,7 @@
"type": "object",
"description": "This corresponds to a row from the ActivityLog database. Fields will be blank if they were specified precisely in a lookup filter.",
"properties": {
+ "activityId": {"type": "string", "optional": true, "description": "An ID of a row in the ActivityLog database that corresponds to the activity. ID is set only on activities retrieved from the database."},
"extensionId": {"type": "string", "optional": true},
"activityType": {"type": "string", "enum": ["api_call", "api_event", "content_script", "dom_access", "dom_event", "web_request"]},
"time": {"type": "number", "optional": true},
@@ -78,6 +79,19 @@
}
]
},
+ {
+ "name": "deleteActivities",
+ "type": "function",
+ "description": "Deletes activities in the ActivityLog database specified in the array of activity IDs.",
+ "parameters": [
+ {
+ "name": "activityIds",
+ "type": "array",
+ "items": { "type": "string" },
+ "description": "Erases only the activities which IDs are listed in the array."
+ }
+ ]
+ },
{
"name": "deleteDatabase",
"type": "function",
diff --git a/idl/alarms.idl b/idl/alarms.idl
index 3b218e0f..55349be1 100644
--- a/idl/alarms.idl
+++ b/idl/alarms.idl
@@ -42,6 +42,7 @@ namespace alarms {
callback AlarmCallback = void (Alarm alarm);
callback AlarmListCallback = void (Alarm[] alarms);
+ callback ClearCallback = void (boolean wasCleared);
interface Functions {
// Creates an alarm. Near the time(s) specified by alarmInfo,
@@ -81,10 +82,10 @@ namespace alarms {
// Clears the alarm with the given name.
// |name|: The name of the alarm to clear. Defaults to the empty string.
- static void clear(optional DOMString name);
+ static void clear(optional DOMString name, optional ClearCallback callback);
// Clears all alarms.
- static void clearAll();
+ static void clearAll(optional ClearCallback callback);
};
interface Events {
diff --git a/idl/api.gyp b/idl/api.gyp
index 2fbab8f3..fdfc3e74 100644
--- a/idl/api.gyp
+++ b/idl/api.gyp
@@ -5,7 +5,7 @@
{
'targets': [
{
- 'target_name': 'api',
+ 'target_name': 'chrome_api',
'type': 'static_library',
'sources': [
'<@(schema_files)',
@@ -29,7 +29,6 @@
'infobars.json',
'media_player_private.json',
'music_manager_private.idl',
- 'preferences_private.json',
'principals_private.idl',
'top_sites.json',
],
@@ -42,6 +41,8 @@
'app_runtime.idl',
'app_window.idl',
'audio.idl',
+ 'automation_internal.idl',
+ 'automation.idl',
'autotest_private.idl',
'bluetooth.idl',
'bookmark_manager_private.json',
@@ -52,27 +53,28 @@
'command_line_private.json',
'content_settings.json',
'context_menus.json',
+ 'context_menus_internal.json',
'cookies.json',
'debugger.json',
'desktop_capture.json',
'developer_private.idl',
'dial.idl',
- 'dns.idl',
'downloads.idl',
'downloads_internal.idl',
'echo_private.json',
'enterprise_platform_keys_private.json',
'events.json',
'experimental_accessibility.json',
- 'experimental_discovery.idl',
- 'experimental_history.json',
- 'experimental_identity.idl',
'feedback_private.idl',
- 'file_browser_private.json',
+ 'file_browser_private.idl',
'file_system.idl',
+ 'file_system_provider.idl',
'font_settings.json',
+ 'gcm.json',
'hangouts_private.idl',
+ 'hid.idl',
'history.json',
+ 'hotword_private.idl',
'i18n.json',
'identity.idl',
'identity_private.idl',
@@ -91,28 +93,28 @@
'omnibox.json',
'page_capture.json',
'permissions.json',
+ 'preferences_private.json',
'power.idl',
'push_messaging.idl',
+ 'reading_list_private.json',
'runtime.json',
'serial.idl',
'sessions.json',
'signed_in_devices.idl',
- 'socket.idl',
- 'sockets_tcp.idl',
- 'sockets_tcp_server.idl',
- 'sockets_udp.idl',
- 'storage.json',
+ 'streams_private.idl',
'sync_file_system.idl',
'system_cpu.idl',
'system_display.idl',
'system_indicator.idl',
'system_memory.idl',
+ 'system_network.idl',
'system_private.json',
'system_storage.idl',
'tab_capture.idl',
'tabs.json',
'terminal_private.json',
'test.json',
+ 'types.json',
'usb.idl',
'virtual_keyboard_private.json',
'web_navigation.json',
@@ -121,6 +123,7 @@
# WebRTC-specific bits and as such does not belong in
# the enable_webrtc=0 section below.
'webrtc_audio_private.idl',
+ 'webrtc_logging_private.idl',
'webstore_private.json',
'webview.json',
'windows.json',
@@ -141,10 +144,11 @@
'omnibox.json',
'permissions.json',
'runtime.json',
- 'storage.json',
'sync_file_system.idl',
'tab_capture.idl',
'tabs.json',
+ 'types.json',
+ 'webview.json',
'web_navigation.json',
'web_request.json',
'windows.json',
@@ -152,18 +156,21 @@
}],
['chromeos==1', {
'schema_files': [
+ 'accessibility_features.json',
'diagnostics.idl',
'file_browser_handler_internal.json',
+ 'first_run_private.json',
'log_private.idl',
+ 'screenlock_private.idl',
'wallpaper.json',
'wallpaper_private.json',
],
}],
['enable_webrtc==1', {
'schema_files': [
- 'webrtc_cast_send_transport.idl',
- 'webrtc_cast_udp_transport.idl',
- 'webrtc_logging_private.idl',
+ 'cast_streaming_rtp_stream.idl',
+ 'cast_streaming_session.idl',
+ 'cast_streaming_udp_transport.idl',
],
}],
],
@@ -171,6 +178,7 @@
'root_namespace': 'extensions::api',
},
'dependencies': [
+ '<(DEPTH)/content/content.gyp:content_browser',
'<(DEPTH)/skia/skia.gyp:skia',
'<(DEPTH)/sync/sync.gyp:sync',
],
diff --git a/idl/app_current_window_internal.idl b/idl/app_current_window_internal.idl
index 69996360..e8e14f49 100644
--- a/idl/app_current_window_internal.idl
+++ b/idl/app_current_window_internal.idl
@@ -6,9 +6,7 @@
// the shell window.
[nodoc] namespace app.currentWindowInternal {
- // TODO(asargent) - We need to add support for referencing types in
- // other namespaces (crbug.com/158654). For now just duplicate this
- // dictionary from app.window.
+ // Null or undefined indicates that a value should not change.
dictionary Bounds {
long? left;
long? top;
@@ -16,6 +14,15 @@
long? height;
};
+ // Null or undefined indicates that a value should not change. A value of 0
+ // will clear the constraints.
+ dictionary SizeConstraints {
+ long? minWidth;
+ long? minHeight;
+ long? maxWidth;
+ long? maxHeight;
+ };
+
dictionary RegionRect {
long left;
long top;
@@ -35,11 +42,15 @@
static void restore();
static void drawAttention();
static void clearAttention();
- static void show();
+ static void show(optional boolean focused);
static void hide();
- static void setBounds(Bounds bounds);
+ static void setBounds(DOMString boundsType, Bounds bounds);
+ static void setSizeConstraints(DOMString boundsType,
+ SizeConstraints constraints);
static void setIcon(DOMString icon_url);
- static void setInputRegion(Region region);
+ static void setBadgeIcon(DOMString icon_url);
+ static void clearBadge();
+ static void setShape(Region region);
static void setAlwaysOnTop(boolean always_on_top);
};
diff --git a/idl/app_window.idl b/idl/app_window.idl
index 65f34f85..a3f638ab 100644
--- a/idl/app_window.idl
+++ b/idl/app_window.idl
@@ -6,11 +6,108 @@
// have an optional frame with title bar and size controls. They are not
// associated with any Chrome browser windows.
namespace app.window {
- dictionary Bounds {
+
+ // Previously named Bounds.
+ dictionary ContentBounds {
+ long? left;
+ long? top;
+ long? width;
+ long? height;
+ };
+
+ dictionary BoundsSpecification {
+ // The X coordinate of the content or window.
long? left;
+
+ // The Y coordinate of the content or window.
long? top;
+
+ // The width of the content or window.
long? width;
+
+ // The height of the content or window.
long? height;
+
+ // The minimum width of the content or window.
+ long? minWidth;
+
+ // The minimum height of the content or window.
+ long? minHeight;
+
+ // The maximum width of the content or window.
+ long? maxWidth;
+
+ // The maximum height of the content or window.
+ long? maxHeight;
+ };
+
+ dictionary Bounds {
+ // This property can be used to read or write the current X coordinate of
+ // the content or window.
+ long left;
+
+ // This property can be used to read or write the current Y coordinate of
+ // the content or window.
+ long top;
+
+ // This property can be used to read or write the current width of the
+ // content or window.
+ long width;
+
+ // This property can be used to read or write the current height of the
+ // content or window.
+ long height;
+
+ // This property can be used to read or write the current minimum width of
+ // the content or window. A value of null
indicates
+ // 'unspecified'.
+ long? minWidth;
+
+ // This property can be used to read or write the current minimum height of
+ // the content or window. A value of null
indicates
+ // 'unspecified'.
+ long? minHeight;
+
+ // This property can be used to read or write the current maximum width of
+ // the content or window. A value of null
indicates
+ // 'unspecified'.
+ long? maxWidth;
+
+ // This property can be used to read or write the current maximum height of
+ // the content or window. A value of null
indicates
+ // 'unspecified'.
+ long? maxHeight;
+
+ // Set the left and top position of the content or window.
+ static void setPosition(long left, long top);
+
+ // Set the width and height of the content or window.
+ static void setSize(long width, long height);
+
+ // Set the minimum size constraints of the content or window. The minimum
+ // width or height can be set to null
to remove the constraint.
+ // A value of undefined
will leave a constraint unchanged.
+ static void setMinimumSize(long minWidth, long minHeight);
+
+ // Set the maximum size constraints of the content or window. The maximum
+ // width or height can be set to null
to remove the constraint.
+ // A value of undefined
will leave a constraint unchanged.
+ static void setMaximumSize(long maxWidth, long maxHeight);
+ };
+
+ dictionary FrameOptions {
+ // Frame type: none
or chrome
(defaults to
+ // chrome
).
+ // For none
, the -webkit-app-region
CSS property
+ // can be used to apply draggability to the app's window.
+ // -webkit-app-region: drag
can be used to mark regions
+ // draggable. no-drag
can be used to disable this style on
+ // nested elements.
+ DOMString? type;
+ // Allows the frame color to be set. Frame coloring is only available if the
+ // frame type is chrome
.
+ // Frame coloring is experimental and only available in dev channel.
+ DOMString? color;
};
// State of a window: normal, fullscreen, maximized, minimized.
@@ -24,46 +121,73 @@ namespace app.window {
// Id to identify the window. This will be used to remember the size
// and position of the window and restore that geometry when a window
// with the same id is later opened.
+ // If a window with a given id is created while another window with the same
+ // id already exists, the currently opened window will be focused instead of
+ // creating a new window.
DOMString? id;
- // Default width of the window. (Deprecated; regular bounds act like this
- // now.)
- [nodoc] long? defaultWidth;
+ // Used to specify the initial position, initial size and constraints of the
+ // window's content (excluding window decorations).
+ // If an id
is also specified and a window with a matching
+ // id
has been shown before, the remembered bounds will be used
+ // instead.
+ //
+ // Note that the padding between the inner and outer bounds is determined by
+ // the OS. Therefore setting the same bounds property for both the
+ // innerBounds
and outerBounds
will result in an
+ // error.
+ //
+ // Currently only available on the Dev channel from Chrome 35.
+ BoundsSpecification? innerBounds;
+
+ // Used to specify the initial position, initial size and constraints of the
+ // window (including window decorations such as the title bar and frame).
+ // If an id
is also specified and a window with a matching
+ // id
has been shown before, the remembered bounds will be used
+ // instead.
+ //
+ // Note that the padding between the inner and outer bounds is determined by
+ // the OS. Therefore setting the same bounds property for both the
+ // innerBounds
and outerBounds
will result in an
+ // error.
+ //
+ // Currently only available on the Dev channel from Chrome 35.
+ BoundsSpecification? outerBounds;
+
+ // Default width of the window.
+ [nodoc, deprecated="Use $(ref:BoundsSpecification)."] long? defaultWidth;
- // Default height of the window. (Deprecated; regular bounds act like this
- // now.)
- [nodoc] long? defaultHeight;
+ // Default height of the window.
+ [nodoc, deprecated="Use $(ref:BoundsSpecification)."] long? defaultHeight;
- // Default X coordinate of the window. (Deprecated; regular bounds act like
- // this now.)
- [nodoc] long? defaultLeft;
+ // Default X coordinate of the window.
+ [nodoc, deprecated="Use $(ref:BoundsSpecification)."] long? defaultLeft;
- // Default Y coordinate of the window. (Deprecated; regular bounds act like
- // this now.)
- [nodoc] long? defaultTop;
+ // Default Y coordinate of the window.
+ [nodoc, deprecated="Use $(ref:BoundsSpecification)."] long? defaultTop;
- // Width of the window. (Deprecated; use 'bounds'.)
- [nodoc] long? width;
+ // Width of the window.
+ [nodoc, deprecated="Use $(ref:BoundsSpecification)."] long? width;
- // Height of the window. (Deprecated; use 'bounds'.)
- [nodoc] long? height;
+ // Height of the window.
+ [nodoc, deprecated="Use $(ref:BoundsSpecification)."] long? height;
- // X coordinate of the window. (Deprecated; use 'bounds'.)
- [nodoc] long? left;
+ // X coordinate of the window.
+ [nodoc, deprecated="Use $(ref:BoundsSpecification)."] long? left;
- // Y coordinate of the window. (Deprecated; use 'bounds'.)
- [nodoc] long? top;
+ // Y coordinate of the window.
+ [nodoc, deprecated="Use $(ref:BoundsSpecification)."] long? top;
- // Minimum width for the lifetime of the window.
+ // Minimum width of the window.
long? minWidth;
- // Minimum height for the lifetime of the window.
+ // Minimum height of the window.
long? minHeight;
- // Maximum width for the lifetime of the window.
+ // Maximum width of the window.
long? maxWidth;
- // Maximum height for the lifetime of the window.
+ // Maximum height of the window.
long? maxHeight;
// Type of window to create.
@@ -74,13 +198,14 @@ namespace app.window {
// -webkit-app-region
CSS property can be used to apply
// draggability to the app's window. -webkit-app-region: drag
// can be used to mark regions draggable. no-drag
can be used
- // to disable this style on nested elements.
+ // to disable this style on nested elements.
+ // Use of FrameOptions
is only supported in dev channel.
DOMString? frame;
// Size and position of the content in the window (excluding the titlebar).
// If an id is also specified and a window with a matching id has been shown
// before, the remembered bounds of the window will be used instead.
- Bounds? bounds;
+ ContentBounds? bounds;
// Enable window background transparency.
// Only supported in ash. Requires experimental API permission.
@@ -102,31 +227,42 @@ namespace app.window {
// window with the same id already exists that window is activated instead.
// If you do want to create multiple windows with the same id, you can
// set this property to false.
- boolean? singleton;
+ [deprecated="Multiple windows with the same id is no longer supported."] boolean? singleton;
// If true, the window will stay above most other windows. If there are
// multiple windows of this kind, the currently focused window will be in
- // the foreground. Defaults to false. Call setAlwaysOnTop()
on
- // the window to change this property after creation.
- // Currently available in the Dev channel only.
+ // the foreground. Requires the "app.window.alwaysOnTop"
+ // permission. Defaults to false.
+ // Call setAlwaysOnTop()
on the window to change this property
+ // after creation.
boolean? alwaysOnTop;
+
+ // If true, the window will be focused when created. Defaults to true.
+ boolean? focused;
};
// Called in the creating window (parent) before the load event is called in
// the created window (child). The parent can set fields or functions on the
// child usable from onload. E.g. background.js:
- // function(created_window) { created_window.contentWindow.foo =
+ //
.",
+ "description": "Gets the accept-languages of the browser. This is different from the locale used by the browser; to get the locale, use $(ref:i18n.getUILanguage).",
"parameters": [
{
"type": "function",
@@ -44,6 +44,17 @@
"type": "string",
"description": "Message localized for current locale."
}
+ },
+ {
+ "name": "getUILanguage",
+ "type": "function",
+ "nocompile": true,
+ "description": "Gets the browser UI language of the browser. This is different from $(ref:i18n.getAcceptLanguages) which returns the preferred user languages.",
+ "parameters": [],
+ "returns": {
+ "type": "string",
+ "description": "The browser UI language code such as en-US or fr-FR."
+ }
}
],
"events": []
diff --git a/idl/identity.idl b/idl/identity.idl
index 0cd65143..10c73422 100644
--- a/idl/identity.idl
+++ b/idl/identity.idl
@@ -91,6 +91,14 @@ namespace identity {
// |callback| : Called with the URL redirected back to your application.
static void launchWebAuthFlow(WebAuthFlowDetails details,
LaunchWebAuthFlowCallback callback);
+
+ // Generates a redirect URL to be used in |launchWebAuthFlow|.
+ //
+ // The generated URLs match the pattern
+ // function(createdWindow) { createdWindow.contentWindow.foo =
// function () { }; };
//
window.js:
// window.onload = function () { foo(); }
callback CreateWindowCallback =
- void ([instanceOf=AppWindow] object created_window);
+ void ([instanceOf=AppWindow] object createdWindow);
[noinline_doc] dictionary AppWindow {
// Focus the window.
static void focus();
- // Fullscreens the window.
+ // Fullscreens the window.
+ // The user will be able to restore the window by pressing ESC. An
+ // application can prevent the fullscreen state to be left when ESC is
+ // pressed by requesting the app.window.fullscreen.overrideEsc
+ // permission and canceling the event by calling .preventDefault(), like
+ // this:
+ // window.onKeyDown = function(e) { if (e.keyCode == 27 /* ESC */) {
+ // e.preventDefault(); } };
static void fullscreen();
// Is the window fullscreen?
@@ -163,32 +299,57 @@ namespace app.window {
static void close();
// Show the window. Does nothing if the window is already visible.
- static void show();
+ // Focus the window if |focused| is set to true or omitted.
+ static void show(optional boolean focused);
// Hide the window. Does nothing if the window is already hidden.
static void hide();
- // Get the window's bounds as a $ref:Bounds object.
- [nocompile] static Bounds getBounds();
+ // Get the window's inner bounds as a $(ref:ContentBounds) object.
+ [nocompile] static ContentBounds getBounds();
- // Set the window's bounds.
- static void setBounds(Bounds bounds);
+ // Set the window's inner bounds.
+ [nocompile] static void setBounds(ContentBounds bounds);
// Set the app icon for the window (experimental).
// Currently this is only being implemented on Ash.
// TODO(stevenjb): Investigate implementing this on Windows and OSX.
- [nodoc] static void setIcon(DOMString icon_url);
+ [nodoc] static void setIcon(DOMString iconUrl);
+
+ // Set a badge icon for the window.
+ // TODO(benwells): Document this properly before going to stable.
+ [nodoc] static void setBadgeIcon(DOMString iconUrl);
+
+ // Clear the current for the window.
+ // TODO(benwells): Document this properly before going to stable.
+ [nodoc] static void clearBadge();
// Is the window always on top?
- // Currently available in the Dev channel only.
static boolean isAlwaysOnTop();
- // Set whether the window should stay above most other windows.
- // Currently available in the Dev channel only.
- static void setAlwaysOnTop(boolean always_on_top);
+ // Accessors for testing.
+ [nodoc] boolean hasFrameColor;
+ [nodoc] long frameColor;
+
+ // Set whether the window should stay above most other windows. Requires the
+ // "app.window.alwaysOnTop"
permission.
+ static void setAlwaysOnTop(boolean alwaysOnTop);
// The JavaScript 'window' object for the created child.
[instanceOf=Window] object contentWindow;
+
+ // The id the window was created with.
+ DOMString id;
+
+ // The position, size and constraints of the window's content, which does
+ // not include window decorations.
+ // Currently only available on the Dev channel from Chrome 35.
+ Bounds innerBounds;
+
+ // The position, size and constraints of the window, which includes window
+ // decorations, such as the title bar and frame.
+ // Currently only available on the Dev channel from Chrome 35.
+ Bounds outerBounds;
};
interface Functions {
@@ -197,11 +358,11 @@ namespace app.window {
// all, in which case a default size and platform dependent position will
// be used.
//
- // Another option is to use the bounds property, which will put the window
- // at the specified coordinates with the specified size. If the window has
- // a frame, it's total size will be the size given plus the size of the
- // frame; that is, the size in bounds is the content size, not the window
- // size.
+ // Another option is to use the bounds
property, which will put
+ // the window at the specified coordinates with the specified size. If the
+ // window has a frame, it's total size will be the size given plus the size
+ // of the frame; that is, the size in bounds is the content size, not the
+ // window size.
//
// To automatically remember the positions of windows you can give them ids.
// If a window has an id, This id is used to remember the size and position
@@ -214,12 +375,20 @@ namespace app.window {
optional CreateWindowOptions options,
optional CreateWindowCallback callback);
- // Returns an $ref:AppWindow object for the
+ // Returns an $(ref:AppWindow) object for the
// current script context (ie JavaScript 'window' object). This can also be
// called on a handle to a script context for another page, for example:
// otherWindow.chrome.app.window.current().
[nocompile] static AppWindow current();
[nocompile, nodoc] static void initializeAppWindow(object state);
+
+ // Gets an array of all currently created app windows. This method is new in
+ // Chrome 33.
+ [nocompile] static AppWindow[] getAll();
+
+ // Gets an $(ref:AppWindow) with the given id. If no window with the given id
+ // exists null is returned. This method is new in Chrome 33.
+ [nocompile] static AppWindow get(DOMString id);
};
interface Events {
diff --git a/idl/automation.idl b/idl/automation.idl
index f2a5aa8a..cbcdb2a7 100644
--- a/idl/automation.idl
+++ b/idl/automation.idl
@@ -3,328 +3,52 @@
// found in the LICENSE file.
// The chrome.automation
API allows developers to access the
-// automation (accessibility) tree for the browser. The tree resembles the DOM
-// tree, but only exposes the semantic structure of a page. It can be
-// used to programmatically interact with a page by examining names, roles, and
-// states, listening for events, and performing actions on nodes.
+// automation (accessibility) tree for the browser. This is a tree
+// representation, analogous to the DOM tree, which represents the
+// semantic structure of a page, and can be used to programmatically
+// interact with a page.
[nocompile] namespace automation {
- // Keep the following enums in sync with 'ui/accessibility/ax_enums.idl'.
- // They are kept here purely for extension docs generation.
-
- // Possible events fired on an $(ref:automation.AutomationNode).
- enum EventType {
- activedescendantchanged,
- alert,
- ariaAttributeChanged,
- autocorrectionOccured,
- blur,
- checkedStateChanged,
- childrenChanged,
- focus,
- hide,
- hover,
- invalidStatusChanged,
- layoutComplete,
- liveRegionChanged,
- loadComplete,
- locationChanged,
- menuEnd,
- menuListItemSelected,
- menuListValueChanged,
- menuPopupEnd,
- menuPopupStart,
- menuStart,
- rowCollapsed,
- rowCountChanged,
- rowExpanded,
- scrollPositionChanged,
- scrolledToAnchor,
- selectedChildrenChanged,
- selectedTextChanged,
- selectionChanged,
- show,
- textChanged,
- textInserted,
- textRemoved,
- valueChanged
- };
-
- // Describes the purpose of an $(ref:automation.AutomationNode).
- enum RoleType {
- alertDialog,
- alert,
- annotation,
- application,
- article,
- banner,
- browser,
- busyIndicator,
- button,
- buttonDropDown,
- canvas,
- cell,
- checkBox,
- client,
- colorWell,
- columnHeader,
- column,
- comboBox,
- complementary,
- contentInfo,
- definition,
- descriptionListDetail,
- descriptionListTerm,
- desktop,
- dialog,
- directory,
- disclosureTriangle,
- div,
- document,
- drawer,
- editableText,
- embeddedObject,
- footer,
- form,
- grid,
- group,
- growArea,
- heading,
- helpTag,
- horizontalRule,
- iframe,
- ignored,
- imageMapLink,
- imageMap,
- image,
- incrementor,
- inlineTextBox,
- labelText,
- legend,
- link,
- listBoxOption,
- listBox,
- listItem,
- listMarker,
- list,
- locationBar,
- log,
- main,
- marquee,
- mathElement,
- math,
- matte,
- menuBar,
- menuButton,
- menuItem,
- menuListOption,
- menuListPopup,
- menu,
- navigation,
- note,
- outline,
- pane,
- paragraph,
- popUpButton,
- presentational,
- progressIndicator,
- radioButton,
- radioGroup,
- region,
- rootWebArea,
- rowHeader,
- row,
- rulerMarker,
- ruler,
- svgRoot,
- scrollArea,
- scrollBar,
- seamlessWebArea,
- search,
- sheet,
- slider,
- sliderThumb,
- spinButtonPart,
- spinButton,
- splitGroup,
- splitter,
- staticText,
- status,
- systemWide,
- tabGroup,
- tabList,
- tabPanel,
- tab,
- tableHeaderContainer,
- table,
- textArea,
- textField,
- timer,
- titleBar,
- toggleButton,
- toolbar,
- treeGrid,
- treeItem,
- tree,
- unknown,
- tooltip,
- valueIndicator,
- webArea,
- window
- };
-
- // Describes characteristics of an $(ref:automation.AutomationNode).
- enum StateType {
- busy,
- checked,
- collapsed,
- default,
- disabled, // ui/views only
- editable, // ui/views only
- enabled, // content only
- expanded,
- focusable,
- focused,
- haspopup,
- hovered,
- indeterminate,
- invisible,
- linked,
- multiselectable,
- offscreen,
- pressed,
- protected,
- readOnly,
- required,
- selectable,
- selected,
- vertical,
- visited
- };
-
- dictionary Rect {
- long left;
- long top;
- long width;
- long height;
- };
-
- // An event in the Automation tree.
- [nocompile, noinline_doc] dictionary AutomationEvent {
- // The $(ref:automation.AutomationNode) to which the event was targeted.
- AutomationNode target;
-
- // The type of the event.
- EventType type;
-
- // Stops this event from further processing except for any remaining
- // listeners on $(ref:AutomationEvent.target).
- static void stopPropagation();
- };
-
- // A listener for events on an AutomationNode
.
- callback AutomationListener = void(AutomationEvent event);
-
- // A single node in an Automation tree.
- [nocompile, noinline_doc] dictionary AutomationNode {
- // The root node of the tree containing this AutomationNode.
- AutomationRootNode root;
-
- // Whether this AutomationNode is an AutomationRootNode.
- boolean isRootNode;
-
+ // A single node in an AutomationTree
.
+ [nocompile] dictionary AutomationNode {
// Unique ID to identify this node.
long id;
- // The role of this node.
- automation.RoleType role;
+ // The role of this node, e.g. button, static text etc.
+ DOMString role;
- // The $(ref:automation.StateType)s describing this node.
+ // The state of this node, e.g. {pressed": true, "inactive": true} etc.
object state;
- // The rendered location (as a bounding box) of this node within the frame.
- automation.Rect location;
+ // TODO(aboxhall): Rect location;
// A collection of this node's other attributes.
+ // TODO(aboxhall): Create and use combined list of attributes from
+ // AXStringAttribute, AXIntAttribute etc.
object? attributes;
// The index of this node in its parent node's list of children. If this is
// the root node, this will be undefined.
- long? indexInParent;
-
- static AutomationNode[] children();
- static AutomationNode parent();
- static AutomationNode firstChild();
- static AutomationNode lastChild();
- static AutomationNode previousSibling();
- static AutomationNode nextSibling();
-
- // Does the default action based on this node's role. This is generally
- // the same action that would result from clicking the node such as
- // expanding a treeitem, toggling a checkbox, selecting a radiobutton,
- // or activating a button.
- static void doDefault();
-
- // Places focus on this node.
- static void focus();
-
- // Scrolls this node to make it visible.
- static void makeVisible();
-
- // Sets selection within a text field.
- static void setSelection(long startIndex, long endIndex);
+ long? index_in_parent;
- // Adds a listener for the given event type and event phase.
- static void addEventListener(
- EventType eventType, AutomationListener listener, boolean capture);
-
- // Removes a listener for the given event type and event phase.
- static void removeEventListener(
- EventType eventType, AutomationListener listener, boolean capture);
+ static object[] children();
+ static object parent();
+ static object firstChild();
+ static object lastChild();
+ static object previousSibling();
+ static object nextSibling();
};
- // Called when the AutomationRootNode
for the page is available.
- callback RootCallback = void(AutomationRootNode rootNode);
-
- // The root node of the automation tree for a single frame or desktop.
- // This may be:
- //
- //
- // Thus, an AutomationRootNode
may be a descendant of one or
- // more AutomationRootNode
s, and in turn have one or more
- // AutomationRootNode
s in its descendants. Thus, the
- // root
property of the AutomationRootNode
will be
- // the immediate parent AutomationRootNode
, or null
- // if this is the top-level AutomationRootNode
.
- //
- // Extends $(ref:automation.AutomationNode).
- [nocompile, noinline_doc] dictionary AutomationRootNode {
- // TODO(aboxhall/dtseng): implement loading. Kept separate to not include
- // in generated docs.
-
- // TODO(dtseng/aboxhall): Implement non-trivial |load| function before going
- // to dev.
-
- // Whether this AutomationRootNode is loaded or not. If false, call load()
- // to get the contents.
- boolean loaded;
-
- // Load the accessibility tree for this AutomationRootNode.
- static void load(RootCallback callback);
+ // The automation tree for a single page.
+ [nocompile] dictionary AutomationTree {
+ AutomationNode root;
};
- interface Functions {
- // Get the automation tree for the tab with the given tabId, or the current
- // tab if no tabID is given, enabling automation if necessary. Returns a
- // tree with a placeholder root node; listen for the "loadComplete" event to
- // get a notification that the tree has fully loaded (the previous root node
- // reference will stop working at or before this point).
- [nocompile] static void getTree(optional long tabId, RootCallback callback);
+ // Called when the AutomationTree
for the page is available.
+ callback RootCallback = void(AutomationTree tree);
- // Get the automation tree for the whole desktop which consists of all on
- // screen views. Note this API is currently only supported on Chrome OS.
- [nocompile] static void getDesktop(RootCallback callback);
+ interface Functions {
+ // Get the automation tree for the current tab, enabling automation if
+ // necessary.
+ [nocompile] static void getTree(RootCallback callback);
};
};
diff --git a/idl/automation_internal.idl b/idl/automation_internal.idl
new file mode 100644
index 00000000..3b018be6
--- /dev/null
+++ b/idl/automation_internal.idl
@@ -0,0 +1,56 @@
+// 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.
+
+// This is the implementation layer of the chrome.automation API, and is
+// essentially a translation of the internal accessibility tree update system
+// into an extension API.
+namespace automationInternal {
+ // A compact representation of the accessibility information for a
+ // single web object, in a form that can be serialized and sent from
+ // one process to another.
+ // See ui/accessibility/ax_node_data.h
+ dictionary AXNodeData {
+ long id;
+ DOMString role;
+ object state;
+ // TODO(aboxhall): include location data;
+ object? bool_attributes;
+ object? float_attributes;
+ object? html_attributes;
+ object? int_attributes;
+ object? intlist_attributes;
+ object? string_attributes;
+ long[] child_ids;
+ };
+
+ // Data for an accessibility event and/or an atomic change to an accessibility
+ // tree. See ui/accessibility/ax_tree_update.h for an extended explanation of
+ // the tree update format.
+ dictionary AXEventParams {
+ // The routing id of the web contents that this update is for.
+ long routing_id;
+
+ // The type of event that this update represents.
+ DOMString event_type;
+
+ // A vector of nodes to update according to the rules described in
+ // ui/ax_tree_update.h.
+ AXNodeData[] nodes;
+ };
+
+ // Returns the routing_id of the tab whose accessibility was enabled using
+ // enable().
+ callback EnableCallback = void(long routing_id);
+
+ interface Functions {
+ // Enable automation of the active tab and retrieves its routing id for use
+ // in future updates.
+ static void enableCurrentTab(EnableCallback callback);
+ };
+
+ interface Events {
+ // Fired when an accessibility event occurs
+ static void onAccessibilityEvent(AXEventParams update);
+ };
+};
diff --git a/idl/autotest_private.idl b/idl/autotest_private.idl
index e33fa17b..578d9d39 100644
--- a/idl/autotest_private.idl
+++ b/idl/autotest_private.idl
@@ -28,6 +28,31 @@
};
callback LoginStatusCallback = void (LoginStatusDict status);
+ dictionary ExtensionInfoDict {
+ DOMString id;
+ DOMString version;
+ DOMString name;
+ DOMString publicKey;
+ DOMString description;
+ DOMString backgroundUrl;
+ DOMString optionsUrl;
+
+ DOMString[] hostPermissions;
+ DOMString[] effectiveHostPermissions;
+ DOMString[] apiPermissions;
+
+ boolean isComponent;
+ boolean isInternal;
+ boolean isUserInstalled;
+ boolean isEnabled;
+ boolean allowedInIncognito;
+ boolean hasPageAction;
+ };
+ dictionary ExtensionsInfoArray {
+ ExtensionInfoDict[] extensions;
+ };
+ callback ExtensionsInfoCallback = void (ExtensionsInfoArray info);
+
interface Functions {
// Logout of a user session.
static void logout();
@@ -45,6 +70,9 @@
// Locks the screen.
static void lockScreen();
+ // Get info about installed extensions.
+ static void getExtensionsInfo(ExtensionsInfoCallback callback);
+
// Simulates a memory access bug for asan testing.
static void simulateAsanMemoryBug();
};
diff --git a/idl/bluetooth.idl b/idl/bluetooth.idl
index d1774b7c..e66cda10 100644
--- a/idl/bluetooth.idl
+++ b/idl/bluetooth.idl
@@ -3,8 +3,16 @@
// found in the LICENSE file.
// Use the chrome.bluetooth
API to connect to a Bluetooth
-// device.
+// device. All functions report failures via chrome.runtime.lastError.
namespace bluetooth {
+ // Allocation authorities for Vendor IDs.
+ enum VendorIdSource {bluetooth, usb};
+
+ // Common device types recognized by Chrome.
+ enum DeviceType {computer, phone, modem, audio, carAudio, video, peripheral,
+ joystick, gamepad, keyboard, mouse, tablet,
+ keyboardMouseCombo};
+
dictionary AdapterState {
// The address of the adapter, in the format 'XX:XX:XX:XX:XX:XX'.
DOMString address;
@@ -29,11 +37,34 @@ namespace bluetooth {
// The human-readable name of the device.
DOMString? name;
+ // The class of the device, a bit-field defined by
+ // http://www.bluetooth.org/en-us/specification/assigned-numbers/baseband.
+ long? deviceClass;
+
+ // The Device ID record of the device, where available.
+ VendorIdSource? vendorIdSource;
+ long? vendorId;
+ long? productId;
+ long? deviceId;
+
+ // The type of the device, if recognized by Chrome. This is obtained from
+ // the |deviceClass| field and only represents a small fraction of the
+ // possible device types. When in doubt you should use the |deviceClass|
+ // field directly.
+ DeviceType? type;
+
// Indicates whether or not the device is paired with the system.
boolean? paired;
// Indicates whether the device is currently connected to the system.
boolean? connected;
+
+ // UUIDs of protocols, profiles and services advertised by the device.
+ // For classic Bluetooth devices, this list is obtained from EIR data and
+ // SDP tables. For Low Energy devices, this list is obtained from AD and
+ // GATT primary services. For dual mode devices this may be obtained from
+ // both.
+ DOMString[]? uuids;
};
dictionary Profile {
@@ -101,43 +132,16 @@ namespace bluetooth {
};
callback AdapterStateCallback = void(AdapterState result);
- callback AddressCallback = void (DOMString result);
- callback BooleanCallback = void (boolean result);
- callback DataCallback = void (optional ArrayBuffer result);
- callback DeviceCallback = void (Device device);
- callback DevicesCallback = void (Device[] result);
- callback NameCallback = void (DOMString result);
- callback OutOfBandPairingDataCallback = void (OutOfBandPairingData data);
- callback ProfilesCallback = void(Profile[] result);
- callback ResultCallback = void ();
- callback ServicesCallback = void(ServiceRecord[] result);
- callback SizeCallback = void (long result);
- callback SocketCallback = void (Socket result);
-
- // Options for the getDevices function. If |profile| is not provided, all
- // devices known to the system are returned.
- dictionary GetDevicesOptions {
- // Only devices providing |profile| will be returned.
- Profile? profile;
-
- // Called for each matching device. Note that a service discovery request
- // must be made to each non-matching device before it can be definitively
- // excluded. This can take some time.
- DeviceCallback deviceCallback;
- };
-
- // Options for the getProfiles function.
- dictionary GetProfilesOptions {
- // The remote Bluetooth device to retrieve the exported profiles list from.
- Device device;
- };
-
- // Options for the getServices function.
- dictionary GetServicesOptions {
- // The address of the device to inquire about. |deviceAddress| should be
- // in the format 'XX:XX:XX:XX:XX:XX'.
- DOMString deviceAddress;
- };
+ callback AddressCallback = void(DOMString result);
+ callback BooleanCallback = void(boolean result);
+ callback DataCallback = void(optional ArrayBuffer result);
+ callback DeviceCallback = void(Device result);
+ callback DevicesCallback = void(Device[] result);
+ callback NameCallback = void(DOMString result);
+ callback OutOfBandPairingDataCallback = void(OutOfBandPairingData data);
+ callback ResultCallback = void();
+ callback SizeCallback = void(long result);
+ callback SocketCallback = void(Socket result);
// Options for the connect function.
dictionary ConnectOptions {
@@ -180,12 +184,6 @@ namespace bluetooth {
OutOfBandPairingData? data;
};
- // Options for the startDiscovery function.
- dictionary StartDiscoveryOptions {
- // Called for each device that is discovered.
- DeviceCallback deviceCallback;
- };
-
// These functions all report failures via chrome.runtime.lastError.
interface Functions {
// Registers the JavaScript application as an implementation for the given
@@ -202,24 +200,15 @@ namespace bluetooth {
// state.
static void getAdapterState(AdapterStateCallback callback);
- // Get a bluetooth devices known to the system. Known devices are either
- // currently paired, or have been paired in the past.
- // |options| : Controls which devices are returned and provides
- // |deviceCallback|, which is called for each matching device.
+ // Get a list of Bluetooth devices known to the system, including paired
+ // and recently discovered devices.
// |callback| : Called when the search is completed.
- // |options.deviceCallback| will not be called after
- // |callback| has been called.
- static void getDevices(GetDevicesOptions options,
- ResultCallback callback);
-
- // Returns the set of exported profiles for the device specified in options.
- // This function will not initiate a connection to the remote device.
- static void getProfiles(GetProfilesOptions options,
- ProfilesCallback callback);
+ static void getDevices(DevicesCallback callback);
- // Get a list of services provided by a device.
- static void getServices(GetServicesOptions options,
- ServicesCallback callback);
+ // Get information about a Bluetooth device known to the system.
+ // |deviceAddress| : Address of device to get.
+ // |callback| : Called with the Device object describing the device.
+ static void getDevice(DOMString deviceAddress, DeviceCallback callback);
// Connect to a service on a device.
// |options| : The options for the connection.
@@ -233,9 +222,11 @@ namespace bluetooth {
static void disconnect(DisconnectOptions options,
optional ResultCallback callback);
- // Read data from a Bluetooth connection.
+ // Read data from a Bluetooth connection. The |callback| will be called
+ // with the current data in the buffer even if it is empty. This function
+ // should be polled to read incoming data.
// |options| : The options for this function.
- // |callback| : Called with the data when it is available.
+ // |callback| : Called with the data read from the socket buffer.
static void read(ReadOptions options,
DataCallback callback);
@@ -257,14 +248,16 @@ namespace bluetooth {
static void setOutOfBandPairingData(SetOutOfBandPairingDataOptions options,
optional ResultCallback callback);
- // Start discovery. Discovered devices will be returned via the
- // |onDeviceDiscovered| callback. Discovery will fail to start if it is
- // already in progress. Discovery can be resource intensive: stopDiscovery
+ // Start discovery. Newly discovered devices will be returned via the
+ // onDeviceAdded event. Previously discovered devices already known to
+ // the adapter must be obtained using getDevices and will only be updated
+ // using the |onDeviceChanged| event if information about them changes.
+ //
+ // Discovery will fail to start if this application has already called
+ // startDiscovery. Discovery can be resource intensive: stopDiscovery
// should be called as soon as possible.
- // |options| : The options for this function.
// |callback| : Called to indicate success or failure.
static void startDiscovery(
- StartDiscoveryOptions options,
optional ResultCallback callback);
// Stop discovery.
@@ -278,6 +271,17 @@ namespace bluetooth {
// |state| : The new state of the adapter.
static void onAdapterStateChanged(AdapterState state);
+ // Fired when information about a new Bluetooth device is available.
+ static void onDeviceAdded(Device device);
+
+ // Fired when information about a known Bluetooth device has changed.
+ static void onDeviceChanged(Device device);
+
+ // Fired when a Bluetooth device that was previously discovered has been
+ // out of range for long enough to be considered unavailable again, and
+ // when a paired device is removed.
+ static void onDeviceRemoved(Device device);
+
// Fired when a connection has been made for a registered profile.
// |socket| : The socket for the connection.
static void onConnection(Socket socket);
diff --git a/idl/bookmark_manager_private.json b/idl/bookmark_manager_private.json
index 6643f17f..87cba9f8 100644
--- a/idl/bookmark_manager_private.json
+++ b/idl/bookmark_manager_private.json
@@ -151,6 +151,11 @@
"type": "array",
"items": {"type": "string"},
"minItems": 1
+ },
+ {
+ "name": "isFromTouch",
+ "type": "boolean",
+ "description": "True if the drag was initiated from touch"
}
]
},
@@ -243,6 +248,123 @@
"description": "",
"nodoc": "true",
"parameters": []
+ },
+ {
+ "name": "getMetaInfo",
+ "type": "function",
+ "description": "Gets a meta info field from a bookmark node",
+ "nodoc": "true",
+ "parameters": [
+ {
+ "name": "id",
+ "description": "The id of the bookmark to retrieve meta info from",
+ "type": "string"
+ },
+ {
+ "name": "key",
+ "description": "The key for the meta info to retrieve",
+ "type": "string"
+ },
+ {
+ "type": "function",
+ "name": "callback",
+ "parameters": [
+ {
+ "name": "value",
+ "description": "The value of the meta info, if present",
+ "optional": true,
+ "type": "string"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "setMetaInfo",
+ "type": "function",
+ "description": "Sets a meta info value for a bookmark node",
+ "nodoc": "true",
+ "parameters": [
+ {
+ "name": "id",
+ "description": "The id of the bookmark node to set the meta info on",
+ "type": "string"
+ },
+ {
+ "name": "key",
+ "description": "The key of the meta info to set",
+ "type": "string"
+ },
+ {
+ "name": "value",
+ "description": "The meta info to set",
+ "type": "string"
+ },
+ {
+ "name": "callback",
+ "type": "function",
+ "optional": true,
+ "parameters": []
+ }
+ ]
+ },
+ {
+ "name": "undo",
+ "type": "function",
+ "description": "Performs an undo of the last change to the bookmark model",
+ "nodoc": "true",
+ "parameters": []
+ },
+ {
+ "name": "redo",
+ "type": "function",
+ "description": "Performs a redo of last undone change to the bookmark model",
+ "nodoc": "true",
+ "parameters": []
+ },
+ {
+ "name": "getUndoInfo",
+ "type": "function",
+ "description": "Gets the information for the undo if available",
+ "nodoc": "true",
+ "parameters": [
+ {
+ "type": "function",
+ "name": "callback",
+ "parameters": [
+ {
+ "name": "result",
+ "type": "object",
+ "properties": {
+ "enabled" : {"type": "boolean", "description": "Whether there is an action to undo"},
+ "label" : {"type": "string", "description": "The i18n label to use for the undo action"}
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "getRedoInfo",
+ "type": "function",
+ "description": "Gets the information for the redo if available",
+ "nodoc": "true",
+ "parameters": [
+ {
+ "type": "function",
+ "name": "callback",
+ "parameters": [
+ {
+ "name": "result",
+ "type": "object",
+ "properties": {
+ "enabled" : {"type": "boolean", "description": "Whether there is an action to redo"},
+ "label" : {"type": "string", "description": "The i18n label to use for the redo action"}
+ }
+ }
+ ]
+ }
+ ]
}
],
"events": [
@@ -269,6 +391,14 @@
"parameters": [
{"name": "bookmarkNodeData", "$ref": "BookmarkNodeData"}
]
+ },
+ {
+ "name": "onMetaInfoChanged",
+ "type": "function",
+ "description": "Fired when the meta info of a node changes.",
+ "parameters": [
+ {"name": "id", "type": "string"}
+ ]
}
]
}
diff --git a/idl/bookmarks.json b/idl/bookmarks.json
index e1683629..fc0d1fea 100644
--- a/idl/bookmarks.json
+++ b/idl/bookmarks.json
@@ -195,11 +195,37 @@
{
"name": "search",
"type": "function",
- "description": "Searches for BookmarkTreeNodes matching the given query.",
+ "description": "Searches for BookmarkTreeNodes matching the given query. Queries specified with an object produce BookmarkTreeNodes matching all specified properties.",
"parameters": [
{
- "type": "string",
- "name": "query"
+ "name": "query",
+ "choices": [
+ {
+ "type": "string",
+ "description": "A string of words and quoted phrases that are matched against bookmark URLs and titles."
+ },
+ {
+ "type": "object",
+ "description": "An object specifying properties and values to match when searching. Produces bookmarks matching all properties.",
+ "properties": {
+ "query": {
+ "type": "string",
+ "optional": true,
+ "description": "A string of words and quoted phrases that are matched against bookmark URLs and titles."
+ },
+ "url": {
+ "type": "string",
+ "optional": true,
+ "description": "The URL of the bookmark; matches verbatim. Note that folders have no URL."
+ },
+ "title": {
+ "type": "string",
+ "optional": true,
+ "description": "The title of the bookmark; matches verbatim."
+ }
+ }
+ }
+ ]
},
{
"type": "function",
diff --git a/idl/browser_action.json b/idl/browser_action.json
index e08851be..d7ff7438 100644
--- a/idl/browser_action.json
+++ b/idl/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 icon, a browser action can also have a tooltip, a badge, and a popup.",
+ "description": "Use browser actions to put icons in the main Google Chrome toolbar, to the right of the address bar. In addition to its icon, a browser action can also have a tooltip, a badge, and a popup.",
"types": [
{
"id": "ColorArray",
diff --git a/idl/cast_streaming_rtp_stream.idl b/idl/cast_streaming_rtp_stream.idl
deleted file mode 100644
index 55994d36..00000000
--- a/idl/cast_streaming_rtp_stream.idl
+++ /dev/null
@@ -1,96 +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.
-
-// The chrome.cast.streaming.rtpStream
API allows configuration
-// of encoding parameters and RTP parameters used in a Cast streaming
-// session.
-namespace cast.streaming.rtpStream {
- // Params for audio and video codec.
- dictionary CodecSpecificParams {
- DOMString key;
- DOMString value;
- };
-
- // RTP payload param.
- dictionary RtpPayloadParams {
- long payloadType;
-
- DOMString codecName;
-
- // Synchronization source identifier.
- long? ssrc;
-
- long? clockRate;
-
- long? minBitrate;
-
- long? maxBitrate;
-
- // The number of channels.
- long? channels;
-
- // Video width in pixels.
- long? width;
-
- // Video height in pixels.
- long? height;
-
- // A list of codec specific params.
- CodecSpecificParams[] codecSpecificParams;
- };
-
- // Cast RTP capabilities.
- dictionary RtpCaps {
- // RTP payload params.
- RtpPayloadParams[] payloads;
-
- DOMString[] rtcpFeatures;
- };
-
- // Cast RTP parameters.
- dictionary RtpParams {
- // RTP payload params.
- RtpPayloadParams[] payloads;
-
- DOMString[] rtcpFeatures;
- };
-
- // Callback from the create
method.
- // |id| : The ID for the RTP stream.
- callback CreateCallback = void (long streamId);
-
- interface Functions {
- // Destroys a Cast RTP stream.
- // |streamId| : The RTP stream ID.
- [nocompile] static void destroy(long streamId);
-
- // Returns capabilities of the RTP stream.
- // |streamId| : The RTP stream ID.
- [nocompile] static RtpCaps getCaps(long streamId);
-
- // Activates the RTP stream by providing the parameters.
- // |streamId| : The RTP stream ID.
- // |params| : Parameters set for this stream.
- [nocompile] static void start(long streamId, RtpParams params);
-
- // Stops activity on the specified stream.
- // |streamId| : The RTP stream ID.
- [nocompile] static void stop(long streamId);
- };
-
- interface Events {
- // Event fired when a Cast RTP stream has started.
- // |streamId| : The ID of the RTP stream.
- static void onStarted(long streamId);
-
- // Event fired when a Cast RTP stream has stopped.
- // |streamId| : The ID of the RTP stream.
- static void onStopped(long streamId);
-
- // Event fired when a Cast RTP stream has error.
- // |streamId| : The ID of the RTP stream.
- // |errorString| : The error info.
- static void onError(long streamId, DOMString errorString);
- };
-};
diff --git a/idl/cast_streaming_udp_transport.idl b/idl/cast_streaming_udp_transport.idl
index 8c140605..beee4c3b 100644
--- a/idl/cast_streaming_udp_transport.idl
+++ b/idl/cast_streaming_udp_transport.idl
@@ -8,7 +8,7 @@
// It is used to configure the UDP transport used in Cast session.
namespace cast.streaming.udpTransport {
// The UDP socket address and port.
- dictionary UdpParams {
+ dictionary IPEndPoint {
DOMString address;
long port;
};
@@ -18,9 +18,11 @@ namespace cast.streaming.udpTransport {
// |transportId| : The transport ID.
[nocompile] static void destroy(long transportId);
- // Starts to use the transport by providing remote UDP info.
+ // Sets parameters for this UDP transport. This can only be called
+ // once per transport.
// |transportId| : The transport ID.
- // |remoteParams| : The address and port to send packets to.
- [nocompile] static void start(long transportId, UdpParams remoteParams);
+ // |destination| : The address and port to send packets to.
+ [nocompile] static void setDestination(long transportId,
+ IPEndPoint destination);
};
};
diff --git a/idl/chromeos_info_private.json b/idl/chromeos_info_private.json
index 095edeec..b7abe397 100644
--- a/idl/chromeos_info_private.json
+++ b/idl/chromeos_info_private.json
@@ -32,16 +32,61 @@
"type": "object",
"description": "Dictionary which contains all requested properties",
"properties": {
- "hwid": {"type": "string", "optional": "true", "description": "Hardware ID"},
- "homeProvider" : {"type": "string", "optional": "true", "description": "Home provider which is used by the cellular device"},
- "initialLocale" : {"type": "string", "optional": "true", "description": "Initial locale for the device"},
- "board" : {"type": "string", "optional": "true", "description": "Board name"},
- "isOwner" : {"type": "boolean", "optional": "true", "description": "True if current logged in user is device owner"}
+ "board" : {"type": "string", "optional": true, "description": "Board name"},
+ "customizationId": {"type": "string", "optional": true, "description": "Customization ID"},
+ "homeProvider" : {"type": "string", "optional": true, "description": "Home provider which is used by the cellular device"},
+ "hwid": {"type": "string", "optional": true, "description": "Hardware ID"},
+ "initialLocale" : {"type": "string", "optional": true, "description": "Initial locale for the device"},
+ "isOwner" : {"type": "boolean", "optional": true, "description": "True if current logged in user is device owner"},
+ "timezone" : {"type": "string", "optional": true, "description": "Timezone"},
+ "a11yLargeCursorEnabled" : {"type": "boolean", "optional": true, "description": "If true, ChromeOS is showing enlarged cursor."},
+ "a11yStickyKeysEnabled" : {"type": "boolean", "optional": true, "description": "If true, sticky keys are turned on."},
+ "a11ySpokenFeedbackEnabled" : {"type": "boolean", "optional": true, "description": "If enabled, ChromeOS text-to-speech feature is turned on."},
+ "a11yHighContrastEnabled" : {"type": "boolean", "optional": true, "description": "If true, all displays have high contrast mode turned on."},
+ "a11yScreenMagnifierEnabled" : {"type": "boolean", "optional": true, "description": "If true, all displays have screen magnifier turned on."},
+ "a11yAutoClickEnabled" : {"type": "boolean", "optional": true, "description": "If true, auto mouse click accessibility feature is turned on."},
+ "a11yVirtualKeyboardEnabled" : {"type": "boolean", "optional": true, "description": "If true, virtual keyboard will be enabled."},
+ "sendFunctionKeys" : {"type": "boolean", "optional": true, "description": "If true, the ChromeOS top row keys send function keys."},
+ "supportedTimezones" : {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "items": {"type": "string"}
+ },
+ "optional": true,
+ "description": "List of supported timezones definitions."
+ }
}
}
]
}
]
+ },
+ {
+ "name": "set",
+ "description": "Sets values for the given system property.",
+ "type": "function",
+ "parameters": [
+ {
+ "name": "propertyName",
+ "type": "string",
+ "enum": ["timezone",
+ "a11yLargeCursorEnabled",
+ "a11yStickyKeysEnabled",
+ "a11ySpokenFeedbackEnabled",
+ "a11yHighContrastEnabled",
+ "a11yScreenMagnifierEnabled",
+ "a11yAutoClickEnabled",
+ "a11yVirtualKeyboardEnabled",
+ "sendFunctionKeys"],
+ "description": "Chrome OS system property name"
+ },
+ {
+ "name": "propertyValue",
+ "type": "any",
+ "description": "Chrome OS system property value"
+ }
+ ]
}
]
}
diff --git a/idl/content_settings.json b/idl/content_settings.json
index 2a0b86a1..9fcfb285 100644
--- a/idl/content_settings.json
+++ b/idl/content_settings.json
@@ -24,7 +24,7 @@
"description": "A human readable description of the resource."
}
},
- "description": "The only content type using resource identifiers is $ref:contentSettings.plugins. For more information, see Resource Identifiers."
+ "description": "The only content type using resource identifiers is $(ref:contentSettings.plugins). For more information, see Resource Identifiers."
},
{
"id": "ContentSetting",
diff --git a/idl/context_menus_internal.json b/idl/context_menus_internal.json
new file mode 100644
index 00000000..da2a49f7
--- /dev/null
+++ b/idl/context_menus_internal.json
@@ -0,0 +1,98 @@
+// 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.
+
+[
+ {
+ "namespace": "contextMenusInternal",
+ "description": "Use the chrome.contextMenus
API to add items to Google Chrome's context menu. You can choose what types of objects your context menu additions apply to, such as images, hyperlinks, and pages.",
+ "types": [
+ {
+ "id": "OnClickData",
+ "type": "object",
+ "description": "Information sent when a context menu item is clicked.",
+ "properties": {
+ "menuItemId": {
+ "choices": [
+ { "type": "integer" },
+ { "type": "string" }
+ ],
+ "description": "The ID of the menu item that was clicked."
+ },
+ "parentMenuItemId": {
+ "choices": [
+ { "type": "integer" },
+ { "type": "string" }
+ ],
+ "optional": true,
+ "description": "The parent ID, if any, for the item clicked."
+ },
+ "mediaType": {
+ "type": "string",
+ "optional": true,
+ "description": "One of 'image', 'video', or 'audio' if the context menu was activated on one of these types of elements."
+ },
+ "linkUrl": {
+ "type": "string",
+ "optional": true,
+ "description": "If the element is a link, the URL it points to."
+ },
+ "srcUrl": {
+ "type": "string",
+ "optional": true,
+ "description": "Will be present for elements with a 'src' URL."
+ },
+ "pageUrl": {
+ "type": "string",
+ "optional": true,
+ "description": "The URL of the page where the menu item was clicked. This property is not set if the click occured in a context where there is no current page, such as in a launcher context menu."
+ },
+ "frameUrl": {
+ "type": "string",
+ "optional": true,
+ "description": " The URL of the frame of the element where the context menu was clicked, if it was in a frame."
+ },
+ "selectionText": {
+ "type": "string",
+ "optional": true,
+ "description": "The text for the context selection, if any."
+ },
+ "editable": {
+ "type": "boolean",
+ "description": "A flag indicating whether the element is editable (text input, textarea, etc.)."
+ },
+ "wasChecked": {
+ "type": "boolean",
+ "optional": true,
+ "description": "A flag indicating the state of a checkbox or radio item before it was clicked."
+ },
+ "checked": {
+ "type": "boolean",
+ "optional": true,
+ "description": "A flag indicating the state of a checkbox or radio item after it is clicked."
+ }
+ }
+ }
+ ],
+ "events": [
+ {
+ "name": "onClicked",
+ "type": "function",
+ "description": "Fired when a context menu item is clicked.",
+ "parameters": [
+ {
+ "name": "info",
+ "$ref": "OnClickData",
+ "description": "Information about the item clicked and the context where the click happened."
+ },
+ {
+ "name": "tab",
+ "$ref": "tabs.Tab",
+ "description": "The details of the tab where the click took place. If the click did not take place in a tab, this parameter will be missing.",
+ "optional": true
+ }
+ ]
+ }
+ ]
+ }
+]
diff --git a/idl/debugger.json b/idl/debugger.json
index 8b656ef5..2bf6c3f8 100644
--- a/idl/debugger.json
+++ b/idl/debugger.json
@@ -58,7 +58,7 @@
"name": "callback",
"optional": true,
"parameters": [],
- "description": "Called once the attach operation succeeds or fails. Callback receives no arguments. If the attach fails, $ref:runtime.lastError will be set to the error message."
+ "description": "Called once the attach operation succeeds or fails. Callback receives no arguments. If the attach fails, $(ref:runtime.lastError) will be set to the error message."
}
]
},
@@ -77,7 +77,7 @@
"name": "callback",
"optional": true,
"parameters": [],
- "description": "Called once the detach operation succeeds or fails. Callback receives no arguments. If the detach fails, $ref:runtime.lastError will be set to the error message."
+ "description": "Called once the detach operation succeeds or fails. Callback receives no arguments. If the detach fails, $(ref:runtime.lastError) will be set to the error message."
}
]
},
@@ -116,7 +116,7 @@
"description": "JSON object with the response. Structure of the response varies depending on the method and is defined by the remote debugging protocol."
}
],
- "description": "Response body. If an error occurs while posting the message, the callback will be called with no arguments and $ref:runtime.lastError will be set to the error message."
+ "description": "Response body. If an error occurs while posting the message, the callback will be called with no arguments and $(ref:runtime.lastError) will be set to the error message."
}
]
},
diff --git a/idl/declarative_content.json b/idl/declarative_content.json
index 06244558..cc74bec3 100644
--- a/idl/declarative_content.json
+++ b/idl/declarative_content.json
@@ -40,7 +40,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 host permissions, but the extension must have a page action. If the extension takes the activeTab 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 host permissions, but the extension must have a page action. If the extension takes the activeTab permission, a click on the page action will grant access to the active tab.",
"type": "object",
"properties": {
"instanceType": {
diff --git a/idl/declarative_web_request.json b/idl/declarative_web_request.json
index 2c37c74e..77bdb1e3 100644
--- a/idl/declarative_web_request.json
+++ b/idl/declarative_web_request.json
@@ -297,7 +297,7 @@
},
{
"id": "declarativeWebRequest.SendMessageToExtension",
- "description": "Triggers the $ref:declarativeWebRequest.onMessage event.",
+ "description": "Triggers the $(ref:declarativeWebRequest.onMessage) event.",
"type": "object",
"properties": {
"instanceType": {
@@ -570,7 +570,7 @@
{
"name": "onMessage",
"type": "function",
- "description": "Fired when a message is sent via $ref:declarativeWebRequest.SendMessageToExtension from an action of the declarative web request API.",
+ "description": "Fired when a message is sent via $(ref:declarativeWebRequest.SendMessageToExtension) from an action of the declarative web request API.",
"parameters": [
{
"type": "object",
diff --git a/idl/developer_private.idl b/idl/developer_private.idl
index 57307e37..45899ea9 100644
--- a/idl/developer_private.idl
+++ b/idl/developer_private.idl
@@ -60,6 +60,8 @@ namespace developerPrivate {
DOMString? homepage_url;
DOMString? update_url;
InstallWarning[] install_warnings;
+ any[] manifest_errors;
+ any[] runtime_errors;
boolean offline_enabled;
// All views of the current extension.
@@ -97,7 +99,8 @@ namespace developerPrivate {
// New window / view opened.
VIEW_REGISTERED,
// window / view closed.
- VIEW_UNREGISTERED
+ VIEW_UNREGISTERED,
+ ERROR_ADDED
};
dictionary PackDirectoryResponse {
@@ -126,11 +129,11 @@ namespace developerPrivate {
callback VoidCallback = void ();
callback BooleanCallback = void (boolean result);
callback ItemsInfoCallback = void (ItemInfo[] result);
- callback GetStringsCallback = void (object result);
callback GetProjectsInfoCallback = void (ProjectInfo[] result);
callback PathCallback = void (DOMString path);
callback PackCallback = void (PackDirectoryResponse response);
callback VoidCallback = void();
+ callback AnyCallback = void (any result);
interface Functions {
// Runs auto update for extensions and apps immediately.
@@ -175,14 +178,9 @@ namespace developerPrivate {
// Load a user selected unpacked item
static void loadUnpacked(optional VoidCallback callback);
- // Copies the syncfs folder for the extension to local disk.
- static void exportSyncfsFolderToLocalfs(DOMString folder_name,
- optional VoidCallback callback);
-
- // Loads the unpacked app / extension.
- // |callback| called with itemId of the loaded item.
- static void loadProject(DOMString project_name,
- PathCallback callback);
+ // Loads an extension / app from a given |directory|
+ static void loadDirectory([instanceOf=DirectoryEntry] object directory,
+ PathCallback callback);
// Open Dialog to browse to an entry.
// |select_type| : Select a file or a folder.
@@ -200,13 +198,42 @@ namespace developerPrivate {
long flags,
PackCallback callback);
- // Gets localized translated strings for apps_debugger. It returns the
- // strings as a dictionary mapping from string identifier to the
- // translated string to use in the apps_debugger app UI.
- static void getStrings(GetStringsCallback callback);
-
// Returns true if the profile is managed.
static void isProfileManaged(BooleanCallback callback);
+
+ // Reads and returns the contents of a file related to an extension which
+ // caused an error. The expected argument is a dictionary with the
+ // following entries:
+ // - pathSuffix: The path of the file, relative to the extension; e.g.,
+ // manifest.json, script.js, or main.html.
+ // - extensionId: The ID of the extension owning the file.
+ // - errorMessage: The error message which was thrown as a result of the
+ // error in the file.
+ // - manifestKey (required for "manifest.json" file): The key
+ // in the manifest which caused the error (e.g., "permissions").
+ // - manifestSpecific (optional for "manifest.json" file): The specific
+ // portion of the manifest key which caused the error (e.g., "foo" in
+ // the "permissions" key).
+ // - lineNumber (optional for non-manifest files): The line number which
+ // caused the error.
+ // The callback is called with a dictionary with three keys:
+ // - highlight: The region of the code which threw the error, and should
+ // be highlighted.
+ // - beforeHighlight: The region before the "highlight" portion.
+ // - afterHighlight: The region after the "highlight" portion.
+ // - highlight: The region of the code which threw the error.
+ // If the region which threw the error was not found, the full contents of
+ // the file will be in the "beforeHighlight" section.
+ static void requestFileSource(any dict, AnyCallback callback);
+
+ // Open the developer tools to focus on a particular error. The expected
+ // argument is a dictionary with the following entries:
+ // - renderViewId: The ID of the render view in which the error occurred.
+ // - renderProcessId: The ID of the process in which the error occurred.
+ // - url (optional): The URL in which the error occurred.
+ // - lineNumber (optional): The line to focus the devtools at.
+ // - columnNumber (optional): The column to focus the devtools at.
+ static void openDevTools(any dict);
};
interface Events {
diff --git a/idl/devtools/experimental_audits.json b/idl/devtools/experimental_audits.json
index d359496f..2864c4c3 100644
--- a/idl/devtools/experimental_audits.json
+++ b/idl/devtools/experimental_audits.json
@@ -41,7 +41,7 @@
"id": "FormattedValue",
"type": "object",
"additionalProperties": { "type": "any" },
- "description": "A value returned from one of the formatters (a URL, code snippet etc), to be passed to createResult()
or addChild()
. See $ref:AuditResults.createSnippet and $ref:AuditResults.createURL."
+ "description": "A value returned from one of the formatters (a URL, code snippet etc), to be passed to createResult()
or addChild()
. See $(ref:AuditResults.createSnippet) and $(ref:AuditResults.createURL)."
},
{
"id": "AuditResults",
@@ -134,7 +134,7 @@
"description": "Children of this node."
},
"expanded": {
- "optional": "true",
+ "optional": true,
"type": "boolean",
"description": "Whether the node is expanded by default."
}
diff --git a/idl/devtools/panels.json b/idl/devtools/panels.json
index 31ee936d..0fec13a8 100644
--- a/idl/devtools/panels.json
+++ b/idl/devtools/panels.json
@@ -99,8 +99,10 @@
"parameters": [
{
"name": "window",
- "$ref": "windows.Window",
- "description": "The window
object of panel's page."
+ "type": "object",
+ "isInstanceOf": "global",
+ "additionalProperties": { "type": "any" },
+ "description": "The JavaScript window
object of panel's page."
}
]
},
@@ -197,9 +199,10 @@
"parameters": [
{
"name": "window",
- "$ref": "windows.Window",
- "optional": true,
- "description": "The window
object of the sidebar page, if one was set with the setPage()
method."
+ "type": "object",
+ "isInstanceOf": "global",
+ "additionalProperties": { "type": "any" },
+ "description": "The JavaScript window
object of the sidebar page, if one was set with the setPage()
method."
}
]
},
@@ -305,7 +308,7 @@
{
"name": "resource",
"$ref": "devtools.inspectedWindow.Resource",
- "description": "A $ref:devtools.inspectedWindow.Resource object for the resource that was clicked."
+ "description": "A $(ref:devtools.inspectedWindow.Resource) object for the resource that was clicked."
}
]
}
diff --git a/idl/dns.idl b/idl/dns.idl
deleted file mode 100644
index f2da6b33..00000000
--- a/idl/dns.idl
+++ /dev/null
@@ -1,27 +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.
-
-// Use the chrome.dns
API for dns resolution.
-namespace dns {
-
- dictionary ResolveCallbackResolveInfo {
- // The result code. Zero indicates success.
- long resultCode;
-
- // A string representing the IP address literal. Supplied only if resultCode
- // indicates success. Note that we presently return only IPv4 addresses.
- DOMString? address;
- };
-
- callback ResolveCallback = void (ResolveCallbackResolveInfo resolveInfo);
-
- interface Functions {
- // Resolves the given hostname or IP address literal.
- // |hostname| : The hostname to resolve.
- // |callback| : Called when the resolution operation completes.
- static void resolve(DOMString hostname,
- ResolveCallback callback);
- };
-
-};
diff --git a/idl/downloads.idl b/idl/downloads.idl
index e13d3aad..00d05d0f 100644
--- a/idl/downloads.idl
+++ b/idl/downloads.idl
@@ -25,7 +25,7 @@ namespace downloads {
enum FilenameConflictAction {uniquify, overwrite, prompt};
[inline_doc] dictionary FilenameSuggestion {
- // The $ref:DownloadItem's new target $ref:DownloadItem.filename, as a path
+ // The $(ref:DownloadItem)'s new target $(ref:DownloadItem.filename), as a path
// relative to the user's default Downloads directory, possibly containing
// subdirectories. Absolute paths, empty paths, and paths containing
// back-references ".." will be ignored.
@@ -52,6 +52,7 @@ namespace downloads {
NETWORK_TIMEOUT,
NETWORK_DISCONNECTED,
NETWORK_SERVER_DOWN,
+ NETWORK_INVALID_REQUEST,
SERVER_FAILED,
SERVER_NO_RANGE,
SERVER_PRECONDITION,
@@ -67,7 +68,7 @@ namespace downloads {
// A file path relative to the Downloads directory to contain the downloaded
// file, possibly containing subdirectories. Absolute paths, empty paths,
// and paths containing back-references ".." will cause an error.
- // $ref:onDeterminingFilename allows suggesting a filename after the file's
+ // $(ref:onDeterminingFilename) allows suggesting a filename after the file's
// MIME type and a tentative filename have been determined.
DOMString? filename;
@@ -189,23 +190,23 @@ namespace downloads {
// Number of bytes received so far from the host, without considering file
// compression.
- long bytesReceived;
+ double bytesReceived;
// Number of bytes in the whole file, without considering file compression,
// or -1 if unknown.
- long totalBytes;
+ double totalBytes;
// Number of bytes in the whole file post-decompression, or -1 if unknown.
- long fileSize;
+ double fileSize;
// Whether the downloaded file still exists. This information may be out of
// date because Chrome does not automatically watch for file removal. Call
- // $ref:search() in order to trigger the check for file existence. When the
+ // $(ref:search)() in order to trigger the check for file existence. When the
// existence check completes, if the file has been deleted, then an
- // $ref:onChanged event will fire. Note that $ref:search() does not wait
+ // $(ref:onChanged) event will fire. Note that $(ref:search)() does not wait
// for the existence check to finish before returning, so results from
- // $ref:search() may not accurately reflect the file system. Also,
- // $ref:search() may be called as often as necessary, but will not check for
+ // $(ref:search)() may not accurately reflect the file system. Also,
+ // $(ref:search)() may be called as often as necessary, but will not check for
// file existence any more frequently than once every 10 seconds.
boolean exists;
@@ -220,57 +221,57 @@ namespace downloads {
};
[inline_doc] dictionary DownloadQuery {
- // This array of search terms limits results to $ref:DownloadItem whose
+ // This array of search terms limits results to $(ref:DownloadItem) whose
// filename
or url
contain all of the search terms
// that do not begin with a dash '-' and none of the search terms that do
// begin with a dash.
DOMString[]? query;
- // Limits results to $ref:DownloadItem that
+ // Limits results to $(ref:DownloadItem) that
// started before the given ms since the epoch.
DOMString? startedBefore;
- // Limits results to $ref:DownloadItem that
+ // Limits results to $(ref:DownloadItem) that
// started after the given ms since the epoch.
DOMString? startedAfter;
- // Limits results to $ref:DownloadItem that ended before the given ms since the
+ // Limits results to $(ref:DownloadItem) that ended before the given ms since the
// epoch.
DOMString? endedBefore;
- // Limits results to $ref:DownloadItem that ended after the given ms since the
+ // Limits results to $(ref:DownloadItem) that ended after the given ms since the
// epoch.
DOMString? endedAfter;
- // Limits results to $ref:DownloadItem whose
+ // Limits results to $(ref:DownloadItem) whose
// totalBytes
is greater than the given integer.
- long? totalBytesGreater;
+ double? totalBytesGreater;
- // Limits results to $ref:DownloadItem whose
+ // Limits results to $(ref:DownloadItem) whose
// totalBytes
is less than the given integer.
- long? totalBytesLess;
+ double? totalBytesLess;
- // Limits results to $ref:DownloadItem whose
+ // Limits results to $(ref:DownloadItem) whose
// filename
matches the given regular expression.
DOMString? filenameRegex;
- // Limits results to $ref:DownloadItem whose
+ // Limits results to $(ref:DownloadItem) whose
// url
matches the given regular expression.
DOMString? urlRegex;
- // The maximum number of matching $ref:DownloadItem returned. Defaults to
- // 1000. Set to 0 in order to return all matching $ref:DownloadItem. See
- // $ref:search for how to page through results.
+ // The maximum number of matching $(ref:DownloadItem) returned. Defaults to
+ // 1000. Set to 0 in order to return all matching $(ref:DownloadItem). See
+ // $(ref:search) for how to page through results.
long? limit;
- // Set elements of this array to $ref:DownloadItem properties in order to
+ // Set elements of this array to $(ref:DownloadItem) properties in order to
// sort search results. For example, setting
- // orderBy=['startTime']
sorts the $ref:DownloadItem by their
+ // orderBy=['startTime']
sorts the $(ref:DownloadItem) by their
// start time in ascending order. To specify descending order, prefix with a
// hyphen: '-startTime'.
DOMString[]? orderBy;
- // The id
of the $ref:DownloadItem to query.
+ // The id
of the $(ref:DownloadItem) to query.
long? id;
// Absolute URL.
@@ -304,14 +305,14 @@ namespace downloads {
// Number of bytes received so far from the host, without considering file
// compression.
- long? bytesReceived;
+ double? bytesReceived;
// Number of bytes in the whole file, without considering file compression,
// or -1 if unknown.
- long? totalBytes;
+ double? totalBytes;
// Number of bytes in the whole file post-decompression, or -1 if unknown.
- long? fileSize;
+ double? fileSize;
// Whether the downloaded file exists;
boolean? exists;
@@ -322,9 +323,9 @@ namespace downloads {
DOMString? current;
};
- dictionary LongDelta {
- long? previous;
- long? current;
+ dictionary DoubleDelta {
+ double? previous;
+ double? current;
};
dictionary BooleanDelta {
@@ -334,7 +335,7 @@ namespace downloads {
// Encapsulates a change in a DownloadItem.
[inline_doc] dictionary DownloadDelta {
- // The id
of the $ref:DownloadItem
+ // The id
of the $(ref:DownloadItem)
// that changed.
long id;
@@ -369,18 +370,20 @@ namespace downloads {
StringDelta? error;
// The change in totalBytes
, if any.
- LongDelta? totalBytes;
+ DoubleDelta? totalBytes;
// The change in fileSize
, if any.
- LongDelta? fileSize;
+ DoubleDelta? fileSize;
// The change in exists
, if any.
BooleanDelta? exists;
};
[inline_doc] dictionary GetFileIconOptions {
- // The size of the icon. The returned icon will be square with dimensions
- // size * size pixels. The default size for the icon is 32x32 pixels.
+ // The size of the returned icon. The icon will be square with dimensions
+ // size * size pixels. The default and largest size for the icon is 32x32
+ // pixels. The only supported sizes are 16 and 32. It is an error to specify
+ // any other size.
[legalValues=(16,32)] long? size;
};
@@ -398,19 +401,19 @@ namespace downloads {
// filename
and saveAs
are specified, then the
// Save As dialog will be displayed, pre-populated with the specified
// filename
. If the download started successfully,
- // callback
will be called with the new $ref:DownloadItem's
+ // callback
will be called with the new $(ref:DownloadItem)'s
// downloadId
. If there was an error starting the download,
// then callback
will be called with
- // downloadId=undefined
and $ref:runtime.lastError will contain
+ // downloadId=undefined
and $(ref:runtime.lastError) will contain
// a descriptive string. The error strings are not guaranteed to remain
// backwards compatible between releases. Extensions must not parse it.
// |options|: What to download and how.
- // |callback|: Called with the id of the new $ref:DownloadItem.
+ // |callback|: Called with the id of the new $(ref:DownloadItem).
static void download(DownloadOptions options,
optional DownloadCallback callback);
- // Find $ref:DownloadItem. Set query
to the empty object to get
- // all $ref:DownloadItem. To get a specific $ref:DownloadItem, set only the
+ // Find $(ref:DownloadItem). Set query
to the empty object to get
+ // all $(ref:DownloadItem). To get a specific $(ref:DownloadItem), set only the
// id
field. To page through a large number of items, set
// orderBy: ['-startTime']
, set limit
to the
// number of items per page, and set startedAfter
to the
@@ -418,14 +421,14 @@ namespace downloads {
static void search(DownloadQuery query, SearchCallback callback);
// Pause the download. If the request was successful the download is in a
- // paused state. Otherwise $ref:runtime.lastError contains an error message.
+ // paused state. Otherwise $(ref:runtime.lastError) contains an error message.
// The request will fail if the download is not active.
// |downloadId|: The id of the download to pause.
// |callback|: Called when the pause request is completed.
static void pause(long downloadId, optional NullCallback callback);
// Resume a paused download. If the request was successful the download is
- // in progress and unpaused. Otherwise $ref:runtime.lastError contains an
+ // in progress and unpaused. Otherwise $(ref:runtime.lastError) contains an
// error message. The request will fail if the download is not active.
// |downloadId|: The id of the download to resume.
// |callback|: Called when the resume request is completed.
@@ -438,24 +441,24 @@ namespace downloads {
static void cancel(long downloadId, optional NullCallback callback);
// Retrieve an icon for the specified download. For new downloads, file
- // icons are available after the $ref:onCreated event has been received. The
+ // icons are available after the $(ref:onCreated) event has been received. The
// image returned by this function while a download is in progress may be
// different from the image returned after the download is complete. Icon
// retrieval is done by querying the underlying operating system or toolkit
// depending on the platform. The icon that is returned will therefore
// depend on a number of factors including state of the download, platform,
// registered file types and visual theme. If a file icon cannot be
- // determined, $ref:runtime.lastError will contain an error message.
+ // determined, $(ref:runtime.lastError) will contain an error message.
// |downloadId|: The identifier for the download.
// |callback|: A URL to an image that represents the download.
static void getFileIcon(long downloadId,
optional GetFileIconOptions options,
GetFileIconCallback callback);
- // Open the downloaded file now if the $ref:DownloadItem is complete;
- // otherwise returns an error through $ref:runtime.lastError. Requires the
+ // Open the downloaded file now if the $(ref:DownloadItem) is complete;
+ // otherwise returns an error through $(ref:runtime.lastError). Requires the
// "downloads.open"
permission in addition to the
- // "downloads"
permission. An $ref:onChanged event will fire
+ // "downloads"
permission. An $(ref:onChanged) event will fire
// when the item is opened for the first time.
// |downloadId|: The identifier for the downloaded file.
static void open(long downloadId);
@@ -467,24 +470,24 @@ namespace downloads {
// Show the default Downloads folder in a file manager.
static void showDefaultFolder();
- // Erase matching $ref:DownloadItem from history without deleting the
- // downloaded file. An $ref:onErased event will fire for each
- // $ref:DownloadItem that matches query
, then
+ // Erase matching $(ref:DownloadItem) from history without deleting the
+ // downloaded file. An $(ref:onErased) event will fire for each
+ // $(ref:DownloadItem) that matches query
, then
// callback
will be called.
static void erase(DownloadQuery query, optional EraseCallback callback);
- // Remove the downloaded file if it exists and the $ref:DownloadItem is
- // complete; otherwise return an error through $ref:runtime.lastError.
+ // Remove the downloaded file if it exists and the $(ref:DownloadItem) is
+ // complete; otherwise return an error through $(ref:runtime.lastError).
static void removeFile(long downloadId, optional NullCallback callback);
// Prompt the user to accept a dangerous download. Does not automatically
// accept dangerous downloads. If the download is accepted, then an
- // $ref:onChanged event will fire, otherwise nothing will happen. When all
+ // $(ref:onChanged) event will fire, otherwise nothing will happen. When all
// the data is fetched into a temporary file and either the download is not
// dangerous or the danger has been accepted, then the temporary file is
// renamed to the target filename, the |state| changes to 'complete', and
- // $ref:onChanged fires.
- // |downloadId|: The identifier for the $ref:DownloadItem.
+ // $(ref:onChanged) fires.
+ // |downloadId|: The identifier for the $(ref:DownloadItem).
// |callback|: Called when the danger prompt dialog closes.
static void acceptDanger(long downloadId, optional NullCallback callback);
@@ -496,37 +499,37 @@ namespace downloads {
// with the current browser profile. The shelf will be disabled as long as
// at least one extension has disabled it. Enabling the shelf while at least
// one other extension has disabled it will return an error through
- // $ref:runtime.lastError. Requires the "downloads.shelf"
+ // $(ref:runtime.lastError). Requires the "downloads.shelf"
// permission in addition to the "downloads"
permission.
static void setShelfEnabled(boolean enabled);
};
interface Events {
- // This event fires with the $ref:DownloadItem object when a download
+ // This event fires with the $(ref:DownloadItem) object when a download
// begins.
static void onCreated(DownloadItem downloadItem);
// Fires with the downloadId
when a download is erased from
// history.
- // |downloadId|: The id
of the $ref:DownloadItem that was
+ // |downloadId|: The id
of the $(ref:DownloadItem) that was
// erased.
static void onErased(long downloadId);
- // When any of a $ref:DownloadItem's properties except
+ // When any of a $(ref:DownloadItem)'s properties except
// bytesReceived
and estimatedEndTime
changes,
// this event fires with the downloadId
and an object
// containing the properties that changed.
static void onChanged(DownloadDelta downloadDelta);
// During the filename determination process, extensions will be given the
- // opportunity to override the target $ref:DownloadItem.filename. Each
+ // opportunity to override the target $(ref:DownloadItem.filename). Each
// extension may not register more than one listener for this event. Each
// listener must call suggest
exactly once, either
// synchronously or asynchronously. If the listener calls
// suggest
asynchronously, then it must return
// true
. If the listener neither calls suggest
// synchronously nor returns true
, then suggest
- // will be called automatically. The $ref:DownloadItem will not complete
+ // will be called automatically. The $(ref:DownloadItem) will not complete
// until all listeners have called suggest
. Listeners may call
// suggest
without any arguments in order to allow the download
// to use downloadItem.filename
for its filename, or pass a
@@ -536,9 +539,9 @@ namespace downloads {
// suggestion
object to suggest
wins. In order to
// avoid confusion regarding which extension will win, users should not
// install extensions that may conflict. If the download is initiated by
- // $ref:download and the target filename is known before the MIME type and
+ // $(ref:download) and the target filename is known before the MIME type and
// tentative filename have been determined, pass filename
to
- // $ref:download instead.
+ // $(ref:download) instead.
[maxListeners=1] static void onDeterminingFilename(
DownloadItem downloadItem, SuggestFilenameCallback suggest);
};
diff --git a/idl/events.json b/idl/events.json
index b67b8b05..b09dba75 100644
--- a/idl/events.json
+++ b/idl/events.json
@@ -5,7 +5,7 @@
[
{
"namespace": "events",
- "description": "Use the chrome.events
API to notify you when something interesting happens.",
+ "description": "The chrome.events
namespace contains common types used by APIs dispatching events to notify you when something interesting happens.",
"compiler_options": {
"implemented_in": "chrome/browser/extensions/api/declarative/declarative_api.h"
},
@@ -112,6 +112,12 @@
"type": "string",
"description": "Name of the event this function affects."
},
+ {
+ "name": "webViewInstanceId",
+ "type": "integer",
+ "nodoc": true,
+ "description": "If provided, this is an integer that uniquely identfies the chrome.experimental.history
API to interact with the browser's record of most visited pages.",
- "types": [
- {
- "id": "MostVisitedItem",
- "type": "object",
- "properties": {
- "url": {"type": "string", "description": "The URL navigated to by a user."},
- "title": {"type": "string", "description": "The title of the page when it was last loaded."}
- }
- }
- ],
- "functions": [
- {
- "name": "getMostVisited",
- "type": "function",
- "description": "Retrieves most visited URLs on the time specified.",
- "parameters": [
- { "name": "details",
- "type": "object",
- "properties": {
- "filterTime": {"type": "number", "optional": true, "description": "Sets the time to be used as a basis for the query, represented in milliseconds since the epoch. Defaults to the current time."},
- "filterWidth": {"type": "number", "optional": true, "description": "Limit results to those visited at filterTime +/- this on each day, in milliseconds."},
- "dayOfTheWeek": {"type": "integer", "optional": true, "minimum": 0, "description": "Limit results to those visited on this day of the week (0 - Sunday, 1 - Monday, etc.) starting with this week."},
- "maxResults": {"type": "integer", "optional": true, "minimum": 0, "description": "The maximum number of results to retrieve. Defaults to 100."}
- }
- },
- {
- "name": "callback",
- "type": "function",
- "parameters": [
- { "name": "results", "type": "array", "items": { "$ref": "MostVisitedItem"} }
- ]
- }
- ]
- }
- ]
- }
-]
diff --git a/idl/experimental_identity.idl b/idl/experimental_identity.idl
deleted file mode 100644
index 9bcee6ba..00000000
--- a/idl/experimental_identity.idl
+++ /dev/null
@@ -1,54 +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.
-
-// The chrome.experimental.identity
API.
-namespace experimental.identity {
-
- [inline_doc] dictionary ExperimentalTokenDetails {
- // Whether to prompt the user to log in or grant scope permissions (if they
- // have not already done so). Default is false.
- boolean? interactive;
- };
-
- [inline_doc] dictionary ExperimentalWebAuthFlowDetails {
- // The URL that initiates the auth flow.
- DOMString url;
-
- // Whether to launch auth flow in interactive mode. Default is false.
- boolean? interactive;
-
- // Width of the window, if one is shown in interactive mode.
- long? width;
-
- // Height of the window, if one is shown in interactive mode.
- long? height;
-
- // X coordinate of the window, if one is shown in interactive mode.
- long? left;
-
- // Y coordinate of the window, if one is shown in interactive mode.
- long? top;
- };
-
- callback GetAuthTokenCallback = void (optional DOMString token);
- callback InvalidateAuthTokenCallback = void ();
- callback LaunchWebAuthFlowCallback = void (optional DOMString responseUrl);
-
- interface Functions {
- // Gets an OAuth2 access token as specified by the manifest.
- //
- // |details| : Token options.
- // |callback| : Called with an OAuth2 access token as specified by the
- // manifest, or undefined if there was an error.
- static void getAuthToken(optional ExperimentalTokenDetails details,
- GetAuthTokenCallback callback);
-
- // Starts an auth flow at the specified URL.
- //
- // |details| : WebAuth flow options.
- // |callback| : Called with the URL redirected back to your application.
- static void launchWebAuthFlow(ExperimentalWebAuthFlowDetails details,
- LaunchWebAuthFlowCallback callback);
- };
-};
diff --git a/idl/extension.json b/idl/extension.json
index f2ba0948..efb7f4b8 100644
--- a/idl/extension.json
+++ b/idl/extension.json
@@ -28,10 +28,10 @@
{
"name": "sendRequest",
"nocompile": true,
- "nodoc": true,
+ "deprecated": "Please use $(ref:runtime.sendMessage).",
"type": "function",
"allowAmbiguousOptionalArguments": true,
- "description": "Deprecated: Please use sendMessage.",
+ "description": "Sends a single request to other listeners within the extension. Similar to $(ref:runtime.connect), but only sends a single request with an optional response. The $(ref:extension.onRequest) event is fired in each page of the extension.",
"parameters": [
{"type": "string", "name": "extensionId", "optional": true, "description": "The extension ID of the extension you want to connect to. If omitted, default is your own extension."},
{ "type": "any", "name": "request" },
@@ -43,7 +43,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 extension, 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 extension, the callback will be called with no arguments and $(ref:runtime.lastError) will be set to the error message."
}
]
}
@@ -119,10 +119,10 @@
{
"name": "getExtensionTabs",
"nocompile": true,
- "nodoc": true,
+ "deprecated": "Please use $(ref:extension.getViews) {type: \"tab\"}
.",
"type": "function",
"maximumManifestVersion": 1,
- "description": "Deprecated. Please use getViews({type: 'TAB'}). Returns an array of the JavaScript 'window' objects for each of the tabs running inside the current extension. If windowId is specified, returns only the 'window' objects of tabs attached to the specified window.",
+ "description": "Returns an array of the JavaScript 'window' objects for each of the tabs running inside the current extension. If windowId
is specified, returns only the 'window' objects of tabs attached to the specified window.",
"parameters": [
{"type": "integer", "name": "windowId", "optional": true}
],
@@ -187,12 +187,12 @@
"events": [
{
"name": "onRequest",
- "nodoc": true,
+ "deprecated": "Please use $(ref:runtime.onMessage).",
"type": "function",
"options": {
"unmanaged": true
},
- "description": "Deprecated: please use onMessage.",
+ "description": "Fired when a request is sent from either an extension process or a content script.",
"parameters": [
{"name": "request", "type": "any", "optional": true, "description": "The request sent by the calling script."},
{"name": "sender", "$ref": "runtime.MessageSender" },
@@ -201,12 +201,12 @@
},
{
"name": "onRequestExternal",
- "nodoc": true,
+ "deprecated": "Please use $(ref:runtime.onMessageExternal).",
"type": "function",
"options": {
"unmanaged": true
},
- "description": "Deprecated: please use onMessageExternal.",
+ "description": "Fired when a request is sent from another extension.",
"parameters": [
{"name": "request", "type": "any", "optional": true, "description": "The request sent by the calling script."},
{"name": "sender", "$ref": "runtime.MessageSender" },
diff --git a/idl/feedback_private.idl b/idl/feedback_private.idl
index 93f799c3..ba48e72a 100644
--- a/idl/feedback_private.idl
+++ b/idl/feedback_private.idl
@@ -47,6 +47,9 @@ namespace feedbackPrivate {
// feedback report.
SystemInformation[]? systemInformation;
+ // True if we have permission to add histograms to this feedback report.
+ boolean sendHistograms;
+
// TODO(rkc): Remove these once we have bindings to send blobs to Chrome.
// Used internally to store the blob uuid after parameter customization.
DOMString? attachedFileBlobUuid;
diff --git a/idl/file_browser_private.json b/idl/file_browser_private.json
deleted file mode 100644
index b9ee773e..00000000
--- a/idl/file_browser_private.json
+++ /dev/null
@@ -1,1157 +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.
-
-[
- {
- "namespace":"fileBrowserPrivate",
- "compiler_options": {
- "implemented_in": "chrome/browser/chromeos/extensions/file_manager/file_browser_private_api_functions.h"
- },
- "description": "none",
- "platforms": ["chromeos"],
- "types": [
- {
- "id": "FileTask",
- "type": "object",
- "description": "A file task represents an action that the file manager can perform over the currently selected files. See chrome/browser/chromeos/extensions/file_manager/file_tasks.h for details about how file tasks are handled.",
- "properties": {
- "taskId": {
- "type": "string",
- "description": "The unique identifier of the task."
- },
- "title": {
- "type": "string",
- "description": "Task title (ex. App name)."
- },
- "iconUrl": {
- "type": "string",
- "description": "Task icon url (from chrome://extension-icon/...)"
- },
- "isDefault": {
- "type": "boolean",
- "description": "True if this task is a default task for the selected files."
- }
- }
- },
- {
- "id": "DriveEntryProperties",
- "type": "object",
- "description": "Drive file properties.",
- "properties": {
- "thumbnailUrl": {
- "type": "string",
- "optional": true,
- "description": "URL to the Drive thumbnail image for this file."
- },
- "imageWidth": {
- "type": "integer",
- "optional": true,
- "description": "Width, if the entry is an image."
- },
- "imageHeight": {
- "type": "integer",
- "optional": true,
- "description": "Height, if the entry is an image."
- },
- "imageRotation": {
- "type": "integer",
- "optional": true,
- "description": "Rotation in clockwise degrees, if the entry is an image."
- },
- "isPinned": {
- "type": "boolean",
- "optional": true,
- "description": "True if the file is pinned in Drive cache."
- },
- "isPresent": {
- "type": "boolean",
- "optional": true,
- "description": "True if the file is present in Drive cache."
- },
- "isHosted": {
- "type": "boolean",
- "optional": true,
- "description": "True if the file is hosted on a Drive server instead of local."
- },
- "customIconUrl": {
- "type": "string",
- "optional": true,
- "description": "URL to the custom icon for this file."
- },
- "contentMimeType": {
- "type": "string",
- "optional": true,
- "description": "Drive MIME type for this file."
- },
- "sharedWithMe": {
- "type": "boolean",
- "optional": true,
- "description": "True if the entry is labeled as shared-with-me."
- }
- }
- },
- {
- "id": "MountPointSizeStats",
- "type": "object",
- "description": "Information about total and remaining size on the mount point.",
- "properties": {
- "totalSize": {
- "type": "number",
- "description": "Approximate total available size on the mount point."
- },
- "remainingSize": {
- "type": "number",
- "description": "Approximate remaining available size on the mount point."
- }
- }
- },
- {
- "id": "VolumeMetadata",
- "type": "object",
- "description": "Mounted disk volume metadata.",
- "properties": {
- "mountPath": {
- "type": "string",
- "description": "Disk volume mount point path."
- },
- "sourcePath": {
- "type": "string",
- "optional": true,
- "description": "The path to the mounted device, archive file or network resource."
- },
- "volumeType": {
- "type": "string",
- "enum": ["drive", "downloads", "removable", "archive"],
- "description": "Type of the mounted volume."
- },
- "deviceType": {
- "type": "string",
- "optional": true,
- "enum": ["usb", "sd", "optical", "mobile", "unknown"],
- "description": "Device type. Available if this is removable volume."
- },
- "isReadOnly": {
- "type": "boolean",
- "description": "Flag that specifies if volume is mounted in read-only mode."
- },
- "mountCondition": {
- "type": "string",
- "optional": true,
- "enum": ["unknown", "unsupported"],
- "description": "Additional data about mount, for example, that the filesystem is not supported."
- }
- }
- },
- {
- "id": "MountCompletedEvent",
- "type": "object",
- "description": "Payload data for mount event.",
- "properties": {
- "eventType": {
- "type": "string",
- "enum": ["mount", "unmount"],
- "description": "Is the event raised for mounting or unmounting."
- },
- "status": {
- "type": "string",
- "enum": ["success", "error_unknown", "error_internal",
- "error_invalid_argument", "error_invalid_path",
- "error_path_already_mounted", "error_path_not_mounted",
- "error_directory_creation_failed",
- "error_invalid_mount_options",
- "error_invalid_unmount_options",
- "error_insufficient_permissions",
- "error_mount_program_not_found",
- "error_mount_program_failed", "error_invalid_device_path",
- "error_unknown_filesystem", "error_unsuported_filesystem",
- "error_invalid_archive", "error_authentication",
- "error_path_unmounted"],
- "description": "Event type that tells listeners if mount was successful or an error occurred. It also specifies the error."
- },
- "volumeMetadata": {
- "$ref": "VolumeMetadata",
- "description": "Metadata of the mounted volume."
- }
- }
- },
- {
- "id": "FileTransferStatus",
- "type": "object",
- "description": "Payload data for file transfer status updates.",
- "properties": {
- "fileUrl": {
- "type": "string",
- "description": "URL of file that is being transfered."
- },
- "transferState": {
- "type": "string",
- "enum": ["started", "in_progress", "completed", "failed"],
- "description": "File transfer progress state."
- },
- "transferType": {
- "type": "string",
- "enum": ["upload", "download"],
- "description": "Defines file transfer direction."
- },
- "processed": {
- "type": "number",
- "optional": true,
- "description": "Approximated completed portion of the transfer operation."
- },
- "total": {
- "type": "number",
- "optional": true,
- "description": "Approximated total size of transfer operation."
- }
- }
- },
- {
- "id": "CopyProgressStatus",
- "type": "object",
- "description": "Payload data for copy status progress updates.",
- "properties": {
- "type": {
- "type": "string",
- "enum": ["begin_copy_entry", "end_copy_entry", "progress", "success", "error"],
- "description": "The type of the progress event. \"begin_copy_entry\" is fired for each entry (file or directory) before starting the copy operation, \"end_copy_entry\" is fired for each entry (file or directory) after ending the copy operation. \"progress\" is fired periodically to report progress of a file copy (not directory). \"success\" is fired after all entries are copied. \"error\" is fired when an error occurs."
- },
- "sourceUrl": {
- "type": "string",
- "optional": true,
- "description": "URL for the entry currently being copied. This field is particularly useful when a directory copy is initiated with startCopy(). The field tells what file/directory in that directory is now being copied."
- },
- "destinationUrl": {
- "type": "string",
- "optional": true,
- "description": "URL for the entry currently being created. This field is particularly useful when a directory copy is initiated with startCopy(). The field tells what file/directory in that directory is being created. Available only for end_copy_entry and success."
- },
- "size": {
- "type": "number",
- "optional": true,
- "description": "Number of processed bytes for the file currently being copied. Available only for \"progress\" event. To show the progress bar, a caller needs to pre-compute the size of files being copied for the file (not directory)."
- },
- "error": {
- "type": "integer",
- "optional": true,
- "description": "FileError's code of the error. Available only for ERROR event."
- }
- }
- },
- {
- "id": "FileTransferCancelStatus",
- "type": "object",
- "description": "Payload data for file transfer cancel response.",
- "properties": {
- "fileUrl": {
- "type": "string",
- "description": "URL of file that is being transfered."
- },
- "canceled": {
- "type": "boolean",
- "description": "True if ongoing transfer operation was found and canceled."
- }
- }
- },
- {
- "id": "FileWatchEvent",
- "type": "object",
- "description": "Directory change notification details.",
- "properties": {
- "eventType": {
- "type": "string",
- "enum": ["changed", "error"],
- "description": "Specifies type of event that is raised."
- },
- "directoryUrl": {
- "type": "string",
- "description": "URL of watched directory."
- }
- }
- }
- ],
- "functions": [
- {
- "name": "logoutUser",
- "type": "function",
- "description": "Logout the current user.",
- "parameters": []
- },
- {
- "name": "cancelDialog",
- "type": "function",
- "description": "Cancels file selection.",
- "parameters": []
- },
- {
- "name": "executeTask",
- "description": "Executes file browser task over selected files",
- "parameters": [
- {
- "name": "taskId",
- "type": "string",
- "description": "The unique identifier of task to execute."
- },
- {
- "name": "fileUrls",
- "type": "array",
- "description": "Array of file URLs",
- "items": { "type": "string" }
- },
- {
- "name": "callback",
- "type": "function",
- "optional": true,
- "parameters": [
- {
- "name": "success",
- "type": "boolean",
- "optional": true,
- "description": "True of task execution was successfully initiated."
- }
- ]
- }
- ]
- },
- {
- "name": "setDefaultTask",
- "description": "Sets the default task for the supplied MIME types and suffixes of the supplied file URLs. Lists of MIME types and URLs may contain duplicates.",
- "parameters": [
- {
- "name": "taskId",
- "type": "string",
- "description": "The unique identifier of task to mark as default."
- },
- {
- "name": "fileUrls",
- "type": "array",
- "description": "Array of selected file URLs to extract suffixes from.",
- "items": { "type": "string" }
- },
- {
- "name": "mimeTypes",
- "type": "array",
- "optional": true,
- "description": "Array of selected file MIME types.",
- "items": { "type": "string" }
- },
- {
- "name": "callback",
- "type": "function",
- "optional": true,
- "parameters": []
- }
- ]
- },
- {
- "name": "getFileTasks",
- "description": "Gets the list of tasks that can be performed over selected files.",
- "parameters": [
- {
- "name": "fileUrls",
- "type": "array",
- "description": "Array of selected file URLs",
- "items": { "type": "string" }
- },
- {
- "name": "mimeTypes",
- "type": "array",
- "description": "Array of selected file MIME types",
- "items": { "type": "string" }
- },
- {
- "name": "callback",
- "type": "function",
- "parameters": [
- {
- "name": "tasks",
- "type": "array",
- "items": {"$ref": "FileTask"},
- "description": "The list of matched file URL patterns for this task."
- }
- ]
- }
- ]
- },
- {
- "name": "getStrings",
- "type": "function",
- "description": "Gets localized strings and initialization data.",
- "parameters": [
- {
- "type": "function",
- "name": "callback",
- "parameters": [
- {
- "name": "result",
- "type": "object",
- "additionalProperties": { "type": "any" }
- }
- ]
- }
- ]
- },
- {
- "name": "addFileWatch",
- "description": "Adds file watch.",
- "parameters": [
- {
- "name": "fileUrl",
- "type": "string",
- "description": "URL of file to watch"
- },
- {
- "name": "callback",
- "type": "function",
- "parameters": [
- {
- "name" : "success",
- "type": "boolean",
- "optional": true,
- "description": "True when file watch is successfully added."
- }
- ]
- }
- ]
- },
- {
- "name": "removeFileWatch",
- "description": "Removes file watch.",
- "parameters": [
- {
- "name": "fileUrl",
- "type": "string",
- "description": "URL of watched file to remove"
- },
- {
- "name": "callback",
- "type": "function",
- "parameters": [
- {
- "name" : "success",
- "type": "boolean",
- "optional": true,
- "description": "True when file watch is successfully removed."
- }
- ]
- }
- ]
- },
- {
- "name": "requestFileSystem",
- "description": "Requests access to the file system specially set up for Files.app. The filesystem has multiple mount points which provide access to the user's Downloadsfolder, removal media like SD cards, and Drive. See comments at CrosDiskMountPorivder for details.",
- "parameters": [
- {
- "name": "fileSystemId",
- "type": "string",
- "description": "The ID of the file system to request. The file system ID is delivered to JavaScript as part of VolumeMetadata (This is not yet implemented). By specifying \"compatible\", this function behaves in the compatible mode, where the returned FileSystem object gives access to all file systems (i.e. all file systems are provided inside the single FileSystem object). In the new \"multi FileSystem object model\", a separate FileSystem object is created for each file system. \"compatible\" parameter will be removed once Files.app is switched to the multi FileSystem object model. crbug.com/284963"
- },
- {
- "name": "callback",
- "type": "function",
- "parameters": [
- {
- "name" : "fileSystem",
- "type": "object",
- "optional": true,
- "additionalProperties": { "type": "any" },
- "description": "A DOMFileSystem instance for local file system access. null if the caller has no appropriate permissions."
- }
- ]
- }
- ]
- },
- {
- "name": "selectFiles",
- "type": "function",
- "description": "Selects multiple files.",
- "parameters": [
- {
- "name": "selectedPaths",
- "type": "array",
- "description": "Array of selected paths",
- "items": {"type": "string"}
- },
- {
- "name": "shouldReturnLocalPath",
- "type": "boolean",
- "description": "true if paths need to be resolved to local paths."
- },
- {
- "name": "callback",
- "type": "function",
- "parameters": []
- }
- ]
- },
- {
- "name": "selectFile",
- "type": "function",
- "description": "Selects a file.",
- "parameters": [
- {
- "name": "selectedPath",
- "type": "string",
- "description": "A selected path"
- },
- {
- "name": "index",
- "type": "integer",
- "description": "Index of Filter"
- },
- {
- "name": "forOpening",
- "type": "boolean",
- "description": "true if paths are selected for opening. false if for saving."
- },
- {
- "name": "shouldReturnLocalPath",
- "type": "boolean",
- "description": "true if paths need to be resolved to local paths."
- },
- {
- "name": "callback",
- "type": "function",
- "parameters": []
- }
- ]
- },
- {
- "name": "getDriveEntryProperties",
- "description": "Requests Drive file properties for a file",
- "parameters": [
- {
- "name": "fileUrl",
- "type": "string",
- "description": "URL of a file"
- },
- {
- "name": "callback",
- "type": "function",
- "parameters": [
- {
- "name" : "fileProperties",
- "$ref": "DriveEntryProperties",
- "description": "A dictionary containing properties of the requested entry."
- }
- ]
- }
- ]
- },
- {
- "name": "pinDriveFile",
- "description": "Pins/unpins a Drive file in the cache",
- "parameters": [
- {
- "name": "fileUrl",
- "type": "string",
- "description": "URL of a file to pin/unpin."
- },
- {
- "name": "pin",
- "type": "boolean",
- "description": "Pass true to pin the file."
- },
- {
- "name": "callback",
- "type": "function",
- "optional": true,
- "description": "Completion callback. $ref:runtime.lastError will be set if there was an error.",
- "parameters": []
- }
- ]
- },
- {
- "name": "getDriveFiles",
- "description": "Get Drive files",
- "parameters": [
- {
- "name": "fileUrls",
- "type": "array",
- "description": "Array of Drive file URLs to get.",
- "items": { "type": "string" }
- },
- {
- "name": "callback",
- "type": "function",
- "parameters": [
- {
- "name" : "localFilePaths",
- "type": "array",
- "items": {"type": "string"},
- "description": "An array of the local file paths for the requested files, one entry for each file in fileUrls."
- }
- ]
- }
- ]
- },
- {
- "name": "addMount",
- "description": "Mount a resource or a file.",
- "parameters": [
- {
- "name": "source",
- "type": "string",
- "description": "Mount point source. For compressed files it is relative file path within external file system"
- },
- {
- "name": "callback",
- "type": "function",
- "parameters": [
- {
- "name": "sourcePath",
- "type": "string",
- "description": "Source path of the mount."
- }
- ]
- }
- ]
- },
- {
- "name": "removeMount",
- "description": "Unmounts a mounted resource.",
- "parameters": [
- {
- "name": "mountPath",
- "type": "string",
- "description": "A path of the mount."
- }
- ]
- },
- {
- "name": "getVolumeMetadataList",
- "description": "Get the list of mounted volumes.",
- "parameters": [
- {
- "name": "callback",
- "type": "function",
- "parameters": [
- {
- "name" : "volumeMetadataList",
- "type": "array",
- "items": {"$ref": "VolumeMetadata"},
- "description": "The list of VolumeMetadata representing mounted volumes."
- }
- ]
- }
- ]
- },
- {
- "name": "cancelFileTransfers",
- "description": "Cancels ongoing file transfers for selected files.",
- "parameters": [
- {
- "name": "fileUrls",
- "type": "array",
- "description": "Array of files for which ongoing transfer should be canceled.",
- "items": {"type": "string"}
- },
- {
- "name": "callback",
- "type": "function",
- "parameters": [
- {
- "name" : "fileTransferCancelStatuses",
- "type": "array",
- "items": {"$ref": "FileTransferCancelStatus"},
- "description": "The list of FileTransferCancelStatus."
- }
- ]
- }
- ]
- },
- {
- "name": "startCopy",
- "description": "Starts to copy an entry. If the source is a directory, the copy is done recursively.",
- "parameters": [
- {
- "name": "sourceUrl",
- "type": "string",
- "description": "URL of the source entry to be copied."
- },
- {
- "name": "parent",
- "type": "string",
- "description": "URL of the destination directory."
- },
- {
- "name": "newName",
- "type": "string",
- "description": "Name of the new entry. It shouldn't contain '/'."
- },
- {
- "name": "callback",
- "type": "function",
- "description": "Completion callback.",
- "parameters": [
- {
- "name": "copyId",
- "type": "integer",
- "description": "ID of the copy task. Can be used to identify the progress, and to cancel the task."
- }
- ]
- }
- ]
- },
- {
- "name": "cancelCopy",
- "description": "Cancels the running copy task.",
- "parameters": [
- {
- "name": "copyId",
- "type": "integer",
- "description": "ID of the copy task to be cancelled."
- },
- {
- "name": "callback",
- "type": "function",
- "optional": true,
- "description": "Completion callback of the cancel.",
- "parameters": []
- }
- ]
- },
- {
- "name": "getSizeStats",
- "description": "Retrieves total and remaining size of a mount point.",
- "parameters": [
- {
- "name": "mountPath",
- "type": "string",
- "description": "Mount point path."
- },
- {
- "name": "callback",
- "type": "function",
- "parameters": [
- {
- "name" : "sizeStats",
- "optional": true,
- "$ref": "MountPointSizeStats",
- "description": "Name/value pairs of size stats. Will be undefined if stats could not be determined."
- }
- ]
- }
- ]
- },
- {
- "name": "formatDevice",
- "description": "Formats a mounted device",
- "parameters": [
- {
- "name": "mountPath",
- "type": "string",
- "description": "Device's mount path."
- }
- ]
- },
- {
- "name": "getPreferences",
- "description": "Retrieves file manager preferences .",
- "parameters": [
- {
- "name": "callback",
- "type": "function",
- "parameters": [
- {
- "name": "result",
- "type": "object",
- "properties": {
- "driveEnabled": {"type":"boolean"},
- "cellularDisabled": {"type":"boolean"},
- "hostedFilesDisabled": {"type":"boolean"},
- "use24hourClock": {"type":"boolean"},
- "allowRedeemOffers": {"type":"boolean"}
- }
- }
- ]
- }
- ]
- },
- {
- "name": "setPreferences",
- "description": "Sets file manager preferences.",
- "parameters": [
- {
- "name": "changeInfo",
- "type": "object",
- "properties": {
- "cellularDisabled": {"type":"boolean", "optional":true},
- "hostedFilesDisabled": {"type":"boolean", "optional":true}
- }
- }
- ]
- },
- {
- "name": "searchDrive",
- "type": "function",
- "description": "Performs drive content search.",
- "parameters": [
- {
- "name": "searchParams",
- "type": "object",
- "properties": {
- "query": {
- "type": "string",
- "description": "Search query."
- },
- "nextFeed": {
- "type": "string",
- "description": "ID of the search feed that should be fetched next. Value passed here should be gotten from previous searchDrive call. It can be empty for the initial search request."
- }
- }
- },
- {
- "name": "callback",
- "type": "function",
- "parameters": [
- {
- "name": "entries",
- "type": "array",
- "items": {
- "type": "object",
- "isInstanceOf": "Entry",
- "additionalProperties": { "type": "any" },
- "description": "An Entry object which represents a Drive file. The conversion into a kind of FileEntry object is done in file_browser_handler_custom_bindings.cc. For filesystem API's Entry interface, see The Entry interface."
- }
- },
- {
- "name": "nextFeed",
- "type": "string",
- "description": "ID of the feed that contains next chunk of the search result. Should be sent to the next searchDrive request to perform incremental search."
- }
- ]
- }
- ]
- },
- {
- "name": "searchDriveMetadata",
- "type": "function",
- "description": "Performs drive metadata search.",
- "parameters": [
- {
- "name": "searchParams",
- "type": "object",
- "properties": {
- "query": {
- "type": "string",
- "description": "Search query. It can be empty. Any filename matches to an empty query."
- },
- "types": {
- "type": "string",
- "enum": ["EXCLUDE_DIRECTORIES", "SHARED_WITH_ME", "OFFLINE", "ALL"],
- "description": "The type of entry that is needed. Default to ALL."
- },
- "maxResults": {
- "type": "integer",
- "description": "Maximum number of results."
- }
- }
- },
- {
- "name": "callback",
- "type": "function",
- "parameters": [
- {
- "name": "results",
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "entry": {
- "type": "object",
- "isInstanceOf": "Entry",
- "additionalProperties": { "type": "any" },
- "description": "A dictionary object which represents a Drive file. This will be converted into a kind of FileEntry object. See file_browser_handler_custom_bindings.cc for details. For filesystem API's Entry interface, see The Entry interface."
- },
- "highlightedBaseName": {
- "type": "string",
- "description": "The base name of a Drive file that matched the search query. The matched sub strings are highlighted with element. Meta characters are escaped like <."
- }
- },
- "description": "Entry and Drive-related properties representing a search result."
- }
- }
- ]
- }
- ]
- },
- {
- "name": "clearDriveCache",
- "description": "Clear all Drive local caches including locally cached user files and filesystem metadata. The file system metadata will be reloaded from the server immediately.",
- "parameters": []
- },
- {
- "name": "zipSelection",
- "description": "Create a zip file for the selected files.",
- "parameters": [
- {
- "name": "dirURL",
- "type": "string",
- "description": "URL of the directory containing the selected files."
- },
- {
- "name": "selectionUrls",
- "type": "array",
- "description": "URLs of the selected files. The files must be under the directory specified by dirURL.",
- "items": { "type": "string" }
- },
- {
- "name": "destName",
- "type": "string",
- "description": "Name of the destination zip file. The zip file will be created under the directory specified by dirURL."
- },
- {
- "name": "callback",
- "type": "function",
- "optional": true,
- "parameters": [
- {
- "name" : "success",
- "type" : "boolean",
- "optional": true
- }
- ]
- }
- ]
- },
- {
- "name": "getDriveConnectionState",
- "description": "Retrieves the state of the current drive connection.",
- "parameters": [
- {
- "name": "callback",
- "type": "function",
- "parameters": [
- {
- "name": "result",
- "type": "object",
- "properties": {
- "type": {"type": "string"},
- "reasons": {
- "type": "array",
- "description": "Reasons of offline.",
- "items": { "type": "string" }
- }
- }
- }
- ]
- }
- ]
- },
- {
- "name": "validatePathNameLength",
- "description": "Checks whether the path name length fits in the limit of the filesystem.",
- "parameters": [
- {
- "name": "parent_directory_url",
- "type": "string",
- "description": "The URL of the parent directory entry."
- },
- {
- "name": "name",
- "type": "string",
- "description": "The name of the file."
- },
- {
- "name": "callback",
- "type": "function",
- "description": "Called back when the check is finished.",
- "parameters": [
- {
- "name": "result",
- "type": "boolean",
- "description": "true if the length is in the valid range, false otherwise."
- }
- ]
- }
- ]
- },
- {
- "name": "zoom",
- "description": "Changes the zoom factor of the Files.app.",
- "parameters": [
- {
- "name": "operation",
- "type": "string",
- "description": "Zooming mode.",
- "enum": ["in", "out", "reset"]
- }
- ]
- },
- {
- "name": "requestAccessToken",
- "description": "Requests a Drive API OAuth2 access token.",
- "parameters": [
- {
- "name": "refresh",
- "type": "boolean",
- "description": "Whether the token should be refetched instead of using the cached one."
- },
- {
- "name": "callback",
- "type": "function",
- "parameters": [
- {
- "name": "accessToken",
- "type": "string",
- "description": "OAuth2 access token, or an empty string if failed to fetch."
- }
- ]
- }
- ]
- },
- {
- "name": "requestWebStoreAccessToken",
- "description": "Requests a Webstore API OAuth2 access token.",
- "parameters": [
- {
- "name": "callback",
- "type": "function",
- "parameters": [
- {
- "name": "accessToken",
- "type": "string",
- "description": "OAuth2 access token, or an empty string if failed to fetch."
- }
- ]
- }
- ]
- },
- {
- "name": "getShareUrl",
- "description": "Requests a share dialog url for the specified file.",
- "parameters": [
- {
- "name": "url",
- "type": "string",
- "description": "Url for the file."
- },
- {
- "name": "callback",
- "type": "function",
- "parameters": [
- {
- "name": "shareUrl",
- "type": "string",
- "description": "Share Url for the sharing dialog."
- }
- ]
- }
- ]
- },
- {
- "name": "installWebstoreItem",
- "type": "function",
- "description": "Requests to install a webstore item.",
- "parameters": [
- {
- "name": "item_id",
- "type": "string",
- "description": "The id of the item to install."
- },
- {
- "name": "callback",
- "type": "function",
- "parameters": []
- }
- ]
- }
- ],
- "events": [
- {
- "name": "onMountCompleted",
- "type": "function",
- "description": "Fired when mount event is detected.",
- "parameters": [
- {
- "$ref": "MountCompletedEvent",
- "name": "event",
- "description": "MountCompleted event information."
- }
- ]
- },
- {
- "name": "onFileTransfersUpdated",
- "type": "function",
- "description": "Fired when file transfers with remote file system are in progress.",
- "parameters": [
- {
- "type": "array",
- "items": {"$ref": "FileTransferStatus"},
- "name": "event",
- "description": "List of ongoing file statuses for ongoing transfer operations."
- }
- ]
- },
- // Here is an example of onCopyProgress:
- // Suppose a/b/c.txt (100bytes) and a/b/d.txt (200bytes), and trying to
- // copy a to x recursively. The events will be:
- //
- // begin_copy_entry "a"
- // chrome.gcm
to enable apps and extensions to send and receive messages through Google Cloud Messaging for Android.",
+ "description": "Use chrome.gcm
to enable apps and extensions to send and receive messages through Google Cloud Messaging.",
"properties": {
"MAX_MESSAGE_SIZE": {
"value": 4096,
@@ -21,7 +21,7 @@
{
"name": "senderIds",
"type": "array",
- "items": {
+ "items": {
"type": "string",
"minLength": 1
},
@@ -32,9 +32,9 @@
{
"name": "callback",
"type": "function",
- "description": "Function called when registration completes. It should check $ref:runtime.lastError for error when registrationId
is empty.",
+ "description": "Function called when registration completes. It should check $(ref:runtime.lastError) for error when registrationId
is empty.",
"parameters": [
- {
+ {
"name": "registrationId",
"type": "string",
"description": "A registration ID assigned to the application by the GCM."
@@ -43,6 +43,19 @@
}
]
},
+ {
+ "name": "unregister",
+ "type": "function",
+ "description": "Unregisters the application from GCM.",
+ "parameters": [
+ {
+ "name": "callback",
+ "type": "function",
+ "description": "A function called after the unregistration completes. Unregistration was successful if $(ref:runtime.lastError) is not set.",
+ "parameters": []
+ }
+ ]
+ },
{
"name": "send",
"type": "function",
@@ -61,14 +74,14 @@
"messageId": {
"type": "string",
"minLength": 1,
- "description": "The ID of the message. It must be unique for each message."
+ "description": "The ID of the message. It must be unique for each message in scope of the applications. See the Cloud Messaging documentation for advice for picking and handling an ID."
},
"timeToLive": {
"type": "integer",
"minimum": 0,
"maximum": 2419200,
"optional": true,
- "description": "Time-to-live of the message in seconds. If it is not possible to send the message wihtin that time an error will be raised. A time-to-live of 0 indicates that the message should be sent immediately or fail if it's not possible. The maximum and a default value of time-to-live is 2419200 seconds (4 weeks)."
+ "description": "Time-to-live of the message in seconds. If it is not possible to send the message within that time, an onSendError event will be raised. A time-to-live of 0 indicates that the message should be sent immediately or fail if it's not possible. The maximum and a default value of time-to-live is 2419200 seconds (4 weeks)."
},
"data": {
"type": "object",
@@ -77,14 +90,14 @@
"type": "string",
"minLength": 1
},
- "description": "Message data to send to the server. goog.
and google
are disallowed as key prefixes. Sum of all key/value pairs should not exceed $ref:MAX_MESSAGE_SIZE."
+ "description": "Message data to send to the server. Case-insensitive goog.
and google
, as well as case-sensitive collapse_key
are disallowed as key prefixes. Sum of all key/value pairs should not exceed $(ref:gcm.MAX_MESSAGE_SIZE)."
}
}
},
{
"name": "callback",
"type": "function",
- "description": "A function called after the message is successfully queued for sending. $ref:runtime.lastError should be checked, to ensure a message was sent without problems.",
+ "description": "A function called after the message is successfully queued for sending. $(ref:runtime.lastError) should be checked, to ensure a message was sent without problems.",
"parameters": [
{
"name": "messageId",
@@ -102,7 +115,7 @@
"type": "function",
"description": "Fired when a message is received through GCM.",
"parameters": [
- {
+ {
"name": "message",
"type": "object",
"description": "A message received from another party via GCM.",
@@ -114,6 +127,11 @@
"type": "string"
},
"description": "The message data."
+ },
+ "collapseKey": {
+ "type": "string",
+ "optional": true,
+ "desctription": "The collapse key of a message. See Collapsible Messages section of Cloud Messaging documentation for details."
}
}
}
@@ -122,7 +140,7 @@
{
"name": "onMessagesDeleted",
"type": "function",
- "description": "Fired when a GCM server had to delete messages to the application from its queue in order to manage its size. The app is expected to handle that case gracefully, e.g. by running a full sync with its server."
+ "description": "Fired when a GCM server had to delete messages sent by an app server to the application. See Messages deleted event section of Cloud Messaging documentation for details on handling this event."
},
{
"name": "onSendError",
diff --git a/idl/hid.idl b/idl/hid.idl
index a718ace3..d92a063d 100644
--- a/idl/hid.idl
+++ b/idl/hid.idl
@@ -6,28 +6,13 @@
// This API provides access to HID operations from within the context of an app.
// Using this API, apps can function as drivers for hardware devices.
namespace hid {
- // HID usage pair. Each enumerated device interface exposes an array of
- // these objects. Values correspond to those defined by the
- // window.navigator.languagehttps://<app-id>.chromiumapp.org/*
.
+ //
+ // |path| : The path appended to the end of the generated URL.
+ [nocompile] static DOMString getRedirectURL(optional DOMString path);
};
interface Events {
diff --git a/idl/image_writer_private.idl b/idl/image_writer_private.idl
index 2dc3e3d0..8c49b68f 100644
--- a/idl/image_writer_private.idl
+++ b/idl/image_writer_private.idl
@@ -30,7 +30,8 @@
verifyDownload,
unzip,
write,
- verifyWrite
+ verifyWrite,
+ unknown
};
// Options for writing an image.
@@ -43,7 +44,7 @@
};
dictionary ProgressInfo {
- // The $ref:Stage that the write process is currently in.
+ // The $(ref:Stage) that the write process is currently in.
Stage stage;
// Current progress within the stage.
long percentComplete;
@@ -84,28 +85,27 @@
// completes, either successfully or on error.
//
// |storageUnitId|: The identifier for the storage unit
- // |options|: If present the imageUrl of the options will be used to
- // download the image. Otherwise the user will be prompted for a local
- // image to burn.
+ // |fileEntry|: The FileEntry object of the image to be burned.
// |callback|: The callback which signifies that the write operation has
// been started by the system and provides a unique ID for this operation.
static void writeFromFile(DOMString storageUnitId,
+ [instanceOf=FileEntry] object fileEntry,
WriteImageCallback callback);
// Cancel a current write operation.
//
// |callback|: The callback which is triggered with the write is
- // successfully cancelled, passing the $ref:ProgressInfo of the operation at
+ // successfully cancelled, passing the $(ref:ProgressInfo) of the operation at
// the time it was cancelled.
static boolean cancelWrite(WriteCancelCallback callback);
// Destroys the partition table of a disk, effectively erasing it. This is
// a fairly quick operation and so it does not have complex stages or
- // progress information. However, it can fail and call the callback with
- // an error.
+ // progress information, just a write phase.
//
// |storageUnitId|: The identifier of the storage unit to wipe
- // |callback|: A callback which is called when the operation is complete.
+ // |callback|: A callback that triggers when the operation has been
+ // successfully started.
static void destroyPartitions(DOMString storageUnitId,
DestroyPartitionsCallback callback);
@@ -119,12 +119,20 @@
// Fires periodically throughout the writing operation and at least once per
// stage.
static void onWriteProgress(ProgressInfo info);
+
// Fires when the write operation has completely finished, such as all
// devices being finalized and resources released.
static void onWriteComplete();
- // Fires when an error occured during writing, passing the $ref:ProgressInfo
+
+ // Fires when an error occured during writing, passing the $(ref:ProgressInfo)
// of the operation at the time the error occured.
static void onWriteError(ProgressInfo info, DOMString error);
+
+ // Fires when a removable storage device is inserted.
+ static void onDeviceInserted(RemovableStorageDevice device);
+
+ // Fires when a removable storage device is removed.
+ static void onDeviceRemoved(RemovableStorageDevice device);
};
};
diff --git a/idl/input_ime.json b/idl/input_ime.json
index e3349463..e682d40b 100644
--- a/idl/input_ime.json
+++ b/idl/input_ime.json
@@ -15,6 +15,7 @@
"properties": {
"type": {"type": "string", "description": "One of keyup or keydown.", "enum": ["keyup", "keydown"]},
"requestId": {"type": "string", "description": "The ID of the request."},
+ "extensionId": {"type": "string", "optional": true, "description": "The extension ID of the sender of this keyevent."},
"key": {"type": "string", "description": "Value of the key being pressed"},
"code": {"type": "string", "description": "Value of the physical key being pressed. The value is not affected by current keyboard layout or modifier state."},
"altKey": {"type": "boolean", "optional": true, "description": "Whether or not the ALT key is pressed."},
@@ -29,7 +30,7 @@
"description": "Describes an input Context",
"properties": {
"contextID": {"type": "integer", "description": "This is used to specify targets of text field operations. This ID becomes invalid as soon as onBlur is called."},
- "type": {"type": "string", "description": "Type of value this text field edits, (Text, Number, Password, etc)", "enum": ["text", "number", "password"]}
+ "type": {"type": "string", "description": "Type of value this text field edits, (Text, Number, URL, etc)", "enum": ["text", "search", "tel", "url", "email", "number"]}
}
},
{
@@ -184,10 +185,47 @@
}
]
},
+ {
+ "name": "sendKeyEvents",
+ "type": "function",
+ "description": "Sends the key events. This function is expected to be used by virtual keyboards. When key(s) on a virtual keyboard is pressed by a user, this function is used to propagate that event to the system.",
+ "parameters": [
+ {
+ "name": "parameters",
+ "type": "object",
+ "properties": {
+ "contextID": {
+ "description": "ID of the context where the key events will be sent, or zero to send key events to non-input field.",
+ "type": "integer"
+ },
+ "keyData": {
+ "type": "array",
+ "description": "Data on the key event.",
+ "items": {
+ "$ref": "KeyboardEvent"
+ }
+ }
+ }
+ },
+ {
+ "type": "function",
+ "name": "callback",
+ "optional": true,
+ "description": "Called when the operation completes.",
+ "parameters": []
+ }
+ ]
+ },
+ {
+ "name": "hideInputView",
+ "type": "function",
+ "description": "Hides the input view window, which is popped up automatically by system. If the input view window is already hidden, this function will do nothing.",
+ "parameters": []
+ },
{
"name": "setCandidateWindowProperties",
"type": "function",
- "description": "Sets the properties of the candidate window. This fails if the extension doesn’t own the active IME",
+ "description": "Sets the properties of the candidate window. This fails if the extension doesn't own the active IME",
"parameters": [
{
"name": "parameters",
@@ -257,7 +295,7 @@
{
"name": "setCandidates",
"type": "function",
- "description": "Sets the current candidate list. This fails if this extension doesn’t own the active IME",
+ "description": "Sets the current candidate list. This fails if this extension doesn't own the active IME",
"parameters": [
{
"name": "parameters",
diff --git a/idl/log_private.idl b/idl/log_private.idl
index 31a22ec4..454d18fb 100644
--- a/idl/log_private.idl
+++ b/idl/log_private.idl
@@ -49,6 +49,11 @@ namespace logPrivate {
interface Functions {
// Get the existing logs from ChromeOS system.
static void getHistorical(Filter filter, GetHistoricalCallback callback);
+ static void startNetInternalsWatch();
+ static void stopNetInternalsWatch();
};
+ interface Events {
+ static void onAddNetInternalsEntries(object[] entries);
+ };
};
diff --git a/idl/management.json b/idl/management.json
index b8b58b43..d3940045 100644
--- a/idl/management.json
+++ b/idl/management.json
@@ -58,7 +58,7 @@
"isApp": {
"description": "True if this is an app.",
"type": "boolean",
- "nodoc": true
+ "deprecated": "Please use $(ref:management.ExtensionInfo.type)."
},
"type": {
"description": "The type of this extension, app, or theme.",
@@ -146,12 +146,12 @@
{
"name": "id",
"type": "string",
- "description": "The ID from an item of $ref:ExtensionInfo."
+ "description": "The ID from an item of $(ref:management.ExtensionInfo)."
},
{
"type": "function",
"name": "callback",
- "optional": "true",
+ "optional": true,
"parameters": [
{
"name": "result",
@@ -172,7 +172,7 @@
{
"name": "callback",
"type": "function",
- "optional": "true",
+ "optional": true,
"parameters": [
{
"name": "permissionWarnings",
@@ -195,7 +195,7 @@
{
"name": "callback",
"type": "function",
- "optional": "true",
+ "optional": true,
"parameters": [
{
"name": "permissionWarnings",
@@ -213,7 +213,7 @@
{
"name": "id",
"type": "string",
- "description": "This should be the id from an item of $ref:ExtensionInfo."
+ "description": "This should be the id from an item of $(ref:management.ExtensionInfo)."
},
{
"name": "enabled",
@@ -223,7 +223,7 @@
{
"name": "callback",
"type": "function",
- "optional": "true",
+ "optional": true,
"parameters": []
}
]
@@ -235,12 +235,12 @@
{
"name": "id",
"type": "string",
- "description": "This should be the id from an item of $ref:ExtensionInfo."
+ "description": "This should be the id from an item of $(ref:management.ExtensionInfo)."
},
{
"type": "object",
"name": "options",
- "optional": "true",
+ "optional": true,
"properties": {
"showConfirmDialog": {
"type": "boolean",
@@ -252,7 +252,7 @@
{
"name": "callback",
"type": "function",
- "optional": "true",
+ "optional": true,
"parameters": []
}
]
@@ -264,7 +264,7 @@
{
"type": "object",
"name": "options",
- "optional": "true",
+ "optional": true,
"properties": {
"showConfirmDialog": {
"type": "boolean",
@@ -276,7 +276,7 @@
{
"name": "callback",
"type": "function",
- "optional": "true",
+ "optional": true,
"parameters": []
}
]
@@ -293,7 +293,7 @@
{
"name": "callback",
"type": "function",
- "optional": "true",
+ "optional": true,
"parameters": []
}
]
diff --git a/idl/manifest_types.json b/idl/manifest_types.json
index d4b24ec8..d2e1af6b 100644
--- a/idl/manifest_types.json
+++ b/idl/manifest_types.json
@@ -17,7 +17,7 @@
"type": "object",
// Note: description commented out because externally_connectable.html
// already describes it, and the repetition looks odd.
- // "description": "The externally_connectable
manifest property declares which extensions, apps, and web pages can connect to your extension via $ref:runtime.connect and $ref:runtime.sendMessage.",
+ // "description": "The externally_connectable
manifest property declares which extensions, apps, and web pages can connect to your extension via $(ref:runtime.connect) and $(ref:runtime.sendMessage).",
"properties": {
"ids": {
"description": "\"*\"
will allow all extensions and apps to connect.*://google.com/*
and http://*.chromium.org/*
are valid, while <all_urls>
, http://*/*
, *://*.com/*
, and even http://*.appspot.com/*
are not.*://google.com/*
and http://*.chromium.org/*
are valid, while <all_urls>
, http://*/*
, *://*.com/*
, and even http://*.appspot.com/*
are not.true
, messages sent via $ref:runtime.connect or $ref:runtime.sendMessage will set $ref:runtime.MessageSender.tlsChannelId if those methods request it to be. If false
, $ref:runtime.MessageSender.tlsChannelId will never be set under any circumstance.",
+ "description": "If true
, messages sent via $(ref:runtime.connect) or $(ref:runtime.sendMessage) will set $(ref:runtime.MessageSender.tlsChannelId) if those methods request it to be. If false
, $(ref:runtime.MessageSender.tlsChannelId) will never be set under any circumstance.",
"optional": true,
"type": "boolean"
}
@@ -43,6 +43,36 @@
"type": "object",
"description": "Chrome settings which can be overriden by an extension.",
"properties": {
+ // TODO(wittman): Remove for M37.
+ "bookmarks_ui": {
+ "type": "object",
+ "description": "Settings to permit bookmarks user interface customization by extensions.",
+ "optional": true,
+ "nodoc": true,
+ "properties": {
+ "remove_button": {
+ "type": "boolean",
+ "description": "If true
, the built-in bookmark button will be removed from the user interface.",
+ "optional": true
+ },
+ "remove_bookmark_shortcut": {
+ "type": "boolean",
+ "description": "If true
, the built-in \"Bookmark this page...\" shortcut key is removed and the extension is permitted to override the shortcut by binding it in the commands section of the manifest. The corresponding menu item is also removed or overridden as well.",
+ "optional": true
+ },
+ "remove_bookmark_open_pages_shortcut": {
+ "type": "boolean",
+ "nodoc": true,
+ "description": "[Private] If true
, the built-in \"Bookmark open pages...\" shortcut key and corresponding menu item is removed.",
+ "optional": true
+ },
+ "hide_bookmark_button": {
+ "type": "boolean",
+ "description": "Deprecated. Use remove_button instead.",
+ "optional": true
+ }
+ }
+ },
"homepage": {
"description": "New value for the homepage.",
"optional": true,
@@ -120,13 +150,52 @@
}
}
},
- "startup_page": {
- "description": "A new startup page to be added to the list.",
+ "startup_pages": {
+ "description": "URLs to be added to the list of startup pages.",
"optional": true,
- "type": "string"
+ "type": "array",
+ "items": {"type": "string"}
}
}
},
+ {
+ "id": "ChromeUIOverrides",
+ "type": "object",
+ "description": "Chrome user interface features which can be overriden by an extension.",
+ "properties": {
+ "bookmarks_ui": {
+ "type": "object",
+ "description": "Settings to permit bookmarks user interface customization by extensions.",
+ "optional": true,
+ "properties": {
+ "remove_button": {
+ "type": "boolean",
+ "description": "If true
, the built-in bookmark button will be removed from the user interface.",
+ "optional": true
+ },
+ "remove_bookmark_shortcut": {
+ "type": "boolean",
+ "description": "If true
, the built-in \"Bookmark this page...\" shortcut key is removed and the extension is permitted to override the shortcut by binding it in the commands section of the manifest.",
+ "optional": true
+ },
+ "remove_bookmark_open_pages_shortcut": {
+ "type": "boolean",
+ "nodoc": true,
+ "description": "[Private] If true
, the built-in \"Bookmark open pages...\" shortcut key and corresponding menu item is removed.",
+ "optional": true
+ }
+ }
+ }
+ }
+ },
+ {
+ "id": "SocketHostPatterns",
+ "description": "bind
operations.send
operations.joinGroup
operations.connect
operations.listen
operations.bluetooth
manifest property give permission to an app to use the $(ref:bluetooth) API. A list of UUIDs can be optionally specified to enable communication with devices.",
+ "properties": {
+ "uuids": {
+ "description": "The uuids
manifest property declares the list of protocols, profiles and services that an app can communicate using.",
+ "optional": true,
+ "type": "array",
+ "items": {
+ "description": "chrome.mediaGalleries
API to access media files (images,
-// video, audio) from the user's local disks (with the user's consent).
+// Use the chrome.mediaGalleries
API to access media files (audio,
+// images, video) from the user's local disks (with the user's consent).
namespace mediaGalleries {
[inline_doc] enum GetMediaFileSystemsInteractivity {
@@ -16,6 +16,25 @@ namespace mediaGalleries {
if_needed
};
+ [inline_doc] enum GetMetadataType {
+ // Retrieve all available metadata.
+ all,
+ // Retrieve only the mime type.
+ mimeTypeOnly
+ };
+
+ [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 MediaFileSystemsDetails {
// Whether to prompt the user for permission to additional media galleries
// before returning the permitted set. Default is silent. If the value
@@ -25,9 +44,19 @@ namespace mediaGalleries {
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] optional object[] mediaFileSystems);
+ callback AddUserFolderCallback =
+ void ([instanceOf=DOMFileSystem] optional object[] mediaFileSystems,
+ DOMString selectedFileSystemName);
+
[inline_doc] dictionary MediaFileSystemMetadata {
// The name of the file system.
DOMString name;
@@ -36,7 +65,7 @@ namespace mediaGalleries {
DOMString galleryId;
// If the media gallery is on a removable device, a unique id for the
- // device.
+ // device while the device is online.
DOMString? deviceId;
// True if the media gallery is on a removable device.
@@ -45,17 +74,103 @@ namespace mediaGalleries {
// 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;
+ };
+
+ [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 MediaMetadata {
+ // The browser sniffed mime type.
+ DOMString mimeType;
+
+ // Defined for images and video. In pixels.
+ long? height;
+ long? width;
+
+ // Defined for audio and video. In seconds.
+ double? duration;
+
+ // Defined for images and video. In degrees.
+ long? rotation;
+
+ // Generic metadata tags.
+ DOMString? album;
+ DOMString? artist;
+ DOMString? comment;
+ DOMString? copyright;
+ long? disc;
+ DOMString? genre;
+ DOMString? language;
+ DOMString? title;
+ long? track;
};
+ callback MediaMetadataCallback = void (MediaMetadata metadata);
+
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);
+
+ // 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.
+ static void startMediaScan();
+
+ // Cancel any pending media scan. Well behaved apps should provide a way
+ // for the user to cancel scans they start.
+ 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.
+ 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.
+ 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);
};
+ interface Events {
+ // The pending media scan has changed state. See details for more
+ // information.
+ static void onScanProgress(ScanProgressDetails details);
+ };
};
diff --git a/idl/media_galleries_private.idl b/idl/media_galleries_private.idl
index e04df524..64312a5b 100644
--- a/idl/media_galleries_private.idl
+++ b/idl/media_galleries_private.idl
@@ -2,25 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// This is a private API since M23. This will be superceded by the
-// systeminfo.storage API in the future.
-// See http://crbug.com/166950 and http://crbug.com/177605.
+// This is a private API since M23. Gallery watching needs to be implemented
+// on platforms others than Windows and then moved to the public API.
+// See http://crbug.com/166950.
namespace mediaGalleriesPrivate {
- // A dictionary that describes an attached device.
- [inline_doc] dictionary DeviceAttachmentDetails {
- // The name of the device.
- DOMString deviceName;
-
- // A transient id that unique identifies the device.
- DOMString deviceId;
- };
-
- // A dictionary that describes a detached device.
- [inline_doc] dictionary DeviceDetachmentDetails {
- // A transient id that unique identifies the device.
- DOMString deviceId;
- };
-
// A dictionary that describes the modified gallery.
[inline_doc] dictionary GalleryChangeDetails {
// Gallery identifier.
@@ -28,12 +13,6 @@ namespace mediaGalleriesPrivate {
};
interface Events {
- // Fired when a media device gets attached.
- static void onDeviceAttached(DeviceAttachmentDetails details);
-
- // Fired when a media device gets detached.
- static void onDeviceDetached(DeviceDetachmentDetails details);
-
// Fired when a media gallery is changed.
static void onGalleryChanged(GalleryChangeDetails details);
};
diff --git a/idl/metrics_private.json b/idl/metrics_private.json
index 06e52740..28edefe1 100644
--- a/idl/metrics_private.json
+++ b/idl/metrics_private.json
@@ -33,7 +33,7 @@
{
"name": "callback",
"type": "function",
- "optional": "false",
+ "optional": false,
"parameters": [
{ "name": "is_enabled", "type": "boolean" }
]
@@ -49,7 +49,7 @@
{
"name": "callback",
"type": "function",
- "optional": "false",
+ "optional": false,
"parameters": [
{ "name": "group", "type": "string" }
]
@@ -65,7 +65,7 @@
{
"name": "callback",
"type": "function",
- "optional": "false",
+ "optional": false,
"parameters": [
{
"name": "params",
@@ -147,6 +147,15 @@
{"name": "value", "type": "integer"}
]
},
+ {
+ "name": "recordSparseValue",
+ "type": "function",
+ "description": "Increments the count associated with |value| in the sparse histogram defined by the |metricName|.",
+ "parameters": [
+ {"name": "metricName", "type": "string"},
+ {"name": "value", "type": "integer"}
+ ]
+ },
{
"name": "recordValue",
"type": "function",
diff --git a/idl/networking_private.json b/idl/networking_private.json
index 750860f9..5ef6d7bd 100644
--- a/idl/networking_private.json
+++ b/idl/networking_private.json
@@ -9,6 +9,7 @@
"compiler_options": {
"implemented_in": "chrome/browser/extensions/api/networking_private/networking_private_api.h"
},
+ "platforms": ["chromeos", "win", "mac"],
"types" : [
{
"id": "NetworkProperties",
@@ -352,6 +353,55 @@
"description": "A callback function that receives base64-encoded encrypted data to send to a trusted device."
}
]
+ },
+ {
+ "name": "setWifiTDLSEnabledState",
+ "description": "Enables TDLS for wifi traffic with a specified peer if available.",
+ "parameters": [
+ {
+ "name": "ip_or_mac_address",
+ "type": "string",
+ "description": "The IP or MAC address of the peer with which to enable a TDLS connection."
+ },
+ {
+ "name": "enabled",
+ "type": "boolean",
+ "description": "If true, enable TDLS, otherwise disable TDLS."
+ },
+ {
+ "name": "callback",
+ "type": "function",
+ "parameters": [
+ {
+ "name": "status",
+ "type": "string"
+ }
+ ],
+ "description": "A callback function that receives a string with an error or the current TDLS status. 'Failed' indicates that the request failed (e.g. MAC address lookup failed). 'Timeout' indicates that the lookup timed out. Otherwise a valid status is returned (see getWifiTDLSStatus)."
+ }
+ ]
+ },
+ {
+ "name": "getWifiTDLSStatus",
+ "description": "Returns the current TDLS status for the specified peer.",
+ "parameters": [
+ {
+ "name": "ip_or_mac_address",
+ "type": "string",
+ "description": "The IP or MAC address of the peer."
+ },
+ {
+ "name": "callback",
+ "type": "function",
+ "parameters": [
+ {
+ "name": "status",
+ "type": "string"
+ }
+ ],
+ "description": "A callback function that receives a string with the current TDLS status which can be 'Connected', 'Disabled', 'Disconnected', 'Nonexistent', or 'Unknown'"
+ }
+ ]
}
],
"events": [
diff --git a/idl/notifications.idl b/idl/notifications.idl
index f916f015..da95e62c 100644
--- a/idl/notifications.idl
+++ b/idl/notifications.idl
@@ -50,20 +50,20 @@ namespace notifications {
dictionary NotificationOptions {
// Which type of notification to display.
- // Required for $ref:notifications.create method.
+ // Required for $(ref:notifications.create) method.
TemplateType? type;
// Sender's avatar, app icon, or a thumbnail for image notifications.
- // Required for $ref:notifications.create method.
+ // Required for $(ref:notifications.create) method.
DOMString? iconUrl;
[nodoc] NotificationBitmap? iconBitmap;
// Title of the notification (e.g. sender name for email).
- // Required for $ref:notifications.create method.
+ // Required for $(ref:notifications.create) method.
DOMString? title;
// Main notification content.
- // Required for $ref:notifications.create method.
+ // Required for $(ref:notifications.create) method.
DOMString? message;
// Alternate notification content with a lower-weight font.
@@ -123,7 +123,7 @@ namespace notifications {
// Updates an existing notification.
// |notificationId|: The id of the notification to be updated. This is
- // returned by $ref:notifications.create method.
+ // returned by $(ref:notifications.create) method.
// |options|: Contents of the notification to update to.
// |callback|: Called to indicate whether a matching notification existed.
static void update(DOMString notificationId,
@@ -132,7 +132,7 @@ namespace notifications {
// Clears the specified notification.
// |notificationId|: The id of the notification to be cleared. This is
- // returned by $ref:notifications.create method.
+ // returned by $(ref:notifications.create) method.
// |callback|: Called to indicate whether a matching notification existed.
static void clear(DOMString notificationId, ClearCallback callback);
@@ -158,6 +158,9 @@ namespace notifications {
// The user changes the permission level.
static void onPermissionLevelChanged(PermissionLevel level);
+
+ // The user clicked on a link for the app's notification settings.
+ static void onShowSettings();
};
};
diff --git a/idl/page_capture.json b/idl/page_capture.json
index f796d693..e0fd86b7 100644
--- a/idl/page_capture.json
+++ b/idl/page_capture.json
@@ -31,7 +31,7 @@
{
"name": "mhtmlData",
"type": "binary",
- "optional": "true",
+ "optional": true,
"description": "The MHTML data as a Blob."
}
]
diff --git a/idl/permissions.json b/idl/permissions.json
index 3ce74b43..a5047460 100644
--- a/idl/permissions.json
+++ b/idl/permissions.json
@@ -5,7 +5,7 @@
[
{
"namespace": "permissions",
- "description": "Use the chrome.permissions
API to request declared optional permissions at run time rather than install time, so users understand why the permissions are needed and grant only those that are necessary.",
+ "description": "Use the chrome.permissions
API to request declared optional permissions at run time rather than install time, so users understand why the permissions are needed and grant only those that are necessary.",
"types": [
{
"id": "Permissions",
@@ -15,13 +15,13 @@
"type": "array",
"items": {"type": "string"},
"optional": true,
- "description": "List of named permissions (does not include hosts or origins)."
+ "description": "List of named permissions (does not include hosts or origins). Anything listed here must appear in the optional_permissions
list in the manifest."
},
"origins": {
"type": "array",
"items": {"type": "string"},
"optional": true,
- "description": "List of origin permissions."
+ "description": "List of origin permissions. Anything listed here must be a subset of a host that appears in the optional_permissions
list in the manifest. For example, if http://*.example.com/
or http://*/
appears in optional_permissions
, you can request an origin of http://help.example.com/
. Any path is ignored."
}
}
}
@@ -96,7 +96,7 @@
{
"name": "request",
"type": "function",
- "description": "Requests access to the specified permissions. These permissions must be defined in the optional_permissions field of the manifest. If there are any problems requesting the permissions, $ref:runtime.lastError will be set.",
+ "description": "Requests access to the specified permissions. These permissions must be defined in the optional_permissions field of the manifest. If there are any problems requesting the permissions, $(ref:runtime.lastError) will be set.",
"parameters": [
{
"name": "permissions",
@@ -119,7 +119,7 @@
{
"name": "remove",
"type": "function",
- "description": "Removes access to the specified permissions. If there are any problems removing the permissions, $ref:runtime.lastError will be set.",
+ "description": "Removes access to the specified permissions. If there are any problems removing the permissions, $(ref:runtime.lastError) will be set.",
"parameters": [
{
"name": "permissions",
diff --git a/idl/preferences_private.json b/idl/preferences_private.json
index 4ceeb5fa..3660bee6 100644
--- a/idl/preferences_private.json
+++ b/idl/preferences_private.json
@@ -8,10 +8,31 @@
"description": "none",
"properties": {
"googleGeolocationAccessEnabled": {
+ "nocompile": true,
"$ref": "types.private.ChromeDirectSetting",
"value": ["googlegeolocationaccess.enabled", {"type":"boolean"}],
"description": "If enabled, Google services can access the user's location. This preference's value is a boolean, defaulting to false
."
}
- }
+ },
+ "functions": [
+ {
+ "name": "getSyncCategoriesWithoutPassphrase",
+ "description": "Returns a list of sync categories the user has enabled without using a custom passphrase for encryption. The possible values are those that can be returned from syncer::ModelTypeToString in sync/syncable/model_type.cc.",
+ "type": "function",
+ "parameters": [
+ {
+ "name": "callback",
+ "type": "function",
+ "parameters": [
+ {
+ "name": "categories",
+ "type": "array",
+ "items": {"type": "string"}
+ }
+ ]
+ }
+ ]
+ }
+ ]
}
]
diff --git a/idl/processes.json b/idl/processes.json
index 77b1ad77..9ff9dff6 100644
--- a/idl/processes.json
+++ b/idl/processes.json
@@ -20,6 +20,10 @@
"type": "integer",
"description": "The ID of the process, as provided by the OS."
},
+ "title": {
+ "type": "string",
+ "description": "The title of the process as seen in the task manager."
+ },
"type": {
"type": "string",
"enum": ["browser", "renderer", "extension", "notification", "plugin", "worker", "nacl", "utility", "gpu", "other"],
@@ -29,6 +33,10 @@
"type": "string",
"description": "The profile which the process is associated with."
},
+ "naclDebugPort": {
+ "type": "integer",
+ "description": "The debugging port for Native Client processes. Zero for other process types and for NaCl processes that do not have debugging enabled."
+ },
"tabs": {
"type": "array", "items": {"type": "integer", "minimum": 0},
"description": "Array of Tab IDs that have a page rendered by this process. The list will be non-empty for renderer processes only."
diff --git a/idl/proxy.json b/idl/proxy.json
index 2d28bb63..24a5a7ef 100644
--- a/idl/proxy.json
+++ b/idl/proxy.json
@@ -12,7 +12,7 @@
"type": "object",
"description": "An object encapsulating a single proxy server's specification.",
"properties": {
- "scheme": {"type": "string", "optional": true, "enum": ["http", "https", "socks4", "socks5"], "description": "The scheme (protocol) of the proxy server itself. Defaults to 'http'."},
+ "scheme": {"type": "string", "optional": true, "enum": ["http", "https", "quic", "socks4", "socks5"], "description": "The scheme (protocol) of the proxy server itself. Defaults to 'http'."},
"host": {"type": "string", "description": "The URI of the proxy server. This must be an ASCII hostname (in Punycode format). IDNA is not supported, yet."},
"port": {"type": "integer", "optional": true, "description": "The port of the proxy server. Defaults to a port that depends on the scheme."}
}
diff --git a/idl/reading_list_private.json b/idl/reading_list_private.json
new file mode 100644
index 00000000..7e1979d0
--- /dev/null
+++ b/idl/reading_list_private.json
@@ -0,0 +1,96 @@
+// 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.
+
+[
+ {
+ "namespace": "readingListPrivate",
+ "description": "none",
+ "types": [
+ {
+ "id": "Entry",
+ "type": "object",
+ "description": "An article entry from the reading list. May contain one or more pages.",
+ "properties": {
+ "id": {
+ "description": "A unique id for referring to the entry.",
+ "type": "string"
+ }
+ }
+ }
+ ],
+ "functions": [
+ {
+ "name": "addEntry",
+ "type": "function",
+ "description": "Adds an entry to the reading list. The callback is invoked only once article distillation is complete.",
+ "parameters": [
+ {
+ "type": "object",
+ "name": "entry",
+ "properties": {
+ "url": {
+ "description": "The url of the entry.",
+ "type": "string"
+ }
+ }
+ },
+ {
+ "type": "function",
+ "name": "callback",
+ "optional": true,
+ "parameters": [
+ {
+ "name": "result",
+ "$ref": "Entry",
+ "description": "The entry that was added."
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "removeEntry",
+ "type": "function",
+ "description": "Removes an entry with the given entry id.",
+ "parameters": [
+ {
+ "name": "id",
+ "type": "string",
+ "description": "A string containing an entry id."
+ },
+ {
+ "type": "function",
+ "name": "callback",
+ "parameters": [
+ {
+ "name": "result",
+ "$ref": "Entry",
+ "optional": true,
+ "description": "The entry that was removed or null if removal failed."
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "getEntries",
+ "type": "function",
+ "description": "Gets all the entries currently stored in the reading list.",
+ "parameters": [
+ {
+ "type": "function",
+ "name": "callback",
+ "parameters": [
+ {
+ "name": "result",
+ "type": "array",
+ "items": {"$ref": "Entry"}
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+]
diff --git a/idl/runtime.json b/idl/runtime.json
index 82ff4799..55704f1e 100644
--- a/idl/runtime.json
+++ b/idl/runtime.json
@@ -31,7 +31,7 @@
"type": "object",
"description": "An object containing information about the script context that sent a message or request.",
"properties": {
- "tab": {"$ref": "tabs.Tab", "optional": true, "description": "The $ref:tabs.Tab which opened the connection, if any. This property will only be present when the connection was opened from a tab (including content scripts), and only if the receiver is an extension, not an app."},
+ "tab": {"$ref": "tabs.Tab", "optional": true, "description": "The $(ref:tabs.Tab) which opened the connection, if any. This property will only be present when the connection was opened from a tab (including content scripts), and only if the receiver is an extension, not an app."},
"id": {"type": "string", "optional": true, "description": "The ID of the extension or app that opened the connection, if any."},
"url": {"type": "string", "optional": true, "description": "The URL of the page or frame that opened the connection, if any. This property will only be present when the connection was opened from a tab or content script."},
"tlsChannelId": {"type": "string", "optional": true, "description": "The TLS channel ID of the web page that opened the connection, if requested by the extension or app, and if available."}
@@ -111,9 +111,8 @@
}
},
{
- "name": "setUninstallUrl",
+ "name": "setUninstallURL",
"type": "function",
- "unpriviledged": true,
"description": "Sets the URL to be visited upon uninstallation. This may be used to clean up server-side data, do analytics, and implement surveys. Maximum 255 characters.",
"parameters": [
{
@@ -127,7 +126,6 @@
"name": "reload",
"description": "Reloads the app or extension.",
"type": "function",
- "nocompile": true,
"parameters": []
},
{
@@ -165,16 +163,15 @@
"name": "restart",
"description": "Restart the ChromeOS device when the app runs in kiosk mode. Otherwise, it's no-op.",
"type": "function",
- "nocompile": true,
"parameters": []
},
{
"name": "connect",
"type": "function",
"nocompile": true,
- "description": "Attempts to connect to other listeners within the extension/app (such as the background page), or other extensions/apps. This is useful for content scripts connecting to their extension processes. Note that this does not connect to any listeners in a content script. Extensions may connect to content scripts embedded in tabs via $ref:tabs.connect.",
+ "description": "Attempts to connect to connect listeners within an extension/app (such as the background page), or other extensions/apps. This is useful for content scripts connecting to their extension processes, inter-app/extension communication, and web messaging. Note that this does not connect to any listeners in a content script. Extensions may connect to content scripts embedded in tabs via $(ref:tabs.connect).",
"parameters": [
- {"type": "string", "name": "extensionId", "optional": true, "description": "The ID of the extension/app you want to connect to. If omitted, default is your own extension."},
+ {"type": "string", "name": "extensionId", "optional": true, "description": "The ID of the extension or app to connect to. If omitted, a connection will be attempted with your own extension. Required if sending messages from a web page for web messaging."},
{
"type": "object",
"name": "connectInfo",
@@ -187,7 +184,7 @@
],
"returns": {
"$ref": "Port",
- "description": "Port through which messages can be sent and received. The port's $ref:[runtime.Port onDisconnect] event is fired if the extension/app does not exist. "
+ "description": "Port through which messages can be sent and received. The port's $(ref:runtime.Port onDisconnect) event is fired if the extension/app does not exist. "
}
},
{
@@ -212,9 +209,9 @@
"type": "function",
"nocompile": true,
"allowAmbiguousOptionalArguments": true,
- "description": "Sends a single message to onMessage event listeners within the extension (or another extension/app). Similar to chrome.runtime.connect, but only sends a single message with an optional response. The $ref:runtime.onMessage event is fired in each extension page of the extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use $ref:tabs.sendMessage.",
+ "description": "Sends a single message to event listeners within your extension/app or a different extension/app. Similar to $(ref:runtime.connect) but only sends a single message, with an optional response. If sending to your extension, the $(ref:runtime.onMessage) event will be fired in each page, or $(ref:runtime.onMessageExternal), if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use $(ref:tabs.sendMessage).",
"parameters": [
- {"type": "string", "name": "extensionId", "optional": true, "description": "The extension ID of the extension you want to connect to. If omitted, default is your own extension."},
+ {"type": "string", "name": "extensionId", "optional": true, "description": "The ID of the extension/app to send the message to. If omitted, the message will be sent to your own extension/app. Required if sending messages from a web page for web messaging."},
{ "type": "any", "name": "message" },
{
"type": "object",
@@ -232,7 +229,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 extension, 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 extension, the callback will be called with no arguments and $(ref:runtime.lastError) will be set to the error message."
}
]
}
@@ -265,7 +262,7 @@
{
"name": "response",
"type": "any",
- "description": "The response message send by the native messaging host. If an error occurs while connecting to the native messaging host, the callback will be called with no arguments and $ref:runtime.lastError will be set to the error message.",
+ "description": "The response message sent by the native messaging host. If an error occurs while connecting to the native messaging host, the callback will be called with no arguments and $(ref:runtime.lastError) will be set to the error message.",
"additionalProperties": {
"type": "any"
}
@@ -393,7 +390,7 @@
"name": "onBrowserUpdateAvailable",
"type": "function",
"description": "Fired when a Chrome update is available, but isn't installed immediately because a browser restart is required.",
- "nodoc": true,
+ "deprecated": "Please use $(ref:runtime.onRestartRequired).",
"parameters": []
},
{
@@ -434,7 +431,7 @@
],
"returns": {
"type": "boolean",
- "optional": "true",
+ "optional": true,
"description": "Return true from the event listener if you wish to call sendResponse
after the event listener returns."
}
},
@@ -452,7 +449,7 @@
],
"returns": {
"type": "boolean",
- "optional": "true",
+ "optional": true,
"description": "Return true from the event listener if you wish to call sendResponse
after the event listener returns."
}
},
diff --git a/idl/serial.idl b/idl/serial.idl
index fff23bc2..2f4979a2 100644
--- a/idl/serial.idl
+++ b/idl/serial.idl
@@ -11,6 +11,17 @@ namespace serial {
// argument to chrome.serial.connect
in order to connect to
// this device.
DOMString path;
+
+ // A PCI or USB vendor ID if one can be determined for the underlying
+ // device.
+ long? vendorId;
+
+ // A USB product ID if one can be determined for the underlying device.
+ long? productId;
+
+ // A human-readable display name for the underlying device if one can be
+ // queried from the host driver.
+ DOMString? displayName;
};
callback GetDevicesCallback = void (DeviceInfo[] ports);
diff --git a/idl/sessions.json b/idl/sessions.json
index 48c09e90..a063d920 100644
--- a/idl/sessions.json
+++ b/idl/sessions.json
@@ -16,7 +16,7 @@
"minimum": 0,
"maximum": 25,
"optional": true,
- "description": "The maximum number of entries to be fetched in the requested list. Omit this parameter to fetch the maximum number of entries ($ref:MAX_SESSION_RESULTS)."
+ "description": "The maximum number of entries to be fetched in the requested list. Omit this parameter to fetch the maximum number of entries ($(ref:sessions.MAX_SESSION_RESULTS))."
}
}
},
@@ -25,8 +25,8 @@
"type": "object",
"properties": {
"lastModified": {"type": "integer", "description": "The time when the window or tab was closed or modified, represented in milliseconds since the epoch."},
- "tab": {"$ref": "tabs.Tab", "optional": true, "description": "The $ref:tabs.Tab, if this entry describes a tab. Either this or $ref:Session.window will be set."},
- "window": {"$ref": "windows.Window", "optional": true, "description": "The $ref:windows.Window, if this entry describes a window. Either this or $ref:Session.tab will be set."}
+ "tab": {"$ref": "tabs.Tab", "optional": true, "description": "The $(ref:tabs.Tab), if this entry describes a tab. Either this or $(ref:sessions.Session.window) will be set."},
+ "window": {"$ref": "windows.Window", "optional": true, "description": "The $(ref:windows.Window), if this entry describes a window. Either this or $(ref:sessions.Session.tab) will be set."}
}
},
{
@@ -75,7 +75,7 @@
"name": "callback",
"parameters": [
{
- "name": "devices", "type": "array", "items": { "$ref": "Device" }, "description": "The list of $ref:Device objects for each synced session, sorted in order from device with most recently modified session to device with least recently modified session. $ref:tabs.Tab objects are sorted by recency in the $ref:windows.Window of the $ref:Session objects."
+ "name": "devices", "type": "array", "items": { "$ref": "Device" }, "description": "The list of $(ref:sessions.Device) objects for each synced session, sorted in order from device with most recently modified session to device with least recently modified session. $(ref:tabs.Tab) objects are sorted by recency in the $(ref:windows.Window) of the $(ref:sessions.Session) objects."
}
]
}
@@ -84,13 +84,13 @@
{
"name": "restore",
"type": "function",
- "description": "Reopens a $ref:windows.Window or $ref:tabs.Tab, with an optional callback to run when the entry has been restored.",
+ "description": "Reopens a $(ref:windows.Window) or $(ref:tabs.Tab), with an optional callback to run when the entry has been restored.",
"parameters": [
{
"type": "string",
"name": "sessionId",
"optional": true,
- "description": "The $ref:windows.Window.sessionId, or $ref:tabs.Tab.sessionId to restore."
+ "description": "The $(ref:windows.Window.sessionId), or $(ref:tabs.Tab.sessionId) to restore."
},
{
"type": "function",
@@ -100,7 +100,7 @@
{
"$ref": "Session",
"name": "restoredSession",
- "description": "A $ref:Session containing the restored $ref:windows.Window or $ref:tabs.Tab object."
+ "description": "A $(ref:sessions.Session) containing the restored $(ref:windows.Window) or $(ref:tabs.Tab) object."
}
]
}
@@ -110,7 +110,7 @@
"properties": {
"MAX_SESSION_RESULTS": {
"value": 25,
- "description": "The maximum number of $ref:Session that will be included in a requested list."
+ "description": "The maximum number of $(ref:sessions.Session) that will be included in a requested list."
}
}
}
diff --git a/idl/streams_private.idl b/idl/streams_private.idl
new file mode 100644
index 00000000..2d3badaa
--- /dev/null
+++ b/idl/streams_private.idl
@@ -0,0 +1,39 @@
+// 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 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;
+ };
+
+ 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/idl/streams_private.json b/idl/streams_private.json
deleted file mode 100644
index f2483456..00000000
--- a/idl/streams_private.json
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 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.
-
-[
- {
- "namespace":"streamsPrivate",
- "description": "none",
- "events": [
- {
- "name": "onExecuteMimeTypeHandler",
- "type": "function",
- "description": "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.",
- "parameters": [
- {
- "name": "mimeType",
- "type": "string",
- "description": "The MIME type of the intercepted URL request."
- },
- {
- "name": "originalUrl",
- "type": "string",
- "description": "The original URL that was intercepted."
- },
- {
- "name": "streamUrl",
- "type": "string",
- "description": "The URL that the stream can be read from."
- },
- {
- "name": "tabId",
- "type": "integer",
- "description": "The ID of the tab that opened the stream. If the stream is not opened in a tab, it will be -1."
- },
- {
- "name": "expectedContentSize",
- "type": "integer",
- "description": "The amount of data the Stream should contain, if known. If there is no information on the size it will be -1."
- }
- ]
- }
- ],
-
- "functions": [
- ]
- }
-]
-
diff --git a/idl/sync_file_system.idl b/idl/sync_file_system.idl
index 9a025875..c1e2eebe 100644
--- a/idl/sync_file_system.idl
+++ b/idl/sync_file_system.idl
@@ -66,18 +66,18 @@ namespace syncFileSystem {
// but file will no longer exist.
[instanceOf=Entry] object fileEntry;
- // Resulting file status after $ref:onFileStatusChanged event.
+ // Resulting file status after $(ref:onFileStatusChanged) event.
// The status value can be 'synced'
,
// 'pending'
or 'conflicting'
.
FileStatus status;
- // Sync action taken to fire $ref:onFileStatusChanged event.
+ // Sync action taken to fire $(ref:onFileStatusChanged) event.
// The action value can be
// 'added'
, 'updated'
or 'deleted'
.
// Only applies if status is 'synced'
.
SyncAction? action;
- // Sync direction for the $ref:onFileStatusChanged event.
+ // Sync direction for the $(ref:onFileStatusChanged) event.
// Sync direction value can be
// 'local_to_remote'
or 'remote_to_local'
.
// Only applies if status is 'synced'
.
@@ -137,7 +137,13 @@ namespace syncFileSystem {
// Returns a syncable filesystem backed by Google Drive.
// The returned DOMFileSystem
instance can be operated on
// in the same way as the Temporary and Persistant file systems (see
- // http://www.w3.org/TR/file-system-api/).
+ // http://www.w3.org/TR/file-system-api/),
+ // except that the filesystem object returned for Sync FileSystem does
+ // NOT support directory operations (yet). You can get a list
+ // of file entries by reading the root directory (by
+ // creating a new DirectoryReader),
+ // but cannot create a new directory in it.
+ //
// Calling this multiple times from
// the same app will return the same handle to the same file system.
static void requestFileSystem(GetFileSystemCallback callback);
@@ -163,7 +169,7 @@ namespace syncFileSystem {
static void getUsageAndQuota([instanceOf=DOMFileSystem] object fileSystem,
QuotaAndUsageCallback callback);
- // Returns the $ref:FileStatus for the given fileEntry
.
+ // Returns the $(ref:FileStatus) for the given fileEntry
.
// The status value can be 'synced'
,
// 'pending'
or 'conflicting'
.
// Note that 'conflicting'
state only happens when
@@ -171,7 +177,7 @@ namespace syncFileSystem {
static void getFileStatus([instanceOf=Entry] object fileEntry,
GetFileStatusCallback callback);
- // Returns each $ref:FileStatus for the given fileEntry
array.
+ // Returns each $(ref:FileStatus) for the given fileEntry
array.
// Typically called with the result from dirReader.readEntries().
static void getFileStatuses(object[] fileEntries,
GetFileStatusesCallback callback);
diff --git a/idl/system_cpu.idl b/idl/system_cpu.idl
index 0516679d..bb3ac857 100644
--- a/idl/system_cpu.idl
+++ b/idl/system_cpu.idl
@@ -5,13 +5,45 @@
// Use the system.cpu
API to query CPU metadata.
namespace system.cpu {
+ // Counters for assessing CPU utilization. Each field is monotonically
+ // increasing while the processor is powered on. Values are in milliseconds.
+ dictionary CpuTime {
+ // The cumulative time used by userspace programs on this processor.
+ double user;
+
+ // The cumulative time used by kernel programs on this processor.
+ double kernel;
+
+ // The cumulative time spent idle by this processor.
+ double idle;
+
+ // The total cumulative time for this processor. This value is equal to
+ // user + kernel + idle.
+ double total;
+ };
+
+ dictionary ProcessorInfo {
+ // Cumulative usage info for this logical processor.
+ CpuTime usage;
+ };
+
dictionary CpuInfo {
// The number of logical processors.
long numOfProcessors;
+
// The architecture name of the processors.
DOMString archName;
+
// The model name of the processors.
DOMString modelName;
+
+ // A set of feature codes indicating some of the processor's capabilities.
+ // The currently supported codes are "mmx", "sse", "sse2", "sse3", "ssse3",
+ // "sse4_1", "sse4_2", and "avx".
+ DOMString[] features;
+
+ // Information about each logical processor.
+ ProcessorInfo[] processors;
};
callback CpuInfoCallback = void (CpuInfo info);
diff --git a/idl/system_display.idl b/idl/system_display.idl
index 2a34d9e8..b971f3ee 100644
--- a/idl/system_display.idl
+++ b/idl/system_display.idl
@@ -108,7 +108,7 @@ namespace system.display {
// together with boundsOriginY
, if boundsOriginY
// is set. Note that, when updating the display origin, some constraints
// will be applied, so the final bounds origin may be different than the one
- // set. The final bounds can be retrieved using $ref:getInfo.
+ // set. The final bounds can be retrieved using $(ref:getInfo).
// The bounds origin is applied after rotation
.
// The bounds origin cannot be changed on the primary display. Note that is
// also invalid to set bounds origin values if isPrimary
is
@@ -128,14 +128,14 @@ namespace system.display {
static void getInfo(DisplayInfoCallback callback);
// Updates the properties for the display specified by |id|, according to
- // the information provided in |info|. On failure, $ref:runtime.lastError
+ // the information provided in |info|. On failure, $(ref:runtime.lastError)
// will be set.
// |id|: The display's unique identifier.
// |info|: The information about display properties that should be changed.
// A property will be changed only if a new value for it is specified in
// |info|.
// |callback|: Empty function called when the function finishes. To find out
- // whether the function succeeded, $ref:runtime.lastError should be
+ // whether the function succeeded, $(ref:runtime.lastError) should be
// queried.
static void setDisplayProperties(
DOMString id,
diff --git a/idl/system_private.json b/idl/system_private.json
index 7d954501..ea9ae38f 100644
--- a/idl/system_private.json
+++ b/idl/system_private.json
@@ -86,6 +86,24 @@
]
}
]
+ },
+ {
+ "name": "getApiKey",
+ "type": "function",
+ "description": "Gets Chrome's API key to use for requests to Google services.",
+ "parameters": [
+ {
+ "type": "function",
+ "name": "callback",
+ "parameters": [
+ {
+ "name": "key",
+ "type": "string",
+ "description": "The API key."
+ }
+ ]
+ }
+ ]
}
],
"events": [
diff --git a/idl/tabs.json b/idl/tabs.json
index 4b4077d6..3bd8a571 100644
--- a/idl/tabs.json
+++ b/idl/tabs.json
@@ -11,12 +11,12 @@
"id": "Tab",
"type": "object",
"properties": {
- "id": {"type": "integer", "minimum": 0, "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."},
+ "id": {"type": "integer", "minimum": 0, "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."},
// 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."},
"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.", "nodoc": true},
+ "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.)"},
"pinned": {"type": "boolean", "description": "Whether the tab is pinned."},
@@ -27,7 +27,7 @@
"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."}
}
},
{
@@ -89,7 +89,7 @@
"name": "connect",
"nocompile": true,
"type": "function",
- "description": "Connects to the content script(s) in the specified tab. The $ref:runtime.onConnect event is fired in each content script running in the specified tab for the current extension. For more details, see Content Script Messaging.",
+ "description": "Connects to the content script(s) in the specified tab. The $(ref:runtime.onConnect) event is fired in each content script running in the specified tab for the current extension. For more details, see Content Script Messaging.",
"parameters": [
{
"type": "integer",
@@ -107,15 +107,15 @@
],
"returns": {
"$ref": "runtime.Port",
- "description": "A port that can be used to communicate with the content scripts running in the specified tab. The port's $ref:runtime.Port event is fired if the tab closes or does not exist. "
+ "description": "A port that can be used to communicate with the content scripts running in the specified tab. The port's $(ref:runtime.Port) event is fired if the tab closes or does not exist. "
}
},
{
"name": "sendRequest",
- "nodoc": true,
+ "deprecated": "Please use $(ref:runtime.sendMessage).",
"nocompile": true,
"type": "function",
- "description": "Deprecated: Please use sendMessage.",
+ "description": "Sends a single request to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The $(ref:extension.onRequest) event is fired in each content script running in the specified tab for the current extension.",
"parameters": [
{
"type": "integer",
@@ -134,7 +134,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 will be called with no arguments and $(ref:runtime.lastError) will be set to the error message."
}
]
}
@@ -144,7 +144,7 @@
"name": "sendMessage",
"nocompile": true,
"type": "function",
- "description": "Sends a single message to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The $ref:runtime.onMessage event is fired in each content script running in the specified tab for the current extension.",
+ "description": "Sends a single message to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The $(ref:runtime.onMessage) event is fired in each content script running in the specified tab for the current extension.",
"parameters": [
{
"type": "integer",
@@ -163,7 +163,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 will be called with no arguments and $(ref:runtime.lastError) will be set to the error message."
}
]
}
@@ -171,9 +171,9 @@
},
{
"name": "getSelected",
- "nodoc": true,
+ "deprecated": "Please use $(ref:tabs.query) {active: true}
.",
"type": "function",
- "description": "Deprecated. Please use query({'active': true}). Gets the tab that is selected in the specified window.",
+ "description": "Gets the tab that is selected in the specified window.",
"parameters": [
{
"type": "integer",
@@ -194,8 +194,8 @@
{
"name": "getAllInWindow",
"type": "function",
- "nodoc": true,
- "description": "Deprecated. Please use query({'windowId': windowId}). Gets details about all tabs in the specified window.",
+ "deprecated": "Please use $(ref:tabs.query) {windowId: windowId}
.",
+ "description": "Gets details about all tabs in the specified window.",
"parameters": [
{
"type": "integer",
@@ -242,10 +242,10 @@
"active": {
"type": "boolean",
"optional": true,
- "description": "Whether the tab should become the active tab in the window. Does not affect whether the window is focused (see $ref:windows.update). Defaults to true."
+ "description": "Whether the tab should become the active tab in the window. Does not affect whether the window is focused (see $(ref:windows.update)). Defaults to true."
},
"selected": {
- "nodoc": true,
+ "deprecated": "Please use active.",
"type": "boolean",
"optional": true,
"description": "Whether the tab should become the selected tab in the window. Defaults to true"
@@ -296,7 +296,7 @@
{
"name": "tab",
"optional": true,
- "description": "Details about the duplicated tab. The $ref:tabs.Tab object doesn't contain url
, title
and favIconUrl
if the \"tabs\"
permission has not been requested.",
+ "description": "Details about the duplicated tab. The $(ref:tabs.Tab) object doesn't contain url
, title
and favIconUrl
if the \"tabs\"
permission has not been requested.",
"$ref": "Tab"
}
]
@@ -357,7 +357,7 @@
"type": "integer",
"optional": true,
"minimum": -2,
- "description": "The ID of the parent window, or $ref:windows.WINDOW_ID_CURRENT for the current window."
+ "description": "The ID of the parent window, or $(ref:windows.WINDOW_ID_CURRENT) for the current window."
},
"windowType": {
"type": "string",
@@ -449,7 +449,7 @@
"active": {
"type": "boolean",
"optional": true,
- "description": "Whether the tab should be active. Does not affect whether the window is focused (see $ref:windows.update)."
+ "description": "Whether the tab should be active. Does not affect whether the window is focused (see $(ref:windows.update))."
},
"highlighted": {
"type": "boolean",
@@ -457,7 +457,7 @@
"description": "Adds or removes the tab from the current selection."
},
"selected": {
- "nodoc": true,
+ "deprecated": "Please use highlighted.",
"type": "boolean",
"optional": true,
"description": "Whether the tab should be selected."
@@ -484,7 +484,7 @@
"name": "tab",
"$ref": "Tab",
"optional": true,
- "description": "Details about the updated tab. The $ref:tabs.Tab object doesn't contain url
, title
and favIconUrl
if the \"tabs\"
permission has not been requested."
+ "description": "Details about the updated tab. The $(ref:tabs.Tab) object doesn't contain url
, title
and favIconUrl
if the \"tabs\"
permission has not been requested."
}
]
}
@@ -612,25 +612,9 @@
"description": "The target window. Defaults to the current window."
},
{
- "type": "object",
+ "$ref": "types.ImageDetails",
"name": "options",
- "optional": true,
- "description": "Set parameters of image capture, such as the format of the resulting image.",
- "properties": {
- "format": {
- "type": "string",
- "optional": true,
- "enum": ["jpeg", "png"],
- "description": "The format of the resulting image. Default is jpeg."
- },
- "quality": {
- "type": "integer",
- "optional": true,
- "minimum": 0,
- "maximum": 100,
- "description": "When format is 'jpeg', controls the quality of the resulting image. This value is ignored for PNG images. As quality is decreased, the resulting image will have more visual artifacts, and the number of bytes needed to store it will decrease."
- }
- }
+ "optional": true
},
{
"type": "function", "name": "callback", "parameters": [
@@ -744,7 +728,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: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. This event is not fired when a tab is moved between windows. For that, see $(ref:tabs.onDetached).",
"parameters": [
{"type": "integer", "name": "tabId", "minimum": 0},
{
@@ -760,9 +744,9 @@
},
{
"name": "onSelectionChanged",
- "nodoc": true,
+ "deprecated": "Please use $(ref:tabs.onActivated).",
"type": "function",
- "description": "Deprecated. Please use onActivated.",
+ "description": "Fires when the selected tab in a window changes.",
"parameters": [
{
"type": "integer",
@@ -785,9 +769,9 @@
},
{
"name": "onActiveChanged",
- "nodoc": true,
+ "deprecated": "Please use $(ref:tabs.onActivated).",
"type": "function",
- "description": "Deprecated. Please use onActivated.",
+ "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.",
"parameters": [
{
"type": "integer",
@@ -833,9 +817,9 @@
},
{
"name": "onHighlightChanged",
+ "deprecated": "Please use $(ref:tabs.onHighlighted).",
"type": "function",
- "nodoc": true,
- "description": "Deprecated. Please use onHighlighted.",
+ "description": "Fired when the highlighted or selected tabs in a window changes.",
"parameters": [
{
"type": "object",
diff --git a/idl/test.json b/idl/test.json
index 285c4970..61ae9864 100644
--- a/idl/test.json
+++ b/idl/test.json
@@ -23,6 +23,19 @@
"optional": true,
"description": "Additional string argument to pass to test."
},
+ "ftpServer": {
+ "type": "object",
+ "optional": true,
+ "description": "Details on the FTP server used to mock network responses. Will be set only if test calls ExtensionApiTest::StartFTPServer().",
+ "properties": {
+ "port": {
+ "type": "integer",
+ "description": "The port on which the FTP server is listening.",
+ "minimum": 1024,
+ "maximum": 65535
+ }
+ }
+ },
"testServer": {
"type": "object",
"optional": true,
@@ -353,6 +366,21 @@
"parameters": []
}
]
+ },
+ {
+ "name": "waitForRoundTrip",
+ "type": "function",
+ "description": "Sends a string message one round trip from the renderer to the browser process and back.",
+ "parameters": [
+ {"type": "string", "name": "message"},
+ {
+ "type": "function",
+ "name": "callback",
+ "parameters": [
+ {"type": "string", "name": "message"}
+ ]
+ }
+ ]
}
],
"events": [
diff --git a/idl/tts.json b/idl/tts.json
index ae8771e7..8449be6f 100644
--- a/idl/tts.json
+++ b/idl/tts.json
@@ -62,6 +62,11 @@
"description": "This voice's gender.",
"enum": ["male", "female"]
},
+ "remote": {
+ "type": "boolean",
+ "optional": true,
+ "description": "If true, the synthesis engine is a remote network resource. It may be higher latency and may incur bandwidth costs."
+ },
"extensionId": {
"type": "string",
"optional": true,
@@ -226,7 +231,7 @@
"type": "array",
"name": "voices",
"items": { "$ref": "TtsVoice" },
- "description": "Array of $ref:TtsVoice objects representing the available voices for speech synthesis."
+ "description": "Array of $(ref:tts.TtsVoice) objects representing the available voices for speech synthesis."
}
]
}
diff --git a/idl/types.json b/idl/types.json
index a2d13552..82442562 100644
--- a/idl/types.json
+++ b/idl/types.json
@@ -12,11 +12,12 @@
"type": "object",
"js_module": "ChromeSetting",
"customBindings": "ChromeSetting",
- "description": "An interface that allows access to a Chrome browser setting. See $ref:proxy.settings for an example.",
+ "description": "An interface that allows access to a Chrome browser setting. See $(ref:proxy.settings) for an example.",
"functions": [
{
"name": "get",
"type": "function",
+ "nocompile": true,
"description": "Gets the value of a setting.",
"parameters": [
{
@@ -63,6 +64,7 @@
{
"name": "set",
"type": "function",
+ "nocompile": true,
"description": "Sets the value of a setting.",
"parameters": [
{
@@ -94,6 +96,7 @@
{
"name": "clear",
"type": "function",
+ "nocompile": true,
"description": "Clears the setting, restoring any default value.",
"parameters": [
{
@@ -147,6 +150,26 @@
]
}
]
+ },
+ {
+ "id": "ImageDetails",
+ "type": "object",
+ "description": "Details about the format and quality of an image.",
+ "properties": {
+ "format": {
+ "type": "string",
+ "optional": true,
+ "enum": ["jpeg", "png"],
+ "description": "The format of the resulting image. Default is \"jpeg\"
."
+ },
+ "quality": {
+ "type": "integer",
+ "optional": true,
+ "minimum": 0,
+ "maximum": 100,
+ "description": "When format is \"jpeg\"
, controls the quality of the resulting image. This value is ignored for PNG images. As quality is decreased, the resulting image will have more visual artifacts, and the number of bytes needed to store it will decrease."
+ }
+ }
}
]
}
diff --git a/idl/virtual_keyboard_private.json b/idl/virtual_keyboard_private.json
index d58bb331..1f6c3a15 100644
--- a/idl/virtual_keyboard_private.json
+++ b/idl/virtual_keyboard_private.json
@@ -18,6 +18,7 @@
"type": {"type": "string", "description": "One of keyup or keydown.", "enum": ["keyup", "keydown"]},
"charValue": {"type": "integer", "description": "Unicode value of the key."},
"keyCode": {"type": "integer", "description": "Virtual key code, which is independent of the keyboard layout or modifier state."},
+ "keyName": {"type": "string", "description": "Name of the key, which is independent of modifier state."},
"modifiers": {"type": "integer", "optional": true, "description": "Flag for modifiers that are active. None = 0, Shift = 2, Control = 4, Alt = 8."}
}
}
@@ -91,6 +92,17 @@
}
]
},
+ {
+ "name": "lockKeyboard",
+ "type": "function",
+ "description": "Sets the lock state of the virtual keyboard. A locked keyboard remains visible even after a text area loses input focus.",
+ "parameters": [
+ {
+ "type": "boolean",
+ "name": "lock"
+ }
+ ]
+ },
{
"name": "keyboardLoaded",
"type": "function",
@@ -103,6 +115,36 @@
"parameters": []
}
]
+ },
+ {
+ "name": "getKeyboardConfig",
+ "type": "function",
+ "description": "Gets the virtual keyboard configuration.",
+ "parameters": [
+ {
+ "type": "function",
+ "name": "callback",
+ "optional": true,
+ "description": "Called when querying virtual keyboard configuration is complete.",
+ "parameters": [
+ {
+ "type": "object",
+ "name": "config",
+ "properties": {
+ "layout": {
+ "type": "string",
+ "minLength": 1,
+ "description": "Virtual keyboard layout string."
+ },
+ "a11ymode": {
+ "type": "boolean",
+ "description": "True if accessbility virtual keyboard is enabled."
+ }
+ }
+ }
+ ]
+ }
+ ]
}
],
"events": [
diff --git a/idl/wallpaper.json b/idl/wallpaper.json
index 59f7cb5b..a810b853 100644
--- a/idl/wallpaper.json
+++ b/idl/wallpaper.json
@@ -9,13 +9,12 @@
"implemented_in": "chrome/browser/chromeos/extensions/wallpaper_api.h"
},
"platforms": ["chromeos"],
- "description": "none",
+ "description": "Use the chrome.wallpaper
API to change the ChromeOS wallpaper.",
"functions": [
{
"name": "setWallpaper",
"type": "function",
- "description": "Sets wallpaper to the image from url with specified layout",
- "nodoc": "true",
+ "description": "Sets wallpaper to the image at url or wallpaperData with the specified layout",
"parameters": [
{
"name": "details",
@@ -29,7 +28,7 @@
"url": {
"type": "string",
"optional": true,
- "description": "The url of online wallpaper."
+ "description": "The URL of the wallpaper to be set."
},
"layout": {
"type": "string",
@@ -38,7 +37,7 @@
},
"name": {
"type": "string",
- "description": "The file name of saved wallpaper."
+ "description": "The file name of the saved wallpaper."
},
"thumbnail": {
"type": "boolean",
@@ -54,7 +53,8 @@
{
"type": "binary",
"optional": true,
- "name": "thumbnail"
+ "name": "thumbnail",
+ "description": "The jpeg encoded wallpaper thumbnail. It is generated by resizing the wallpaper to 128x60."
}
]
}
diff --git a/idl/wallpaper_private.json b/idl/wallpaper_private.json
index 49f5955b..23159062 100644
--- a/idl/wallpaper_private.json
+++ b/idl/wallpaper_private.json
@@ -21,7 +21,7 @@
{
"name": "getStrings",
"type": "function",
- "description": "Gets translated strings.",
+ "description": "Gets translated strings and initialization data.",
"nodoc": "true",
"parameters": [
{
@@ -31,7 +31,7 @@
{
"name": "result",
"type": "object",
- "additionalProperties": {"type": "string"}
+ "additionalProperties": {"type": "any"}
}
]
}
diff --git a/idl/web_navigation.json b/idl/web_navigation.json
index 783ecddd..63f1d9c4 100644
--- a/idl/web_navigation.json
+++ b/idl/web_navigation.json
@@ -149,7 +149,7 @@
"url": {"type": "string"},
"processId": {"type": "integer", "description": "The ID of the process runs the renderer for this tab."},
"frameId": {"type": "integer", "description": "0 indicates the navigation happens in the tab content window; a positive value indicates navigation in a subframe. Frame IDs are unique within a tab."},
- "transitionType": {"type": "string", "enum": ["link", "typed", "auto_bookmark", "auto_subframe", "manual_subframe", "generated", "start_page", "form_submit", "reload", "keyword", "keyword_generated"], "description": "Cause of the navigation. The same transition types as defined in the history API are used."},
+ "transitionType": {"type": "string", "enum": ["link", "typed", "auto_bookmark", "auto_subframe", "manual_subframe", "generated", "start_page", "form_submit", "reload", "keyword", "keyword_generated"], "description": "Cause of the navigation. The same transition types as defined in the history API are used. These are the same transition types as defined in the history API except with \"start_page\"
in place of \"auto_toplevel\"
(for backwards compatibility)."},
"transitionQualifiers": {"type": "array", "description": "A list of transition qualifiers.", "items": {"type": "string", "enum": ["client_redirect", "server_redirect", "forward_back", "from_address_bar"]}},
"timeStamp": {"type": "number", "description": "The time when the navigation was committed, in milliseconds since the epoch."}
}
@@ -283,7 +283,7 @@
"url": {"type": "string"},
"processId": {"type": "integer", "description": "The ID of the process runs the renderer for this tab."},
"frameId": {"type": "integer", "description": "0 indicates the navigation happens in the tab content window; a positive value indicates navigation in a subframe. Frame IDs are unique within a tab."},
- "transitionType": {"type": "string", "enum": ["link", "typed", "auto_bookmark", "auto_subframe", "manual_subframe", "generated", "start_page", "form_submit", "reload", "keyword", "keyword_generated"], "description": "Cause of the navigation. The same transition types as defined in the history API are used."},
+ "transitionType": {"type": "string", "enum": ["link", "typed", "auto_bookmark", "auto_subframe", "manual_subframe", "generated", "start_page", "form_submit", "reload", "keyword", "keyword_generated"], "description": "Cause of the navigation. The same transition types as defined in the history API are used. These are the same transition types as defined in the history API except with \"start_page\"
in place of \"auto_toplevel\"
(for backwards compatibility)."},
"transitionQualifiers": {"type": "array", "description": "A list of transition qualifiers.", "items": {"type": "string", "enum": ["client_redirect", "server_redirect", "forward_back", "from_address_bar"]}},
"timeStamp": {"type": "number", "description": "The time when the navigation was committed, in milliseconds since the epoch."}
}
@@ -327,7 +327,7 @@
"url": {"type": "string"},
"processId": {"type": "integer", "description": "The ID of the process runs the renderer for this tab."},
"frameId": {"type": "integer", "description": "0 indicates the navigation happens in the tab content window; a positive value indicates navigation in a subframe. Frame IDs are unique within a tab."},
- "transitionType": {"type": "string", "enum": ["link", "typed", "auto_bookmark", "auto_subframe", "manual_subframe", "generated", "start_page", "form_submit", "reload", "keyword", "keyword_generated"], "description": "Cause of the navigation. The same transition types as defined in the history API are used."},
+ "transitionType": {"type": "string", "enum": ["link", "typed", "auto_bookmark", "auto_subframe", "manual_subframe", "generated", "start_page", "form_submit", "reload", "keyword", "keyword_generated"], "description": "Cause of the navigation. The same transition types as defined in the history API are used. These are the same transition types as defined in the history API except with \"start_page\"
in place of \"auto_toplevel\"
(for backwards compatibility)."},
"transitionQualifiers": {"type": "array", "description": "A list of transition qualifiers.", "items": {"type": "string", "enum": ["client_redirect", "server_redirect", "forward_back", "from_address_bar"]}},
"timeStamp": {"type": "number", "description": "The time when the navigation was committed, in milliseconds since the epoch."}
}
diff --git a/idl/web_request.json b/idl/web_request.json
index 786625d6..5d279c76 100644
--- a/idl/web_request.json
+++ b/idl/web_request.json
@@ -66,7 +66,7 @@
"redirectUrl": {
"type": "string",
"optional": true,
- "description": "Only used as a response to the onBeforeRequest event. If set, the original request is prevented from being sent and is instead redirected to the given URL."
+ "description": "Only used as a response to the onBeforeRequest and onHeadersReceived events. If set, the original request is prevented from being sent/completed and is instead redirected to the given URL. Redirections to non-HTTP schemes such as data: are allowed. Redirects initiated by a redirect action use the original request method for the redirect, with one exception: If the redirect is initiated at the onHeadersReceived stage, then the redirect will be issued using the GET method."
},
"requestHeaders": {
"$ref": "HttpHeaders",
@@ -288,7 +288,7 @@
"tabId": {"type": "integer", "description": "The ID of the tab in which the request takes place. Set to -1 if the request isn't related to a tab."},
"type": {"type": "string", "enum": ["main_frame", "sub_frame", "stylesheet", "script", "image", "object", "xmlhttprequest", "other"], "description": "How the requested resource will be used."},
"timeStamp": {"type": "number", "description": "The time when this signal is triggered, in milliseconds since the epoch."},
- "statusLine": {"type": "string", "optional": true, "description": "HTTP status line of the response."},
+ "statusLine": {"type": "string", "description": "HTTP status line of the response or the 'HTTP/0.9 200 OK' string for HTTP/0.9 responses (i.e., responses that lack a status line)."},
"responseHeaders": {"$ref": "HttpHeaders", "optional": true, "description": "The HTTP response headers that have been received with this response."}
}
}
@@ -339,7 +339,7 @@
"challenger": {"type": "object", "description": "The server requesting authentication.", "properties": {"host": {"type": "string"}, "port": {"type": "integer"}}},
"isProxy": {"type": "boolean", "description": "True for Proxy-Authenticate, false for WWW-Authenticate."},
"responseHeaders": {"$ref": "HttpHeaders", "optional": true, "description": "The HTTP response headers that were received along with this response."},
- "statusLine": {"type": "string", "optional": true, "description": "HTTP status line of the response."}
+ "statusLine": {"type": "string", "description": "HTTP status line of the response or the 'HTTP/0.9 200 OK' string for HTTP/0.9 responses (i.e., responses that lack a status line) or an empty string if there are no headers."}
}
},
{
@@ -396,7 +396,7 @@
"fromCache": {"type": "boolean", "description": "Indicates if this response was fetched from disk cache."},
"statusCode": {"type": "integer", "description": "Standard HTTP status code returned by the server."},
"responseHeaders": {"$ref": "HttpHeaders", "optional": true, "description": "The HTTP response headers that were received along with this response."},
- "statusLine": {"type": "string", "optional": true, "description": "HTTP status line of the response."}
+ "statusLine": {"type": "string", "description": "HTTP status line of the response or the 'HTTP/0.9 200 OK' string for HTTP/0.9 responses (i.e., responses that lack a status line) or an empty string if there are no headers."}
}
}
],
@@ -441,7 +441,7 @@
"statusCode": {"type": "integer", "description": "Standard HTTP status code returned by the server."},
"redirectUrl": {"type": "string", "description": "The new URL."},
"responseHeaders": {"$ref": "HttpHeaders", "optional": true, "description": "The HTTP response headers that were received along with this redirect."},
- "statusLine": {"type": "string", "optional": true, "description": "HTTP status line of the response."}
+ "statusLine": {"type": "string", "description": "HTTP status line of the response or the 'HTTP/0.9 200 OK' string for HTTP/0.9 responses (i.e., responses that lack a status line) or an empty string if there are no headers."}
}
}
],
@@ -485,7 +485,7 @@
"fromCache": {"type": "boolean", "description": "Indicates if this response was fetched from disk cache."},
"statusCode": {"type": "integer", "description": "Standard HTTP status code returned by the server."},
"responseHeaders": {"$ref": "HttpHeaders", "optional": true, "description": "The HTTP response headers that were received along with this response."},
- "statusLine": {"type": "string", "optional": true, "description": "HTTP status line of the response."}
+ "statusLine": {"type": "string", "description": "HTTP status line of the response or the 'HTTP/0.9 200 OK' string for HTTP/0.9 responses (i.e., responses that lack a status line) or an empty string if there are no headers."}
}
}
],
diff --git a/idl/webrtc_cast_send_transport.idl b/idl/webrtc_cast_send_transport.idl
deleted file mode 100644
index 3070bde4..00000000
--- a/idl/webrtc_cast_send_transport.idl
+++ /dev/null
@@ -1,148 +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.
-
-// The chrome.webrtc.castSendTransport
API takes a track as
-// a source of media, and sends that media on the inner transport according to
-// the given RtpParams.
-namespace webrtc.castSendTransport {
- // Params for audio and video codec.
- dictionary CodecSpecificParam {
- DOMString key;
- DOMString value;
- };
-
- // RTP payload param.
- dictionary RtpPayloadParam {
- long payloadType;
-
- DOMString codecName;
-
- // Synchronization source identifier.
- long? ssrc;
-
- long? clockRate;
-
- long? minBitrate;
-
- long? maxBitrate;
-
- // The number of channels.
- long? channels;
-
- // Video width in pixels.
- long? width;
-
- // Video height in pixels.
- long? height;
-
- // A list of codec specific params.
- CodecSpecificParam[] codecSpecficParams;
- };
-
- // Cast transport capabilities
- dictionary CastTransportCaps {
- // RTP payload params.
- RtpPayloadParam[] payloads;
-
- DOMString[] rtcpFeatures;
-
- DOMString[] fecMechanisms;
- };
-
- // Cast transport params.
- dictionary CastTransportParams {
- // RTP payload params.
- RtpPayloadParam[] payloads;
-
- DOMString[] rtcpFeatures;
-
- DOMString[] fecMechanisms;
- };
-
- // Result of create
call.
- dictionary CreateInfo {
- // The ID of the newly created transport.
- long transportId;
- };
-
- // Callback from the create
method.
- // |id| : The transport id.
- callback CreateCallback = void (CreateInfo info);
-
- // Callback from the createParams
method.
- // |params| : The cast transport params.
- callback CreateParamsCallback = void (CastTransportParams params);
-
- // Callback from the getCaps
method.
- // |caps| : Capabilities of the cast transport.
- callback GetCapsCallback = void (CastTransportCaps caps);
-
- interface Functions {
- // Creates a cast send transport.
- // |track| : the media track encoded by this transport.
- // |innerTransportId| : the ID of the inner transport. The transport to be
- // created will send data on the inner transport.
- // |callback| : Called when the transport has been created.
- [nocompile] static void create(
- [instanceOf=MediaStreamTrack] object track,
- long innerTransportId,
- CreateCallback callback);
-
- // Destroys a cast send transport.
- // |transportId| : The transport ID.
- [nocompile] static void destroy(long transportId);
-
- // Creates suitable params given the capabilities.
- // |caps| : the capabilities.
- // |callback| : Called when the params have been created.
- [nocompile] static void getCaps(long transportId,
- GetCapsCallback callback);
-
- // Creates suitable params given the capabilities.
- // |transportId| : The transport ID.
- // |remoteCaps| : Capabilities of remote peer.
- // |callback| : Called when the params has been created.
- [nocompile] static void createParams(
- long transportId,
- CastTransportCaps remoteCaps,
- CreateParamsCallback callback);
-
- // Starts to use the transport by providing remote params info.
- // |transportId| : The transport ID.
- // |params| : Parameters set for this transport.
- [nocompile] static void start(long transportId,
- CastTransportParams params);
-
- // Stops using the transport.
- // |transportId| : The transport ID.
- [nocompile] static void stop(long transportId);
- };
-
- interface Events {
- // Event fired when a cast send transport has started.
- // |transportId| : The ID of the transport.
- static void onStarted(long transportId);
-
- // Event fired when a cast send transport has connected.
- // After this event, the transport is ready to send the track.
- // |transportId| : The ID of the transport.
- static void onConnected(long transportId);
-
- // Event fired when a cast send transport has stopped.
- // |transportId| : The ID of the transport.
- static void onStopped(long transportId);
-
- // Event fired when a cast send transport has timeout.
- // This happens when network has been congested for a while, or one side
- // left.
- // |transportId| : The ID of the transport.
- static void onTimeout(long transportId);
-
- // Event fired when a cast send transport has error.
- // |transportId| : The ID of the transport.
- // |errorString| : The error info.
- static void onError(long transportId, DOMString errorString);
- };
-};
-
diff --git a/idl/webrtc_cast_udp_transport.idl b/idl/webrtc_cast_udp_transport.idl
deleted file mode 100644
index 0370a38c..00000000
--- a/idl/webrtc_cast_udp_transport.idl
+++ /dev/null
@@ -1,49 +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.
-
-// The chrome.webrtc.castUdpTransport
API creates a UDP
-// transport for outer transport to send and receive data. This API is not
-// useful when standalone since it does not have send and receive methods.
-// It should be used as an inner transport for other transports such as
-// castSendTransport.
-namespace webrtc.castUdpTransport {
- // The UDP socket address and port.
- dictionary UdpParams {
- DOMString address;
- long port;
- };
-
- // Result of create
call.
- dictionary CreateInfo {
- // The ID of the newly created UDP transport.
- long tranportId;
-
- // The transport params.
- UdpParams params;
- };
-
- // Callback from the create
method.
- // |createInfo| : The transport info.
- // A null value indicates an error.
- callback CreateCallback = void (CreateInfo createInfo);
-
- interface Functions {
- // Creates a UDP transport.
- // |callback| : Called when the transport has been created.
- [nocompile] static void create(CreateCallback callback);
-
- // Destroys a UDP transport.
- // |transportId| : The transport ID.
- [nocompile] static void destroy(long transportId);
-
- // Starts to use the transport by providing remote UDP info.
- // |transportId| : The transport ID.
- // |remoteParams| : The address and port to send packets to.
- [nocompile] static void start(long transportId, UdpParams remoteParams);
-
- // Stops using the transport.
- // |transportId| : The transport ID.
- [nocompile] static void stop(long transportId);
- };
-};
diff --git a/idl/webstore.json b/idl/webstore.json
index 31cbd2d0..38d6de38 100644
--- a/idl/webstore.json
+++ b/idl/webstore.json
@@ -6,6 +6,40 @@
{
"namespace": "webstore",
"description": "Use the chrome.webstore
API to initiate app and extension installations \"inline\" from your site.",
+ "types": [
+ {
+ "id": "InstallStage",
+ "type": "string",
+ "enum": ["installing", "downloading"],
+ "description": "Enum used to indicate the stage of the installation process. 'downloading' indicates that the necessary files are being downloaded, and 'installing' indicates that the files are downloaded and are being actively installed."
+ }
+ ], // types
+ "events": [
+ {
+ "name": "onInstallStageChanged",
+ "description": "Fired when an inline installation enters a new InstallStage. In order to receive notifications about this event, listeners must be registered before the inline installation begins.",
+ "type": "function",
+ "parameters": [
+ {
+ "name": "stage",
+ "$ref": "InstallStage",
+ "description": "The InstallStage that just began."
+ }
+ ]
+ }, // onInstallStageChanged
+ {
+ "name": "onDownloadProgress",
+ "description": "Fired periodically with the download progress of an inline install. In order to receive notifications about this event, listeners must be registered before the inline installation begins.",
+ "type": "function",
+ "parameters": [
+ {
+ "name": "percentDownloaded",
+ "type": "number",
+ "description": "The progress of the download, between 0 and 1. 0 indicates no progress; 1.0 indicates complete."
+ }
+ ]
+ } // onDownloadProgress
+ ], // events
"functions": [
{
"name": "install",
@@ -39,6 +73,6 @@
}
]
} // install
- ]
+ ] // functions
} // webstore
]
diff --git a/idl/webstore_private.json b/idl/webstore_private.json
index f80ff335..8d8bea71 100644
--- a/idl/webstore_private.json
+++ b/idl/webstore_private.json
@@ -20,7 +20,7 @@
{
"name": "callback",
"type": "function",
- "optional": "true",
+ "optional": true,
"parameters": []
}
]
@@ -58,7 +58,7 @@
"name": "callback",
"type": "function",
"description": "Called when the install process completes. Upon failures, chrome.runtime.lastError will be set to 'user_canceled' or 'unknown_error'.",
- "optional": "true",
+ "optional": true,
"parameters": []
}
]
@@ -119,7 +119,7 @@
"name": "callback",
"type": "function",
"description": "Called when the user has either accepted/rejected the dialog, or some error occurred (such as invalid manifest or icon image data).",
- "optional": "true",
+ "optional": true,
"parameters": [
{
"name": "result",
@@ -143,7 +143,7 @@
{
"name": "callback",
"type": "function",
- "optional": "true",
+ "optional": true,
"parameters": []
}
]
@@ -155,7 +155,7 @@
{
"name": "callback",
"type": "function",
- "optional": "true",
+ "optional": true,
"parameters": []
}
]
@@ -167,7 +167,7 @@
{
"name": "callback",
"type": "function",
- "optional": "false",
+ "optional": false,
"parameters": [
{
"name": "info",
@@ -187,7 +187,7 @@
{
"name": "callback",
"type": "function",
- "optional": "false",
+ "optional": false,
"parameters": [
{ "name": "login", "type": "string" }
]
@@ -202,7 +202,7 @@
{
"name": "callback",
"type": "function",
- "optional": "true",
+ "optional": true,
"parameters": []
}
]
@@ -214,7 +214,7 @@
{
"name": "callback",
"type": "function",
- "optional": "false",
+ "optional": false,
"parameters": [
{
"name": "webgl_status",
@@ -232,7 +232,7 @@
{
"name": "callback",
"type": "function",
- "optional": "false",
+ "optional": false,
"parameters": [
{ "name": "is_enabled", "type": "boolean" }
]
@@ -246,7 +246,7 @@
{
"name": "callback",
"type": "function",
- "optional": "false",
+ "optional": false,
"parameters": [
{ "name": "is_incognito", "type": "boolean" }
]
diff --git a/idl/webview.json b/idl/webview.json
index b077a11b..3de3b6e2 100644
--- a/idl/webview.json
+++ b/idl/webview.json
@@ -6,6 +6,7 @@
{
"namespace": "webview",
"description": "none",
+ "dependencies": ["contextMenusInternal"],
"types": [
{
"id": "DataTypeSet",
@@ -58,6 +59,235 @@
}
],
"functions": [
+ {
+ "name": "contextMenusCreate",
+ "type": "function",
+ "returns": {
+ "choices": [
+ { "type": "integer" },
+ { "type": "string" }
+ ],
+ "description": "The ID of the newly created item."
+ },
+ "parameters": [
+ {
+ "type": "integer",
+ "name": "instanceId",
+ "nodoc": true
+ },
+ {
+ "type": "object",
+ "name": "createProperties",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": ["normal", "checkbox", "radio", "separator"],
+ "optional": true,
+ "description": "The type of menu item. Defaults to 'normal' if not specified."
+ },
+ "id": {
+ "type": "string",
+ "optional": true,
+ "description": "The unique ID to assign to this item. Cannot be the same as another ID for this webview."
+ },
+ "title": {
+ "type": "string",
+ "optional": true,
+ "description": "The text to be displayed in the item; this is required unless type is 'separator'. When the context is 'selection', you can use %s
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."
+ },
+ "contexts": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ // |launcher| isn't actually supported, this is listed here so that we can build |contexts| using the same code from chrome.contextMenus API.
+ "enum": ["all", "page", "frame", "selection", "link", "editable", "image", "video", "audio", "launcher"]
+ },
+ "minItems": 1,
+ "optional": true,
+ "description": "List of contexts this menu item will appear in. Defaults to ['page'] if not specified. Specifying ['all'] is equivalent to the combination of all other contexts except for 'launcher'. The 'launcher' context is not supported for clearData
.",
+ "properties": {
+ "since": {
+ "type": "number",
+ "optional": true,
+ "description": "Clear data accumulated on or after this date, represented in milliseconds since the epoch (accessible via the getTime method of the JavaScript Date
object). If absent, defaults to 0
(which would remove all browsing data)."
+ }
+ }
+ },
+ {
+ "id": "ClearDataTypeSet",
+ "type": "object",
+ "description": "A set of data types. Missing properties are interpreted as false
.",
+ "properties": {
+ "appcache": { "type": "boolean", "optional": true, "description": "Websites' appcaches." },
+ "cache": { "type": "boolean", "optional": true, "description": "The partition's cache. Note: This clears the entire cache regardless of the age passed to clearData
." },
+ "cookies": { "type": "boolean", "optional": true, "description": "The partition's cookies." },
+ "downloads": { "type": "boolean", "optional": true, "description": "The partition's download list." },
+ "fileSystems": { "type": "boolean", "optional": true, "description": "Websites' filesystems." },
+ "formData": { "type": "boolean", "optional": true, "description": "The partition's stored form data." },
+ "history": { "type": "boolean", "optional": true, "description": "The partition's history." },
+ "indexedDB": { "type": "boolean", "optional": true, "description": "Websites' IndexedDB data." },
+ "localStorage": { "type": "boolean", "optional": true, "description": "Websites' local storage data." },
+ "serverBoundCertificates": { "type": "boolean", "optional": true, "description": "Server-bound certificates." },
+ "pluginData": { "type": "boolean", "optional": true, "description": "Plugins' data." },
+ "passwords": { "type": "boolean", "optional": true, "description": "Stored passwords." },
+ "webSQL": { "type": "boolean", "optional": true, "description": "Websites' WebSQL data." }
+ }
+ },
{
"id": "InjectDetails",
"type": "object",
@@ -51,6 +83,69 @@
}
]
},
+ {
+ "id": "DialogController",
+ "type": "object",
+ "description": "Interface attached to dialog
DOM events.",
+ "functions": [
+ {
+ "name": "ok",
+ "description": "Accept the dialog. Equivalent to clicking OK in an alert
, confirm
, or prompt
dialog.",
+ "parameters": [
+ {
+ "type": "string",
+ "optional": true,
+ "name": "response",
+ "description": "The response string to provide to the guest when accepting a prompt
dialog."
+ }
+ ]
+ },
+ {
+ "name": "cancel",
+ "description": "Reject the dialog. Equivalent to clicking Cancel in a confirm
or prompt
dialog."
+ }
+ ]
+ },
+ {
+ "id": "FindCallbackResults",
+ "type": "object",
+ "description": "Contains all of the results of the find request.",
+ "properties": {
+ "numberOfMatches": {
+ "type": "integer",
+ "description": "The number of times searchText
was matched on the page."
+ },
+ "activeMatchOrdinal": {
+ "type": "integer",
+ "description": "The ordinal number of the current match."
+ },
+ "selectionRect": {
+ "$ref": "SelectionRect",
+ "description": "Describes a rectangle around the active match in screen coordinates."
+ },
+ "canceled": {
+ "type": "boolean",
+ "description": "Indicates whether this find request was canceled."
+ }
+ }
+ },
+ {
+ "id": "FindOptions",
+ "type": "object",
+ "description": "Options for the find request.",
+ "properties": {
+ "backward": {
+ "type": "boolean",
+ "description": "Flag to find matches in reverse order. The default value is false
.",
+ "optional": true
+ },
+ "matchCase": {
+ "type": "boolean",
+ "description": "Flag to match with case-sensitivity. The default value is false
.",
+ "optional": true
+ }
+ }
+ },
{
"id": "NewWindow",
"type": "object",
@@ -86,7 +181,7 @@
},
"functions": [
{ "name": "allow", "description": "Allow the permission request." },
- { "name": "deny", "description": "Deny the permission request." }
+ { "name": "deny", "description": "Deny the permission request. This is the default behavior if allow
is not called." }
]
},
{
@@ -101,7 +196,7 @@
},
"functions": [
{ "name": "allow", "description": "Allow the permission request." },
- { "name": "deny", "description": "Deny the permission request." }
+ { "name": "deny", "description": "Deny the permission request. This is the default behavior if allow
is not called." }
]
},
{
@@ -124,8 +219,75 @@
},
"functions": [
{ "name": "allow", "description": "Allow the permission request." },
+ { "name": "deny", "description": "Deny the permission request. This is the default behavior if allow
is not called." }
+ ]
+ },
+ {
+ "id": "DownloadPermissionRequest",
+ "type": "object",
+ "description": "The type of request
object which accompanies a download
permissionrequest DOM event.",
+ "properties": {
+ "requestMethod": {
+ "description": "The HTTP request type (e.g. GET
) associated with the download request.",
+ "type": "string"
+ },
+ "url": {
+ "description": "The requested download URL.",
+ "type": "string"
+ }
+ },
+ "functions": [
+ { "name": "allow", "description": "Allow the permission request." },
+ { "name": "deny", "description": "Deny the permission request. This is the default behavior if allow
is not called." }
+ ]
+ },
+ {
+ "id": "LoadPluginPermissionRequest",
+ "type": "object",
+ "description": "The type of request
object which accompanies a loadplugin
permissionrequest DOM event.deny
is not called.." },
{ "name": "deny", "description": "Deny the permission request." }
]
+ },
+ {
+ "id": "SelectionRect",
+ "type": "object",
+ "description": "(left, top)
is considered to be contained by the rectangle, but the coordinate (left + width, top)
is not.*://www.evil.com/*
:webview.request.onBeforeRequest.addListener(\r function(details) { return {cancel: true}; },\r {urls: [\"*://www.evil.com/*\"]},\r [\"blocking\"]);
onRequest
and onMessage
events. See declarativeWebRequest for API details.chrome.webViewRequest.*
counterparts. The following example code declaratively blocks all requests to \"example.com\"
on the webview myWebview
:
var rule = {\r conditions: [\r new chrome.webViewRequest.RequestMatcher({ url: { hostSuffix: 'example.com' } })\r ],\r actions: [ new chrome.webViewRequest.CancelRequest() ]\r};\rmyWebview.request.onRequest.addRules([rule]);", + "properties": {} } ], "functions": [ @@ -146,6 +308,30 @@ "returns": { "type": "boolean" }, "description": "Indicates whether or not it is possible to navigate forward through history." }, + { + "name": "clearData", + "type": "function", + "description": "
Clears browsing data for the webview
partition.
results
can be omitted if it is not utilized in the callback function body; for example, if the callback is only used to discern when the find request has completed.",
+ "optional": true
+ }
+ ]
+ }
+ ]
+ },
{
"name": "forward",
"type": "function",
@@ -186,6 +404,13 @@
"description": "Returns Chrome's internal process ID for the guest web page's current process, allowing embedders to know how many guests would be affected by terminating the process. Two guests will share a process only if they belong to the same app and have the same storage partition ID. The call is synchronous and returns the embedder's cached notion of the current process ID. The process ID isn't the same as the operating system's process ID.",
"parameters": []
},
+ {
+ "name": "getUserAgent",
+ "type": "function",
+ "returns": { "type": "string" },
+ "description": "Returns the user agent string used by the webview for guest page requests.",
+ "parameters": []
+ },
{
"name": "go",
"type": "function",
@@ -217,18 +442,49 @@
}
]
},
+ {
+ "name": "isUserAgentOverridden",
+ "type": "function",
+ "description": "Indicates whether or not the webview's user agent string has been overridden by $(ref:webviewTag.setUserAgentOverride)"
+ },
{
"name": "reload",
"type": "function",
"description": "Reloads the current top-level page.",
"parameters": []
},
+ {
+ "name": "setUserAgentOverride",
+ "type": "function",
+ "description": "Override the user agent string used by the webview for guest page requests.",
+ "parameters": [
+ {
+ "name": "userAgent",
+ "type": "string",
+ "description": "The user agent string to use."
+ }
+ ]
+ },
{
"name": "stop",
"type": "function",
"description": "Stops loading the current <webview> navigation if in progress.",
"parameters": []
},
+ {
+ "name": "stopFinding",
+ "type": "function",
+ "description": "Ends the current find session (clearing all highlighting) and cancels all find requests in progress.",
+ "parameters": [
+ {
+ "type": "string",
+ "name": "action",
+ "description": "Determines what to do with the active match after the find session has ended. clear
will clear the highlighting over the active match; keep
will keep the active match highlighted; activate
will keep the active match highlighted and simulate a user click on that match. The default action is keep
.",
+ "optional": true,
+ "enum": ["clear", "keep", "activate"]
+ }
+ ]
+ },
{
"name": "terminate",
"type": "function",
@@ -276,6 +532,29 @@
"description": "Fired when the guest window fires a load
event.The following example code modifies the default font size of the guest's body
element after the page loads:
webview.addEventListener('contentload', function() {\r webview.executeScript({ code: 'document.body.style.fontSize = \"42px\"' });\r});", "parameters": [] }, + { + "name": "dialog", + "options": { "supportsDom": true }, + "description": "Fired when the guest window attempts to open a modal dialog via
window.alert
, window.confirm
, or window.prompt
.Handling this event will block the guest process until each event listener returns or the dialog
object becomes unreachable (if preventDefault()
was called.)
The default behavior is to cancel the dialog.
", + "parameters": [ + { + "name": "messageType", + "type": "string", + "enum": ["alert", "confirm", "prompt"], + "description": "The type of modal dialog requested by the guest." + }, + { + "name": "messageText", + "type": "string", + "description": "The text the guest attempted to display in the modal dialog." + }, + { + "name": "dialog", + "$ref": "DialogController", + "description": "An interface that can be used to respond to the guest's modal request." + } + ] + }, { "name": "exit", "options": { "supportsDom": true }, @@ -294,6 +573,43 @@ } ] }, + { + "name": "findupdate", + "options": { "supportsDom": true }, + "description": "Fired when new find results are available for an active find request. This might happen multiple times for a single find request as matches are found.", + "parameters": [ + { + "name": "searchText", + "type": "string", + "description": "The string that is being searched for in the page." + }, + { + "name": "numberOfMatches", + "type": "integer", + "description": "The number of matches found forsearchText
on the page so far."
+ },
+ {
+ "name": "activeMatchOrdinal",
+ "type": "integer",
+ "description": "The ordinal number of the current active match, if it has been found. This will be 0
until then."
+ },
+ {
+ "name": "selectionRect",
+ "$ref": "SelectionRect",
+ "description": "Describes a rectangle around the active match, if it has been found, in screen coordinates."
+ },
+ {
+ "name": "canceled",
+ "type": "boolean",
+ "description": "Indicates whether the find request was canceled."
+ },
+ {
+ "name": "finalUpdate",
+ "type": "string",
+ "description": "Indicates that all find requests have completed and that no more findupdate
events will be fired until more find requests are made."
+ }
+ ]
+ },
{
"name": "loadabort",
"options": { "supportsDom": true },
@@ -426,18 +742,18 @@
"name": "permission",
"description": "The type of permission being requested.",
"type": "string",
- "enum": ["media", "geolocation", "pointerLock"]
+ "enum": ["media", "geolocation", "pointerLock", "download", "loadplugin"]
},
{
"name": "requestId",
- "description": "An number which uniquely identifies this request from the guest.",
+ "description": "A number which uniquely identifies this request from the guest.",
"type": "integer"
},
{
"name": "request",
"type": "object",
"properties": {},
- "description": "An object which holds details of the requested permission. Depending on the type of permission requested, this may be a $ref:MediaPermissionRequest, $ref:GeolocationPermissionRequest, or a $ref:PointerLockPermissionRequest."
+ "description": "An object which holds details of the requested permission. Depending on the type of permission requested, this may be a $(ref:webviewTag.MediaPermissionRequest), $(ref:webviewTag.GeolocationPermissionRequest), $(ref:webviewTag.PointerLockPermissionRequest), $(ref:webviewTag.DownloadPermissionRequest), or $(ref:webviewTag.LoadPluginPermissionRequest)."
}
]
},
@@ -497,6 +813,10 @@
"contentWindow": {
"$ref": "ContentWindow",
"description": "Object reference which can be used to post messages into the guest page."
+ },
+ "request": {
+ "$ref": "WebRequestEventInteface",
+ "description": "Interface which provides access to webRequest events on the guest page."
}
}
}
diff --git a/idl/windows.json b/idl/windows.json
index 8ef02ac8..00ded38b 100644
--- a/idl/windows.json
+++ b/idl/windows.json
@@ -14,28 +14,28 @@
"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. 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."},
"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."},
- "tabs": {"type": "array", "items": { "$ref": "tabs.Tab" }, "optional": true, "description": "Array of $ref:tabs.Tab objects representing the current tabs in the 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."},
+ "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": {
"type": "string",
"optional": true,
- "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. Under some circumstances a Window may not be assigned type property, for example when querying closed windows from the $(ref:sessions) API.",
"enum": ["normal", "popup", "panel", "app"]
},
"state": {
"type": "string",
"optional": true,
- "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. Under some circumstances a Window may not be assigned state property, for example when querying closed windows from the $(ref:sessions) API.",
"enum": ["normal", "minimized", "maximized", "fullscreen"]
},
"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."}
}
}
],
@@ -62,7 +62,7 @@
"optional": true,
"description": "",
"properties": {
- "populate": {"type": "boolean", "optional": true, "description": "If true, the $ref:windows.Window object will have a tabs property that contains a list of the $ref:tabs.Tab objects. The Tab
objects only contain the url
, title
and favIconUrl
properties if the extension's manifest file includes the \"tabs\"
permission." }
+ "populate": {"type": "boolean", "optional": true, "description": "If true, the $(ref:windows.Window) object will have a tabs property that contains a list of the $(ref:tabs.Tab) objects. The Tab
objects only contain the url
, title
and favIconUrl
properties if the extension's manifest file includes the \"tabs\"
permission." }
}
},
{
@@ -87,7 +87,7 @@
"optional": true,
"description": "",
"properties": {
- "populate": {"type": "boolean", "optional": true, "description": "If true, the $ref:windows.Window object will have a tabs property that contains a list of the $ref:tabs.Tab objects. The Tab
objects only contain the url
, title
and favIconUrl
properties if the extension's manifest file includes the \"tabs\"
permission." }
+ "populate": {"type": "boolean", "optional": true, "description": "If true, the $(ref:windows.Window) object will have a tabs property that contains a list of the $(ref:tabs.Tab) objects. The Tab
objects only contain the url
, title
and favIconUrl
properties if the extension's manifest file includes the \"tabs\"
permission." }
}
},
{
@@ -112,7 +112,7 @@
"optional": true,
"description": "",
"properties": {
- "populate": {"type": "boolean", "optional": true, "description": "If true, the $ref:windows.Window object will have a tabs property that contains a list of the $ref:tabs.Tab objects. The Tab
objects only contain the url
, title
and favIconUrl
properties if the extension's manifest file includes the \"tabs\"
permission." }
+ "populate": {"type": "boolean", "optional": true, "description": "If true, the $(ref:windows.Window) object will have a tabs property that contains a list of the $(ref:tabs.Tab) objects. The Tab
objects only contain the url
, title
and favIconUrl
properties if the extension's manifest file includes the \"tabs\"
permission." }
}
},
{
@@ -137,7 +137,7 @@
"optional": true,
"description": "",
"properties": {
- "populate": {"type": "boolean", "optional": true, "description": "If true, each $ref:windows.Window object will have a tabs property that contains a list of the $ref:tabs.Tab objects for that window. The Tab
objects only contain the url
, title
and favIconUrl
properties if the extension's manifest file includes the \"tabs\"
permission." }
+ "populate": {"type": "boolean", "optional": true, "description": "If true, each $(ref:windows.Window) object will have a tabs property that contains a list of the $(ref:tabs.Tab) objects for that window. The Tab
objects only contain the url
, title
and favIconUrl
properties if the extension's manifest file includes the \"tabs\"
permission." }
}
},
{
diff --git a/lib/chrome_app.dart b/lib/chrome_app.dart
index 41f811a5..f141f496 100644
--- a/lib/chrome_app.dart
+++ b/lib/chrome_app.dart
@@ -9,11 +9,15 @@ export 'gen/alarms.dart';
export 'gen/app.dart';
export 'gen/audio.dart';
export 'gen/bluetooth.dart';
+export 'gen/bluetooth_low_energy.dart';
+export 'gen/bluetooth_socket.dart';
export 'gen/browser.dart';
+export 'gen/commands.dart';
export 'gen/context_menus.dart';
export 'gen/events.dart';
export 'gen/file_system.dart';
export 'gen/gcm.dart';
+export 'gen/hid.dart';
export 'gen/i18n.dart';
export 'gen/identity.dart';
export 'gen/idle.dart';
diff --git a/lib/gen/alarms.dart b/lib/gen/alarms.dart
index d4448f68..a7ddddac 100644
--- a/lib/gen/alarms.dart
+++ b/lib/gen/alarms.dart
@@ -83,19 +83,23 @@ class ChromeAlarms extends ChromeApi {
* Clears the alarm with the given name.
* [name]: The name of the alarm to clear. Defaults to the empty string.
*/
- void clear([String name]) {
+ Future