Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / chrome / common / extensions / api / tabs.json
index 4b4077d..3bd8a57 100644 (file)
         "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 <a href='messaging.html'>Content Script Messaging</a>.",
+        "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 <a href='messaging.html'>Content Script Messaging</a>.",
         "parameters": [
           {
             "type": "integer",
         ],
         "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",
               {
                 "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."
               }
             ]
           }
         "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",
               {
                 "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."
               }
             ]
           }
       },
       {
         "name": "getSelected",
-        "nodoc": true,
+        "deprecated": "Please use $(ref:tabs.query) <code>{active: true}</code>.",
         "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",
       {
         "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) <code>{windowId: windowId}</code>.",
+        "description": "Gets details about all tabs in the specified window.",
         "parameters": [
           {
             "type": "integer",
               "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 <var>true</var>."
+                "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 <var>true</var>."
               },
               "selected": {
-                "nodoc": true,
+                "deprecated": "Please use <em>active</em>.",
                 "type": "boolean",
                 "optional": true,
                 "description": "Whether the tab should become the selected tab in the window. Defaults to <var>true</var>"
               {
                 "name": "tab",
                 "optional": true,
-                "description": "Details about the duplicated tab. The $ref:tabs.Tab object doesn't contain <code>url</code>, <code>title</code> and <code>favIconUrl</code> if the <code>\"tabs\"</code> permission has not been requested.",
+                "description": "Details about the duplicated tab. The $(ref:tabs.Tab) object doesn't contain <code>url</code>, <code>title</code> and <code>favIconUrl</code> if the <code>\"tabs\"</code> permission has not been requested.",
                 "$ref": "Tab"
               }
             ]
                 "type": "integer",
                 "optional": true,
                 "minimum": -2,
-                "description": "The ID of the parent window, or $ref:windows.WINDOW_ID_CURRENT for the <a href='windows.html#current-window'>current window</a>."
+                "description": "The ID of the parent window, or $(ref:windows.WINDOW_ID_CURRENT) for the <a href='windows.html#current-window'>current window</a>."
               },
               "windowType": {
                 "type": "string",
               "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",
                 "description": "Adds or removes the tab from the current selection."
               },
               "selected": {
-                "nodoc": true,
+                "deprecated": "Please use <em>highlighted</em>.",
                 "type": "boolean",
                 "optional": true,
                 "description": "Whether the tab should be selected."
                 "name": "tab",
                 "$ref": "Tab",
                 "optional": true,
-                "description": "Details about the updated tab. The $ref:tabs.Tab object doesn't contain <code>url</code>, <code>title</code> and <code>favIconUrl</code> if the <code>\"tabs\"</code> permission has not been requested."
+                "description": "Details about the updated tab. The $(ref:tabs.Tab) object doesn't contain <code>url</code>, <code>title</code> and <code>favIconUrl</code> if the <code>\"tabs\"</code> permission has not been requested."
               }
             ]
           }
             "description": "The target window. Defaults to the <a href='windows.html#current-window'>current window</a>."
           },
           {
-            "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": [
       {
         "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},
           {
       },
       {
         "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",
       },
       {
         "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",
       },
       {
         "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",