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

Side by Side Diff: webkit/api/public/WebURLResponse.h

Issue 385057: Deleted webkit/api which now lives in webkit.org (Closed)
Patch Set: Created 11 years, 1 month 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 | « webkit/api/public/WebURLRequest.h ('k') | webkit/api/public/WebVector.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above
11 * copyright notice, this list of conditions and the following disclaimer
12 * in the documentation and/or other materials provided with the
13 * distribution.
14 * * Neither the name of Google Inc. nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31 #ifndef WebURLResponse_h
32 #define WebURLResponse_h
33
34 #include "WebCommon.h"
35
36 #if defined(WEBKIT_IMPLEMENTATION)
37 namespace WebCore { class ResourceResponse; }
38 #endif
39
40 namespace WebKit {
41
42 class WebCString;
43 class WebHTTPHeaderVisitor;
44 class WebString;
45 class WebURL;
46 class WebURLResponsePrivate;
47
48 class WebURLResponse {
49 public:
50 ~WebURLResponse() { reset(); }
51
52 WebURLResponse() : m_private(0) { }
53 WebURLResponse(const WebURLResponse& r) : m_private(0) { assign(r); }
54 WebURLResponse& operator=(const WebURLResponse& r)
55 {
56 assign(r);
57 return *this;
58 }
59
60 explicit WebURLResponse(const WebURL& url) : m_private(0)
61 {
62 initialize();
63 setURL(url);
64 }
65
66 WEBKIT_API void initialize();
67 WEBKIT_API void reset();
68 WEBKIT_API void assign(const WebURLResponse&);
69
70 WEBKIT_API bool isNull() const;
71
72 WEBKIT_API WebURL url() const;
73 WEBKIT_API void setURL(const WebURL&);
74
75 WEBKIT_API WebString mimeType() const;
76 WEBKIT_API void setMIMEType(const WebString&);
77
78 WEBKIT_API long long expectedContentLength() const;
79 WEBKIT_API void setExpectedContentLength(long long);
80
81 WEBKIT_API WebString textEncodingName() const;
82 WEBKIT_API void setTextEncodingName(const WebString&);
83
84 WEBKIT_API WebString suggestedFileName() const;
85 WEBKIT_API void setSuggestedFileName(const WebString&);
86
87 WEBKIT_API int httpStatusCode() const;
88 WEBKIT_API void setHTTPStatusCode(int);
89
90 WEBKIT_API WebString httpStatusText() const;
91 WEBKIT_API void setHTTPStatusText(const WebString&);
92
93 WEBKIT_API WebString httpHeaderField(const WebString& name) const;
94 WEBKIT_API void setHTTPHeaderField(const WebString& name, const WebString& value);
95 WEBKIT_API void addHTTPHeaderField(const WebString& name, const WebString& value);
96 WEBKIT_API void clearHTTPHeaderField(const WebString& name);
97 WEBKIT_API void visitHTTPHeaderFields(WebHTTPHeaderVisitor*) const;
98
99 WEBKIT_API double lastModifiedDate() const;
100 WEBKIT_API void setLastModifiedDate(double);
101
102 WEBKIT_API bool isContentFiltered() const;
103 WEBKIT_API void setIsContentFiltered(bool);
104
105 WEBKIT_API long long appCacheID() const;
106 WEBKIT_API void setAppCacheID(long long);
107
108 WEBKIT_API WebURL appCacheManifestURL() const;
109 WEBKIT_API void setAppCacheManifestURL(const WebURL&);
110
111 // A consumer controlled value intended to be used to record opaque
112 // security info related to this request.
113 WEBKIT_API WebCString securityInfo() const;
114 WEBKIT_API void setSecurityInfo(const WebCString&);
115
116 #if defined(WEBKIT_IMPLEMENTATION)
117 WebCore::ResourceResponse& toMutableResourceResponse();
118 const WebCore::ResourceResponse& toResourceResponse() const;
119 #endif
120
121 protected:
122 void assign(WebURLResponsePrivate*);
123
124 private:
125 WebURLResponsePrivate* m_private;
126 };
127
128 } // namespace WebKit
129
130 #endif
OLDNEW
« no previous file with comments | « webkit/api/public/WebURLRequest.h ('k') | webkit/api/public/WebVector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698