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

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: Introducing LazyInstance for "static" RE2 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
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/common/extensions/api/web_request_internal.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "properties": { 8 "properties": {
9 "MAX_HANDLER_BEHAVIOR_CHANGED_CALLS_PER_10_MINUTES": { 9 "MAX_HANDLER_BEHAVIOR_CHANGED_CALLS_PER_10_MINUTES": {
10 "value": 20, 10 "value": 20,
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 "authCredentials": { 80 "authCredentials": {
81 "type": "object", 81 "type": "object",
82 "description": "Only used as a response to the onAuthRequired event. If set, the request is made using the supplied credentials.", 82 "description": "Only used as a response to the onAuthRequired event. If set, the request is made using the supplied credentials.",
83 "optional": true, 83 "optional": true,
84 "properties": { 84 "properties": {
85 "username": {"type": "string"}, 85 "username": {"type": "string"},
86 "password": {"type": "string"} 86 "password": {"type": "string"}
87 } 87 }
88 } 88 }
89 } 89 }
90 },
91 {
92 "id": "UploadData",
93 "type": "object",
94 "properties": {
95 "bytes": {
96 "type": "any",
Matt Perry 2012/09/05 21:01:55 indent should be +2 not +4
vabr (Chromium) 2012/09/07 11:23:34 Done.
97 "optional": true,
98 "description": "An ArrayBuffer with a copy of the data."
99 },
100 "file": {
101 "type": "string",
102 "optional": true,
103 "description": "A string with the file's path and name."
104 }
105 },
106 "description": "Contains data uploaded in a URL request."
90 } 107 }
91 ], 108 ],
92 "functions": [ 109 "functions": [
93 { 110 {
94 "name": "handlerBehaviorChanged", 111 "name": "handlerBehaviorChanged",
95 "type": "function", 112 "type": "function",
96 "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.", 113 "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.",
97 "parameters": [ 114 "parameters": [
98 {"type": "function", "name": "callback", "optional": true, "parameters ": []} 115 {"type": "function", "name": "callback", "optional": true, "parameters ": []}
99 ] 116 ]
100 } 117 }
101 ], 118 ],
102 "events": [ 119 "events": [
103 { 120 {
104 "name": "onBeforeRequest", 121 "name": "onBeforeRequest",
105 "type": "function", 122 "type": "function",
106 "description": "Fired when a request is about to occur.", 123 "description": "Fired when a request is about to occur.",
107 "parameters": [ 124 "parameters": [
108 { 125 {
109 "type": "object", 126 "type": "object",
110 "name": "details", 127 "name": "details",
111 "properties": { 128 "properties": {
112 "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."}, 129 "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."},
113 "url": {"type": "string"}, 130 "url": {"type": "string"},
114 "method": {"type": "string", "description": "Standard HTTP method. "}, 131 "method": {"type": "string", "description": "Standard HTTP method. "},
115 "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."}, 132 "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."},
116 "parentFrameId": {"type": "integer", "description": "ID of frame t hat wraps the frame which sent the request. Set to -1 if no parent frame exists. "}, 133 "parentFrameId": {"type": "integer", "description": "ID of frame t hat wraps the frame which sent the request. Set to -1 if no parent frame exists. "},
134 "requestBody": {
135 "type": "object",
136 "optional": true,
137 "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.",
138 "properties": {
139 "error": {"type": "string", "optional": true, "description": " Errors when obtaining request body data."},
140 "formData": {
141 "type": "object",
142 "optional": true,
143 "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']}.",
144 "properties": {},
145 "additionalProperties": {
146 "type": "array",
147 "items": { "type": "string" }
148 }
149 },
150 "raw" : {
151 "type": "array",
152 "optional": true,
153 "items": {"$ref": "UploadData"},
154 "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."
155 }
156 }
157 },
117 "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." }, 158 "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." },
118 "type": {"type": "string", "enum": ["main_frame", "sub_frame", "st ylesheet", "script", "image", "object", "xmlhttprequest", "other"], "description ": "How the requested resource will be used."}, 159 "type": {"type": "string", "enum": ["main_frame", "sub_frame", "st ylesheet", "script", "image", "object", "xmlhttprequest", "other"], "description ": "How the requested resource will be used."},
119 "timeStamp": {"type": "number", "description": "The time when this signal is triggered, in milliseconds since the epoch."} 160 "timeStamp": {"type": "number", "description": "The time when this signal is triggered, in milliseconds since the epoch."}
120 } 161 }
121 } 162 }
122 ], 163 ],
123 "extraParameters": [ 164 "extraParameters": [
124 { 165 {
125 "$ref": "RequestFilter", 166 "$ref": "RequestFilter",
126 "name": "filter", 167 "name": "filter",
127 "description": "A set of filters that restricts the events that will be sent to this listener." 168 "description": "A set of filters that restricts the events that will be sent to this listener."
128 }, 169 },
129 { 170 {
130 "type": "array", 171 "type": "array",
131 "optional": true, 172 "optional": true,
132 "name": "extraInfoSpec", 173 "name": "extraInfoSpec",
133 "description": "Array of extra information that should be passed to the listener function.", 174 "description": "Array of extra information that should be passed to the listener function.",
134 "items": { 175 "items": {
135 "type": "string", 176 "type": "string",
136 "enum": ["blocking"] 177 "enum": ["blocking", "requestBody"]
137 } 178 }
138 } 179 }
139 ], 180 ],
140 "returns": { 181 "returns": {
141 "$ref": "BlockingResponse", 182 "$ref": "BlockingResponse",
142 "description": "If \"blocking\" is specified in the \"extraInfoSpec\" parameter, the event listener should return an object of this type.", 183 "description": "If \"blocking\" is specified in the \"extraInfoSpec\" parameter, the event listener should return an object of this type.",
143 "optional": true 184 "optional": true
144 } 185 }
145 }, 186 },
146 { 187 {
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 { 533 {
493 "$ref": "RequestFilter", 534 "$ref": "RequestFilter",
494 "name": "filter", 535 "name": "filter",
495 "description": "A set of filters that restricts the events that will be sent to this listener." 536 "description": "A set of filters that restricts the events that will be sent to this listener."
496 } 537 }
497 ] 538 ]
498 } 539 }
499 ] 540 ]
500 } 541 }
501 ] 542 ]
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/common/extensions/api/web_request_internal.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698