193ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)/*
293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * Copyright (C) 2009 Google Inc. All rights reserved.
393ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) *
493ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * Redistribution and use in source and binary forms, with or without
593ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * modification, are permitted provided that the following conditions are
693ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * met:
793ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) *
893ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) *     * Redistributions of source code must retain the above copyright
993ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * notice, this list of conditions and the following disclaimer.
1093ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) *     * Redistributions in binary form must reproduce the above
1193ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * copyright notice, this list of conditions and the following disclaimer
1293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * in the documentation and/or other materials provided with the
1393ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * distribution.
1493ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) *     * Neither the name of Google Inc. nor the names of its
1593ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * contributors may be used to endorse or promote products derived from
1693ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * this software without specific prior written permission.
1793ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) *
1893ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1993ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2093ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2193ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2393ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2493ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2593ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2693ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2793ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2893ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2993ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles) */
3093ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
3193ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)#ifndef WebURLResponse_h
3293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)#define WebURLResponse_h
3393ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
3493ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)#include "WebCommon.h"
3593ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)#include "WebPrivateOwnPtr.h"
3693ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
3751b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles)namespace blink {
3893ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
39e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles)class ResourceResponse;
4093ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)class WebCString;
4193ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)class WebHTTPHeaderVisitor;
4293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)class WebHTTPLoadInfo;
4393ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)class WebString;
4493ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)class WebURL;
4593ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)class WebURLLoadTiming;
4693ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)class WebURLResponsePrivate;
4793ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
4893ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)class WebURLResponse {
4993ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)public:
5093ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    enum HTTPVersion { Unknown, HTTP_0_9, HTTP_1_0, HTTP_1_1 };
5193ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
5293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    class ExtraData {
5393ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    public:
5493ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)        virtual ~ExtraData() { }
5593ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    };
5693ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
5793ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    ~WebURLResponse() { reset(); }
5893ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
5993ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    WebURLResponse() : m_private(0) { }
6093ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    WebURLResponse(const WebURLResponse& r) : m_private(0) { assign(r); }
6193ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    WebURLResponse& operator=(const WebURLResponse& r)
6293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    {
6393ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)        assign(r);
6493ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)        return *this;
6593ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    }
6693ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
6793ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    explicit WebURLResponse(const WebURL& url) : m_private(0)
6893ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    {
6993ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)        initialize();
7093ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)        setURL(url);
7193ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    }
7293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
73bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void initialize();
74bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void reset();
75bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void assign(const WebURLResponse&);
7693ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
77bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT bool isNull() const;
7893ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
79bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT WebURL url() const;
80bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setURL(const WebURL&);
8193ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
82bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT unsigned connectionID() const;
83bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setConnectionID(unsigned);
8493ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
85bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT bool connectionReused() const;
86bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setConnectionReused(bool);
8793ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
88bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT WebURLLoadTiming loadTiming();
89bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setLoadTiming(const WebURLLoadTiming&);
9093ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
91bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT WebHTTPLoadInfo httpLoadInfo();
92bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setHTTPLoadInfo(const WebHTTPLoadInfo&);
9393ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
94bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT double responseTime() const;
95bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setResponseTime(double);
9693ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
97bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT WebString mimeType() const;
98bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setMIMEType(const WebString&);
9993ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
100bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT long long expectedContentLength() const;
101bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setExpectedContentLength(long long);
10293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
103bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT WebString textEncodingName() const;
104bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setTextEncodingName(const WebString&);
10593ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
106bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT WebString suggestedFileName() const;
107bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setSuggestedFileName(const WebString&);
10893ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
109bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT HTTPVersion httpVersion() const;
110bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setHTTPVersion(HTTPVersion);
11193ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
112bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT int httpStatusCode() const;
113bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setHTTPStatusCode(int);
11493ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
115bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT WebString httpStatusText() const;
116bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setHTTPStatusText(const WebString&);
11793ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
118bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT WebString httpHeaderField(const WebString& name) const;
119bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setHTTPHeaderField(const WebString& name, const WebString& value);
120bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void addHTTPHeaderField(const WebString& name, const WebString& value);
121bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void clearHTTPHeaderField(const WebString& name);
122bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void visitHTTPHeaderFields(WebHTTPHeaderVisitor*) const;
12393ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
124bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT double lastModifiedDate() const;
125bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setLastModifiedDate(double);
12693ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
127bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT long long appCacheID() const;
128bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setAppCacheID(long long);
12993ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
130bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT WebURL appCacheManifestURL() const;
131bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setAppCacheManifestURL(const WebURL&);
13293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
13393ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    // A consumer controlled value intended to be used to record opaque
13493ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    // security info related to this request.
135bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT WebCString securityInfo() const;
136bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setSecurityInfo(const WebCString&);
13793ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
138bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)#if INSIDE_BLINK
139e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles)    BLINK_PLATFORM_EXPORT ResourceResponse& toMutableResourceResponse();
140e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles)    BLINK_PLATFORM_EXPORT const ResourceResponse& toResourceResponse() const;
14193ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)#endif
14293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
14393ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    // Flag whether this request was served from the disk cache entry.
144bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT bool wasCached() const;
145bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setWasCached(bool);
14693ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
14793ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    // Flag whether this request was loaded via the SPDY protocol or not.
14893ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    // SPDY is an experimental web protocol, see http://dev.chromium.org/spdy
149bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT bool wasFetchedViaSPDY() const;
150bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setWasFetchedViaSPDY(bool);
15193ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
15293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    // Flag whether this request was loaded after the TLS/Next-Protocol-Negotiation was used.
15393ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    // This is related to SPDY.
154bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT bool wasNpnNegotiated() const;
155bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setWasNpnNegotiated(bool);
15693ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
15793ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    // Flag whether this request was made when "Alternate-Protocol: xxx"
15893ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    // is present in server's response.
159bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT bool wasAlternateProtocolAvailable() const;
160bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setWasAlternateProtocolAvailable(bool);
16193ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
16293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    // Flag whether this request was loaded via an explicit proxy (HTTP, SOCKS, etc).
163bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT bool wasFetchedViaProxy() const;
164bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setWasFetchedViaProxy(bool);
16593ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
166197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch    // Flag whether this request was loaded via a ServiceWorker.
167197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch    BLINK_PLATFORM_EXPORT bool wasFetchedViaServiceWorker() const;
168197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch    BLINK_PLATFORM_EXPORT void setWasFetchedViaServiceWorker(bool);
169197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch
17093ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    // Flag whether this request is part of a multipart response.
171bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT bool isMultipartPayload() const;
172bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setIsMultipartPayload(bool);
17393ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
17493ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    // This indicates the location of a downloaded response if the
17593ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    // WebURLRequest had the downloadToFile flag set to true. This file path
17693ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    // remains valid for the lifetime of the WebURLLoader used to create it.
177bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT WebString downloadFilePath() const;
178bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setDownloadFilePath(const WebString&);
17993ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
18093ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    // Remote IP address of the socket which fetched this resource.
181bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT WebString remoteIPAddress() const;
182bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setRemoteIPAddress(const WebString&);
18393ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
18493ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    // Remote port number of the socket which fetched this resource.
185bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT unsigned short remotePort() const;
186bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setRemotePort(unsigned short);
18793ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
18893ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    // Extra data associated with the underlying resource response. Resource
18993ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    // responses can be copied. If non-null, each copy of a resource response
19093ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    // holds a pointer to the extra data, and the extra data pointer will be
19193ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    // deleted when the last resource response is destroyed. Setting the extra
19293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    // data pointer will cause the underlying resource response to be
19393ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    // dissociated from any existing non-null extra data pointer.
194bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT ExtraData* extraData() const;
195bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*);
19693ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
19793ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)protected:
198bfe3590b1806e3ff18f46ee3af5d4b83078f305aTorne (Richard Coles)    BLINK_PLATFORM_EXPORT void assign(WebURLResponsePrivate*);
19993ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
20093ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)private:
20193ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)    WebURLResponsePrivate* m_private;
20293ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)};
20393ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
20451b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles)} // namespace blink
20593ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)
20693ac45cfc74041c8ae536ce58a9534d46db2024eTorne (Richard Coles)#endif
207