Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Side by Side Diff: chrome/common/extensions/api/extension_api.json

Issue 8743017: Real (but naive) UDP socket sending. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initial. Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 [ 1 [
2 { 2 {
3 "namespace": "extension", 3 "namespace": "extension",
4 "types": [ 4 "types": [
5 { 5 {
6 "id": "MessageSender", 6 "id": "MessageSender",
7 "type": "object", 7 "type": "object",
8 "description": "An object containing information about the script contex t that sent a message or request.", 8 "description": "An object containing information about the script contex t that sent a message or request.",
9 "properties": { 9 "properties": {
10 "tab": {"$ref": "Tab", "optional": true, "description":"This property will <b>only</b> be present when the connection was opened from a tab or content script."}, 10 "tab": {"$ref": "Tab", "optional": true, "description":"This property will <b>only</b> be present when the connection was opened from a tab or content script."},
(...skipping 9153 matching lines...) Expand 10 before | Expand all | Expand 10 after
9164 "description": "A 'data' event represents data received on the socke t. An 'error' event represents an error." 9164 "description": "A 'data' event represents data received on the socke t. An 'error' event represents an error."
9165 }, 9165 },
9166 "byteCount": { 9166 "byteCount": {
9167 "type": "integer", 9167 "type": "integer",
9168 "optional": true, 9168 "optional": true,
9169 "description": "The number of bytes received in a 'data' event." 9169 "description": "The number of bytes received in a 'data' event."
9170 }, 9170 },
9171 "bytes": { 9171 "bytes": {
9172 "type": "blob", 9172 "type": "blob",
9173 "optional": true, 9173 "optional": true,
9174 "description": "The data received, as a Blob." 9174 "description": "The data received."
9175 }, 9175 },
9176 "errorCode": { 9176 "errorCode": {
9177 "type": "integer", 9177 "type": "integer",
9178 "description": "The error code, if the event type is 'error'.", 9178 "description": "The error code, if the event type is 'error'.",
9179 "optional": true 9179 "optional": true
9180 }, 9180 },
9181 "errorMessage": { 9181 "errorMessage": {
9182 "type": "string", 9182 "type": "string",
9183 "description": "The error description, if the event type is 'error'. ", 9183 "description": "The error description, if the event type is 'error'. ",
9184 "optional": true 9184 "optional": true
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
9233 "minimum": 1, 9233 "minimum": 1,
9234 "description": "The id of the newly created socket." 9234 "description": "The id of the newly created socket."
9235 } 9235 }
9236 } 9236 }
9237 } 9237 }
9238 ] 9238 ]
9239 } 9239 }
9240 ] 9240 ]
9241 }, 9241 },
9242 { 9242 {
9243 "name": "destroy",
9244 "type": "function",
9245 "description": "Destroys the socket. Each socket created should be destr oyed after use.",
9246 "parameters": [
9247 {
9248 "name": "socketId",
9249 "type": "integer",
9250 "description": "The socketId.",
9251 "minimum": 1
9252 }
9253 ]
9254 },
9255 {
9243 "name": "connect", 9256 "name": "connect",
9244 "type": "function", 9257 "type": "function",
9245 "description": "Connects the socket to the given address. In the case of a UDP socket, this method merely associates the address with the socket for fut ure sent data.", 9258 "description": "Connects the socket to the given address. In the case of a UDP socket, this method merely associates the address with the socket for fut ure sent data.",
9246 "parameters": [ 9259 "parameters": [
9247 { 9260 {
9248 "name": "socketId", 9261 "name": "socketId",
9249 "type": "integer", 9262 "type": "integer",
9250 "description": "The socketId.", 9263 "description": "The socketId.",
9251 "minimum": 1 9264 "minimum": 1
9252 }, 9265 },
(...skipping 17 matching lines...) Expand all
9270 { 9283 {
9271 "type": "boolean", 9284 "type": "boolean",
9272 "name": "result", 9285 "name": "result",
9273 "description": "True if successful, false otherwise." 9286 "description": "True if successful, false otherwise."
9274 } 9287 }
9275 ] 9288 ]
9276 } 9289 }
9277 ] 9290 ]
9278 }, 9291 },
9279 { 9292 {
9280 "name": "disconnect", 9293 "name": "close",
9281 "type": "function", 9294 "type": "function",
9282 "description": "Disconnects the socket.", 9295 "description": "Closes the socket.",
9283 "parameters": [ 9296 "parameters": [
9284 { 9297 {
9285 "name": "socketId", 9298 "name": "socketId",
9286 "type": "integer", 9299 "type": "integer",
9287 "description": "The socketId.", 9300 "description": "The socketId.",
9288 "minimum": 1 9301 "minimum": 1
9289 },
9290 {
9291 "name": "callback",
9292 "type": "function",
9293 "description": "Called when the disconnection is complete.",
9294 "parameters": [
9295 {
9296 "type": "boolean",
9297 "name": "result",
9298 "description": "True if successful, false otherwise."
9299 }
9300 ]
9301 } 9302 }
9302 ] 9303 ]
9303 }, 9304 },
9304 { 9305 {
9305 "name": "send", 9306 "name": "write",
9306 "type": "function", 9307 "type": "function",
9307 "description": "Sends data on the connected socket.", 9308 "description": "Writes data on the connected socket.",
9308 "parameters": [ 9309 "parameters": [
9309 { 9310 {
9310 "name": "socketId", 9311 "name": "socketId",
9311 "type": "integer", 9312 "type": "integer",
9312 "description": "The socketId.", 9313 "description": "The socketId.",
9313 "minimum": 1 9314 "minimum": 1
9314 }, 9315 },
9315 { 9316 {
9317 "name": "data",
9318 "type": "string",
9319 "description": "The data to write. Warning: will probably become a b lob or other appropriate binary-friendly type."
9320 },
9321 {
9316 "name": "callback", 9322 "name": "callback",
9317 "type": "function", 9323 "type": "function",
9318 "description": "Called when the send is complete.", 9324 "description": "Called when any of the following happens: the write operation completes, the write operation blocked before completion, or an error occurred.",
9319 "parameters": [ 9325 "parameters": [
9320 { 9326 {
9321 "type": "object", 9327 "type": "object",
9322 "name": "sendInfo", 9328 "name": "writeInfo",
9323 "properties": { 9329 "properties": {
9324 "bytesSent": { 9330 "bytesWritten": {
9325 "type": "integer", 9331 "type": "integer",
9326 "minimum": 0, 9332 "description": "The number of bytes sent, or a negative erro r code."
9327 "description": "The number of bytes sent."
9328 } 9333 }
9329 } 9334 }
9330 } 9335 }
9331 ] 9336 ]
9332 } 9337 }
9333 ] 9338 ]
9334 } 9339 }
9335 ] 9340 ]
9336 } 9341 }
9337 ] 9342 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698