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

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

Issue 10694055: Add read-only access to POST data for webRequest's onBeforeRequest (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Making non-trivial data-members non-static Created 8 years, 3 months 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
OLDNEW
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": "webRequest", 7 "namespace": "webRequest",
8 "types": [ 8 "types": [
9 { 9 {
10 "id": "RequestFilter", 10 "id": "RequestFilter",
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 "authCredentials": { 72 "authCredentials": {
73 "type": "object", 73 "type": "object",
74 "description": "Only used as a response to the onAuthRequired event. If set, the request is made using the supplied credentials.", 74 "description": "Only used as a response to the onAuthRequired event. If set, the request is made using the supplied credentials.",
75 "optional": true, 75 "optional": true,
76 "properties": { 76 "properties": {
77 "username": {"type": "string"}, 77 "username": {"type": "string"},
78 "password": {"type": "string"} 78 "password": {"type": "string"}
79 } 79 }
80 } 80 }
81 } 81 }
82 },
83 {
84 "id": "UploadData",
85 "type": "object",
86 "properties": {
87 "bytes": {
88 "type": "any",
89 "optional": true,
90 "description": "An ArrayBuffer with a copy of the data."
91 },
92 "file": {
93 "type": "string",
94 "optional": true,
95 "description": "A string with the file's path and name."
96 }
97 },
98 "description": "Contains data uploaded in a URL request."
82 } 99 }
83 ], 100 ],
84 "functions": [ 101 "functions": [
85 { 102 {
86 "name": "handlerBehaviorChanged", 103 "name": "handlerBehaviorChanged",
87 "type": "function", 104 "type": "function",
88 "description": "Needs to be called when the behavior of the webRequest h andlers has changed to prevent incorrect handling due to caching. This function call is expensive. Don't call it often.", 105 "description": "Needs to be called when the behavior of the webRequest h andlers has changed to prevent incorrect handling due to caching. This function call is expensive. Don't call it often.",
89 "parameters": [ 106 "parameters": [
90 {"type": "function", "name": "callback", "optional": true, "parameters ": []} 107 {"type": "function", "name": "callback", "optional": true, "parameters ": []}
91 ] 108 ]
92 } 109 }
93 ], 110 ],
94 "events": [ 111 "events": [
95 { 112 {
96 "name": "onBeforeRequest", 113 "name": "onBeforeRequest",
97 "type": "function", 114 "type": "function",
98 "description": "Fired when a request is about to occur.", 115 "description": "Fired when a request is about to occur.",
99 "parameters": [ 116 "parameters": [
100 { 117 {
101 "type": "object", 118 "type": "object",
102 "name": "details", 119 "name": "details",
103 "properties": { 120 "properties": {
104 "requestId": {"type": "string", "description": "The ID of the requ est. Request IDs are unique within a browser session. As a result, they could be used to relate different events of the same request."}, 121 "requestId": {"type": "string", "description": "The ID of the requ est. Request IDs are unique within a browser session. As a result, they could be used to relate different events of the same request."},
105 "url": {"type": "string"}, 122 "url": {"type": "string"},
106 "method": {"type": "string", "description": "Standard HTTP method. "}, 123 "method": {"type": "string", "description": "Standard HTTP method. "},
107 "frameId": {"type": "integer", "description": "The value 0 indicat es that the request happens in the main frame; a positive value indicates the ID of a subframe in which the request happens. If the document of a (sub-)frame is loaded (<code>type</code> is <code>main_frame</code> or <code>sub_frame</code>) , <code>frameId</code> indicates the ID of this frame, not the ID of the outer f rame. Frame IDs are unique within a tab."}, 124 "frameId": {"type": "integer", "description": "The value 0 indicat es that the request happens in the main frame; a positive value indicates the ID of a subframe in which the request happens. If the document of a (sub-)frame is loaded (<code>type</code> is <code>main_frame</code> or <code>sub_frame</code>) , <code>frameId</code> indicates the ID of this frame, not the ID of the outer f rame. Frame IDs are unique within a tab."},
108 "parentFrameId": {"type": "integer", "description": "ID of frame t hat wraps the frame which sent the request. Set to -1 if no parent frame exists. "}, 125 "parentFrameId": {"type": "integer", "description": "ID of frame t hat wraps the frame which sent the request. Set to -1 if no parent frame exists. "},
126 "requestBody": {
127 "type": "object",
128 "optional": true,
129 "description": "Experimental feature, only available in DEV or C ANARY channels. Container for request body data. Only provided if extraInfoSpec contains 'requestBody'. Currently only request body elements containing byte dat a or files are reported.",
130 "properties": {
131 "error": {"type": "string", "optional": true, "description": " Errors when obtaining request body data."},
132 "formData": {
133 "type": "object",
134 "optional": true,
135 "description": "If the request method is POST and the body i s a sequence of key-value pairs encoded in UTF8, encoded as either multipart/for m-data, or application/x-www-form-urlencoded, this dictionary is present and for each key contains the list of all values for that key. If the data is of anothe r media type, or if it is malformed, the dictionary is not present. An example v alue of this dictionary is {'key': ['value1', 'value2']}.",
136 "properties": {},
137 "additionalProperties": {
138 "type": "array",
139 "items": { "type": "string" }
140 }
141 },
142 "raw" : {
143 "type": "array",
144 "optional": true,
145 "items": {"$ref": "UploadData"},
146 "description": "If the request method is PUT or POST, and th e body is not already parsed in formData, then the unparsed request body element s are contained in this array."
147 }
148 }
149 },
109 "tabId": {"type": "integer", "description": "The ID of the tab in which the request takes place. Set to -1 if the request isn't related to a tab." }, 150 "tabId": {"type": "integer", "description": "The ID of the tab in which the request takes place. Set to -1 if the request isn't related to a tab." },
110 "type": {"type": "string", "enum": ["main_frame", "sub_frame", "st ylesheet", "script", "image", "object", "xmlhttprequest", "other"], "description ": "How the requested resource will be used."}, 151 "type": {"type": "string", "enum": ["main_frame", "sub_frame", "st ylesheet", "script", "image", "object", "xmlhttprequest", "other"], "description ": "How the requested resource will be used."},
111 "timeStamp": {"type": "number", "description": "The time when this signal is triggered, in milliseconds since the epoch."} 152 "timeStamp": {"type": "number", "description": "The time when this signal is triggered, in milliseconds since the epoch."}
112 } 153 }
113 } 154 }
114 ], 155 ],
115 "extraParameters": [ 156 "extraParameters": [
116 { 157 {
117 "$ref": "RequestFilter", 158 "$ref": "RequestFilter",
118 "name": "filter", 159 "name": "filter",
119 "description": "A set of filters that restricts the events that will be sent to this listener." 160 "description": "A set of filters that restricts the events that will be sent to this listener."
120 }, 161 },
121 { 162 {
122 "type": "array", 163 "type": "array",
123 "optional": true, 164 "optional": true,
124 "name": "extraInfoSpec", 165 "name": "extraInfoSpec",
125 "description": "Array of extra information that should be passed to the listener function.", 166 "description": "Array of extra information that should be passed to the listener function.",
126 "items": { 167 "items": {
127 "type": "string", 168 "type": "string",
128 "enum": ["blocking"] 169 "enum": ["blocking", "requestBody"]
129 } 170 }
130 } 171 }
131 ], 172 ],
132 "returns": { 173 "returns": {
133 "$ref": "BlockingResponse", 174 "$ref": "BlockingResponse",
134 "description": "If \"blocking\" is specified in the \"extraInfoSpec\" parameter, the event listener should return an object of this type.", 175 "description": "If \"blocking\" is specified in the \"extraInfoSpec\" parameter, the event listener should return an object of this type.",
135 "optional": true 176 "optional": true
136 } 177 }
137 }, 178 },
138 { 179 {
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 { 518 {
478 "$ref": "RequestFilter", 519 "$ref": "RequestFilter",
479 "name": "filter", 520 "name": "filter",
480 "description": "A set of filters that restricts the events that will be sent to this listener." 521 "description": "A set of filters that restricts the events that will be sent to this listener."
481 } 522 }
482 ] 523 ]
483 } 524 }
484 ] 525 ]
485 } 526 }
486 ] 527 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698