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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 "optional": true | 78 "optional": true |
79 } | 79 } |
80 ] | 80 ] |
81 } | 81 } |
82 ] | 82 ] |
83 }, | 83 }, |
84 { | 84 { |
85 "name": "connect", | 85 "name": "connect", |
86 "nocompile": true, | 86 "nocompile": true, |
87 "type": "function", | 87 "type": "function", |
88 "description": "Connects to the content script(s) in the specified tab.
The $ref:extension.onConnect event is fired in each content script running in th
e specified tab for the current extension. For more details, see <a href='conten
t_scripts.html#messaging'>Content Script Messaging</a>.", | 88 "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='content_
scripts.html#messaging'>Content Script Messaging</a>.", |
89 "parameters": [ | 89 "parameters": [ |
90 { | 90 { |
91 "type": "integer", | 91 "type": "integer", |
92 "name": "tabId", | 92 "name": "tabId", |
93 "minimum": 0 | 93 "minimum": 0 |
94 }, | 94 }, |
95 { | 95 { |
96 "type": "object", | 96 "type": "object", |
97 "name": "connectInfo", | 97 "name": "connectInfo", |
98 "properties": { | 98 "properties": { |
99 "name": { "type": "string", "optional": true, "description": "Will
be passed into onConnect for content scripts that are listening for the connect
ion event." } | 99 "name": { "type": "string", "optional": true, "description": "Will
be passed into onConnect for content scripts that are listening for the connect
ion event." } |
100 }, | 100 }, |
101 "optional": true | 101 "optional": true |
102 } | 102 } |
103 ], | 103 ], |
104 "returns": { | 104 "returns": { |
105 "$ref": "extension.Port", | 105 "$ref": "runtime.Port", |
106 "description": "A port that can be used to communicate with the conten
t scripts running in the specified tab. The port's $ref:extension.Port event is
fired if the tab closes or does not exist. " | 106 "description": "A port that can be used to communicate with the conten
t scripts running in the specified tab. The port's $ref:runtime.Port event is fi
red if the tab closes or does not exist. " |
107 } | 107 } |
108 }, | 108 }, |
109 { | 109 { |
110 "name": "sendRequest", | 110 "name": "sendRequest", |
111 "nodoc": true, | 111 "nodoc": true, |
112 "nocompile": true, | 112 "nocompile": true, |
113 "type": "function", | 113 "type": "function", |
114 "description": "Deprecated: Please use sendMessage.", | 114 "description": "Deprecated: Please use sendMessage.", |
115 "parameters": [ | 115 "parameters": [ |
116 { | 116 { |
(...skipping 16 matching lines...) Expand all Loading... |
133 "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 $ref:runtime.lastError will be set to t
he error message." | 133 "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 $ref:runtime.lastError will be set to t
he error message." |
134 } | 134 } |
135 ] | 135 ] |
136 } | 136 } |
137 ] | 137 ] |
138 }, | 138 }, |
139 { | 139 { |
140 "name": "sendMessage", | 140 "name": "sendMessage", |
141 "nocompile": true, | 141 "nocompile": true, |
142 "type": "function", | 142 "type": "function", |
143 "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 $ref:extension.onMessage event is fired in each content script running in the
specified tab for the current extension.", | 143 "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 $ref:runtime.onMessage event is fired in each content script running in the sp
ecified tab for the current extension.", |
144 "parameters": [ | 144 "parameters": [ |
145 { | 145 { |
146 "type": "integer", | 146 "type": "integer", |
147 "name": "tabId", | 147 "name": "tabId", |
148 "minimum": 0 | 148 "minimum": 0 |
149 }, | 149 }, |
150 { | 150 { |
151 "type": "any", | 151 "type": "any", |
152 "name": "message" | 152 "name": "message" |
153 }, | 153 }, |
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
915 "properties": { | 915 "properties": { |
916 "windowId": {"type": "integer", "minimum": 0, "description": "the
window whose tab is closed." }, | 916 "windowId": {"type": "integer", "minimum": 0, "description": "the
window whose tab is closed." }, |
917 "isWindowClosing": {"type": "boolean", "description": "True when t
he tab is being closed because its window is being closed." } | 917 "isWindowClosing": {"type": "boolean", "description": "True when t
he tab is being closed because its window is being closed." } |
918 } | 918 } |
919 } | 919 } |
920 ] | 920 ] |
921 } | 921 } |
922 ] | 922 ] |
923 } | 923 } |
924 ] | 924 ] |
OLD | NEW |