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 3 // found in the LICENSE file. 4 5 #include "chrome/browser/extensions/api/web_request/web_request_api_constants.h" 6 7 namespace extension_web_request_api_constants { 8 9 const char kChallengerKey[] = "challenger"; 10 const char kErrorKey[] = "error"; 11 const char kFrameIdKey[] = "frameId"; 12 const char kParentFrameIdKey[] = "parentFrameId"; 13 const char kFromCache[] = "fromCache"; 14 const char kHostKey[] = "host"; 15 const char kIpKey[] = "ip"; 16 const char kPortKey[] = "port"; 17 const char kMethodKey[] = "method"; 18 const char kRedirectUrlKey[] = "redirectUrl"; 19 const char kRequestIdKey[] = "requestId"; 20 const char kStatusCodeKey[] = "statusCode"; 21 const char kStatusLineKey[] = "statusLine"; 22 const char kTabIdKey[] = "tabId"; 23 const char kTimeStampKey[] = "timeStamp"; 24 const char kTypeKey[] = "type"; 25 const char kUrlKey[] = "url"; 26 const char kRequestBodyKey[] = "requestBody"; 27 const char kRequestBodyErrorKey[] = "error"; 28 const char kRequestBodyFormDataKey[] = "formData"; 29 const char kRequestBodyRawKey[] = "raw"; 30 const char kRequestBodyRawBytesKey[] = "bytes"; 31 const char kRequestBodyRawFileKey[] = "file"; 32 const char kRequestHeadersKey[] = "requestHeaders"; 33 const char kResponseHeadersKey[] = "responseHeaders"; 34 const char kHeaderNameKey[] = "name"; 35 const char kHeaderValueKey[] = "value"; 36 const char kHeaderBinaryValueKey[] = "binaryValue"; 37 const char kIsProxyKey[] = "isProxy"; 38 const char kMessageKey[] = "message"; 39 const char kSchemeKey[] = "scheme"; 40 const char kStageKey[] = "stage"; 41 const char kRealmKey[] = "realm"; 42 const char kAuthCredentialsKey[] = "authCredentials"; 43 const char kUsernameKey[] = "username"; 44 const char kPasswordKey[] = "password"; 45 46 const char kOnBeforeRedirectEvent[] = "webRequest.onBeforeRedirect"; 47 const char kOnBeforeSendHeadersEvent[] = "webRequest.onBeforeSendHeaders"; 48 const char kOnCompletedEvent[] = "webRequest.onCompleted"; 49 const char kOnHeadersReceivedEvent[] = "webRequest.onHeadersReceived"; 50 const char kOnResponseStartedEvent[] = "webRequest.onResponseStarted"; 51 const char kOnSendHeadersEvent[] = "webRequest.onSendHeaders"; 52 const char kOnAuthRequiredEvent[] = "webRequest.onAuthRequired"; 53 54 const char kOnBeforeRedirect[] = "onBeforeRedirect"; 55 const char kOnBeforeRequest[] = "onBeforeRequest"; 56 const char kOnBeforeSendHeaders[] = "onBeforeSendHeaders"; 57 const char kOnCompleted[] = "onCompleted"; 58 const char kOnErrorOccurred[] = "onErrorOccurred"; 59 const char kOnHeadersReceived[] = "onHeadersReceived"; 60 const char kOnResponseStarted[] = "onResponseStarted"; 61 const char kOnSendHeaders[] = "onSendHeaders"; 62 const char kOnAuthRequired[] = "onAuthRequired"; 63 64 const char kInvalidRedirectUrl[] = "redirectUrl '*' is not a valid URL."; 65 const char kInvalidBlockingResponse[] = 66 "cancel cannot be true in the presence of other keys."; 67 const char kInvalidRequestFilterUrl[] = "'*' is not a valid URL pattern."; 68 const char kBlockingPermissionRequired[] = 69 "You do not have permission to use blocking webRequest listeners. " 70 "Be sure to declare the webRequestBlocking permission in your " 71 "manifest."; 72 const char kHostPermissionsRequired[] = 73 "You need to request host permissions in the manifest file in order to " 74 "be notified about requests from the webRequest API."; 75 76 } // namespace extension_web_request_api_constants 77