OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #ifndef WEBKIT_GLUE_WEBURLREQUEST_H_ | 5 #ifndef WEBKIT_GLUE_WEBURLREQUEST_H_ |
6 #define WEBKIT_GLUE_WEBURLREQUEST_H_ | 6 #define WEBKIT_GLUE_WEBURLREQUEST_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 // Helper function for GetHeaderValue to retrieve the referrer. This | 70 // Helper function for GetHeaderValue to retrieve the referrer. This |
71 // referrer is generated automatically by WebKit when navigation events | 71 // referrer is generated automatically by WebKit when navigation events |
72 // occur. If there was no referrer (for example, the browser instructed | 72 // occur. If there was no referrer (for example, the browser instructed |
73 // WebKit to navigate), the returned string will be empty. | 73 // WebKit to navigate), the returned string will be empty. |
74 // | 74 // |
75 // It is preferred to call this instead of GetHttpHeaderValue, because the | 75 // It is preferred to call this instead of GetHttpHeaderValue, because the |
76 // way referrers are stored may change in the future. | 76 // way referrers are stored may change in the future. |
77 // | 77 // |
78 virtual std::string GetHttpReferrer() const = 0; | 78 virtual std::string GetHttpReferrer() const = 0; |
79 | 79 |
80 // Get/set the opaque history state (used for back/forward navigations). | |
81 virtual std::string GetHistoryState() const = 0; | |
82 virtual void SetHistoryState(const std::string& state) = 0; | |
83 | |
84 // Get/set an opaque value containing the security info (including SSL | 80 // Get/set an opaque value containing the security info (including SSL |
85 // connection state) that should be reported as used in the response for that | 81 // connection state) that should be reported as used in the response for that |
86 // request, or an empty string if no security info should be reported. This | 82 // request, or an empty string if no security info should be reported. This |
87 // is usually used to simulate security errors on a page (typically an error | 83 // is usually used to simulate security errors on a page (typically an error |
88 // page that should contain the errors of the actual page that has the | 84 // page that should contain the errors of the actual page that has the |
89 // errors). | 85 // errors). |
90 virtual std::string GetSecurityInfo() const = 0; | 86 virtual std::string GetSecurityInfo() const = 0; |
91 virtual void SetSecurityInfo(const std::string& info) = 0; | 87 virtual void SetSecurityInfo(const std::string& info) = 0; |
92 | 88 |
93 // Returns true if the request has upload data. | 89 // Returns true if the request has upload data. |
94 virtual bool HasUploadData() const = 0; | 90 virtual bool HasUploadData() const = 0; |
95 | 91 |
96 // Returns the request upload data. This object is temporary and should be | 92 // Returns the request upload data. This object is temporary and should be |
97 // deleted after use. | 93 // deleted after use. |
98 virtual void GetUploadData(net::UploadData* data) const = 0; | 94 virtual void GetUploadData(net::UploadData* data) const = 0; |
99 | 95 |
100 // Set the request upload data. | 96 // Set the request upload data. |
101 virtual void SetUploadData(const net::UploadData& data) = 0; | 97 virtual void SetUploadData(const net::UploadData& data) = 0; |
102 | 98 |
103 // Sets the requestor id. | 99 // Sets the requestor id. |
104 virtual void SetRequestorID(int requestor_id) = 0; | 100 virtual void SetRequestorID(int requestor_id) = 0; |
105 | 101 |
106 virtual ~WebRequest() { } | 102 virtual ~WebRequest() { } |
107 }; | 103 }; |
108 | 104 |
109 #endif // #ifndef WEBKIT_GLUE_WEBURLREQUEST_H_ | 105 #endif // #ifndef WEBKIT_GLUE_WEBURLREQUEST_H_ |
OLD | NEW |