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

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: Post-try-server fixes. 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 9172 matching lines...) Expand 10 before | Expand all | Expand 10 after
9183 "description": "A 'data' event represents data received on the socke t. An 'error' event represents an error." 9183 "description": "A 'data' event represents data received on the socke t. An 'error' event represents an error."
9184 }, 9184 },
9185 "byteCount": { 9185 "byteCount": {
9186 "type": "integer", 9186 "type": "integer",
9187 "optional": true, 9187 "optional": true,
9188 "description": "The number of bytes received in a 'data' event." 9188 "description": "The number of bytes received in a 'data' event."
9189 }, 9189 },
9190 "bytes": { 9190 "bytes": {
9191 "type": "blob", 9191 "type": "blob",
9192 "optional": true, 9192 "optional": true,
9193 "description": "The data received, as a Blob." 9193 "description": "The data received."
9194 }, 9194 },
9195 "errorCode": { 9195 "errorCode": {
9196 "type": "integer", 9196 "type": "integer",
9197 "description": "The error code, if the event type is 'error'.", 9197 "description": "The error code, if the event type is 'error'.",
9198 "optional": true 9198 "optional": true
9199 }, 9199 },
9200 "errorMessage": { 9200 "errorMessage": {
9201 "type": "string", 9201 "type": "string",
9202 "description": "The error description, if the event type is 'error'. ", 9202 "description": "The error description, if the event type is 'error'. ",
9203 "optional": true 9203 "optional": true
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
9252 "minimum": 1, 9252 "minimum": 1,
9253 "description": "The id of the newly created socket." 9253 "description": "The id of the newly created socket."
9254 } 9254 }
9255 } 9255 }
9256 } 9256 }
9257 ] 9257 ]
9258 } 9258 }
9259 ] 9259 ]
9260 }, 9260 },
9261 { 9261 {
9262 "name": "destroy",
9263 "type": "function",
9264 "description": "Destroys the socket. Each socket created should be destr oyed after use.",
9265 "parameters": [
9266 {
9267 "name": "socketId",
9268 "type": "integer",
9269 "description": "The socketId.",
9270 "minimum": 1
9271 }
9272 ]
9273 },
9274 {
9262 "name": "connect", 9275 "name": "connect",
9263 "type": "function", 9276 "type": "function",
9264 "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.", 9277 "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.",
9265 "parameters": [ 9278 "parameters": [
9266 { 9279 {
9267 "name": "socketId", 9280 "name": "socketId",
9268 "type": "integer", 9281 "type": "integer",
9269 "description": "The socketId.", 9282 "description": "The socketId.",
9270 "minimum": 1 9283 "minimum": 1
9271 }, 9284 },
(...skipping 17 matching lines...) Expand all
9289 { 9302 {
9290 "type": "boolean", 9303 "type": "boolean",
9291 "name": "result", 9304 "name": "result",
9292 "description": "True if successful, false otherwise." 9305 "description": "True if successful, false otherwise."
9293 } 9306 }
9294 ] 9307 ]
9295 } 9308 }
9296 ] 9309 ]
9297 }, 9310 },
9298 { 9311 {
9299 "name": "disconnect", 9312 "name": "close",
9300 "type": "function", 9313 "type": "function",
9301 "description": "Disconnects the socket.", 9314 "description": "Closes the socket.",
9302 "parameters": [ 9315 "parameters": [
9303 { 9316 {
9304 "name": "socketId", 9317 "name": "socketId",
9305 "type": "integer", 9318 "type": "integer",
9306 "description": "The socketId.", 9319 "description": "The socketId.",
9307 "minimum": 1 9320 "minimum": 1
9308 },
9309 {
9310 "name": "callback",
9311 "type": "function",
9312 "description": "Called when the disconnection is complete.",
9313 "parameters": [
9314 {
9315 "type": "boolean",
9316 "name": "result",
9317 "description": "True if successful, false otherwise."
9318 }
9319 ]
9320 } 9321 }
9321 ] 9322 ]
9322 }, 9323 },
9323 { 9324 {
9324 "name": "send", 9325 "name": "write",
9325 "type": "function", 9326 "type": "function",
9326 "description": "Sends data on the connected socket.", 9327 "description": "Writes data on the connected socket.",
9327 "parameters": [ 9328 "parameters": [
9328 { 9329 {
9329 "name": "socketId", 9330 "name": "socketId",
9330 "type": "integer", 9331 "type": "integer",
9331 "description": "The socketId.", 9332 "description": "The socketId.",
9332 "minimum": 1 9333 "minimum": 1
9333 }, 9334 },
9334 { 9335 {
9336 "name": "data",
9337 "type": "string",
9338 "description": "The data to write. Warning: will probably become a b lob or other appropriate binary-friendly type."
9339 },
9340 {
9335 "name": "callback", 9341 "name": "callback",
9336 "type": "function", 9342 "type": "function",
9337 "description": "Called when the send is complete.", 9343 "description": "Called when any of the following happens: the write operation completes, the write operation blocked before completion, or an error occurred.",
9338 "parameters": [ 9344 "parameters": [
9339 { 9345 {
9340 "type": "object", 9346 "type": "object",
9341 "name": "sendInfo", 9347 "name": "writeInfo",
9342 "properties": { 9348 "properties": {
9343 "bytesSent": { 9349 "bytesWritten": {
9344 "type": "integer", 9350 "type": "integer",
9345 "minimum": 0, 9351 "description": "The number of bytes sent, or a negative erro r code."
9346 "description": "The number of bytes sent."
9347 } 9352 }
9348 } 9353 }
9349 } 9354 }
9350 ] 9355 ]
9351 } 9356 }
9352 ] 9357 ]
9353 } 9358 }
9354 ] 9359 ]
9355 } 9360 }
9356 ] 9361 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698