OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 [ | 5 [ |
6 { | 6 { |
7 "namespace": "tabs", | 7 "namespace": "tabs", |
8 "dependencies": [ "extension", "windows" ], | 8 "dependencies": [ "extension", "windows" ], |
9 "types": [ | 9 "types": [ |
10 { | 10 { |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 "optional": true | 85 "optional": true |
86 } | 86 } |
87 ], | 87 ], |
88 "returns": { | 88 "returns": { |
89 "$ref": "Port", | 89 "$ref": "Port", |
90 "description": "A port that can be used to communicate with the conten
t scripts running in the specified tab. The port's <a href='extension.html#type-
Port'>onDisconnect</a> event is fired if the tab closes or does not exist. " | 90 "description": "A port that can be used to communicate with the conten
t scripts running in the specified tab. The port's <a href='extension.html#type-
Port'>onDisconnect</a> event is fired if the tab closes or does not exist. " |
91 } | 91 } |
92 }, | 92 }, |
93 { | 93 { |
94 "name": "sendRequest", | 94 "name": "sendRequest", |
| 95 "nodoc": true, |
95 "nocompile": true, | 96 "nocompile": true, |
96 "type": "function", | 97 "type": "function", |
97 "description": "Sends a single request to the content script(s) in the s
pecified tab, with an optional callback to run when a response is sent back. Th
e <a href='extension.html#event-onRequest'>chrome.extension.onRequest</a> event
is fired in each content script running in the specified tab for the current ext
ension.", | 98 "description": "Deprecated: Please use sendMessage.", |
98 "parameters": [ | 99 "parameters": [ |
99 { | 100 { |
100 "type": "integer", | 101 "type": "integer", |
101 "name": "tabId", | 102 "name": "tabId", |
102 "minimum": 0 | 103 "minimum": 0 |
103 }, | 104 }, |
104 { | 105 { |
105 "type": "any", | 106 "type": "any", |
106 "name": "request" | 107 "name": "request" |
107 }, | 108 }, |
108 { | 109 { |
109 "type": "function", | 110 "type": "function", |
110 "name": "responseCallback", | 111 "name": "responseCallback", |
111 "optional": true, | 112 "optional": true, |
112 "parameters": [ | 113 "parameters": [ |
113 { | 114 { |
114 "name": "response", | 115 "name": "response", |
115 "type": "any", | 116 "type": "any", |
116 "description": "The JSON response object sent by the handler of
the request. If an error occurs while connecting to the specified tab, the callb
ack will be called with no arguments and <a href='extension.html#property-lastEr
ror'>chrome.extension.lastError</a> will be set to the error message." | 117 "description": "The JSON response object sent by the handler of
the request. If an error occurs while connecting to the specified tab, the callb
ack will be called with no arguments and <a href='extension.html#property-lastEr
ror'>chrome.extension.lastError</a> will be set to the error message." |
117 } | 118 } |
118 ] | 119 ] |
119 } | 120 } |
120 ] | 121 ] |
121 }, | 122 }, |
122 { | 123 { |
| 124 "name": "sendMessage", |
| 125 "nocompile": true, |
| 126 "type": "function", |
| 127 "description": "Sends a single message to the content script(s) in the s
pecified tab, with an optional callback to run when a response is sent back. Th
e <a href='extension.html#event-onMessage'>chrome.extension.onMessage</a> event
is fired in each content script running in the specified tab for the current ext
ension.", |
| 128 "parameters": [ |
| 129 { |
| 130 "type": "integer", |
| 131 "name": "tabId", |
| 132 "minimum": 0 |
| 133 }, |
| 134 { |
| 135 "type": "any", |
| 136 "name": "message" |
| 137 }, |
| 138 { |
| 139 "type": "function", |
| 140 "name": "responseCallback", |
| 141 "optional": true, |
| 142 "parameters": [ |
| 143 { |
| 144 "name": "response", |
| 145 "type": "any", |
| 146 "description": "The JSON response object sent by the handler of
the message. If an error occurs while connecting to the specified tab, the callb
ack will be called with no arguments and <a href='extension.html#property-lastEr
ror'>chrome.extension.lastError</a> will be set to the error message." |
| 147 } |
| 148 ] |
| 149 } |
| 150 ] |
| 151 }, |
| 152 { |
123 "name": "getSelected", | 153 "name": "getSelected", |
124 "nodoc": true, | 154 "nodoc": true, |
125 "type": "function", | 155 "type": "function", |
126 "description": "Deprecated. Please use query({'active': true}). Gets the
tab that is selected in the specified window.", | 156 "description": "Deprecated. Please use query({'active': true}). Gets the
tab that is selected in the specified window.", |
127 "parameters": [ | 157 "parameters": [ |
128 { | 158 { |
129 "type": "integer", | 159 "type": "integer", |
130 "name": "windowId", | 160 "name": "windowId", |
131 "minimum": -2, | 161 "minimum": -2, |
132 "optional": true, | 162 "optional": true, |
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
843 "name": "removeInfo", | 873 "name": "removeInfo", |
844 "properties": { | 874 "properties": { |
845 "isWindowClosing": {"type": "boolean", "description": "True when t
he tab is being closed because its window is being closed." } | 875 "isWindowClosing": {"type": "boolean", "description": "True when t
he tab is being closed because its window is being closed." } |
846 } | 876 } |
847 } | 877 } |
848 ] | 878 ] |
849 } | 879 } |
850 ] | 880 ] |
851 } | 881 } |
852 ] | 882 ] |
OLD | NEW |