[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373
eric at webkit.org
eric at webkit.org
Wed Apr 7 23:27:27 UTC 2010
The following commit has been merged in the webkit-1.2 branch:
commit e3087eea9cbe215d99506243fe536e92030755df
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Nov 9 21:14:20 2009 +0000
2009-11-09 Yaar Schnitman <yaar at chromium.org>
Reviewed by Dimitri Glazkov.
Upstreaming the Chromium WebKit API: WebURL and friends.
https://bugs.webkit.org/show_bug.cgi?id=28394
* public/WebURL.h: Added.
(WebKit::WebURL::~WebURL):
(WebKit::WebURL::WebURL):
(WebKit::WebURL::operator=):
(WebKit::WebURL::assign):
(WebKit::WebURL::spec):
(WebKit::WebURL::parsed):
(WebKit::WebURL::isValid):
(WebKit::WebURL::isEmpty):
(WebKit::WebURL::isNull):
(WebKit::WebURL::operator GURL):
* public/WebURLError.h: Added.
(WebKit::WebURLError::WebURLError):
* public/WebURLLoader.h: Added.
(WebKit::WebURLLoader::~WebURLLoader):
* public/WebURLLoaderClient.h: Added.
(WebKit::WebURLLoaderClient::~WebURLLoaderClient):
* public/WebURLRequest.h: Added.
(WebKit::WebURLRequest::):
(WebKit::WebURLRequest::~WebURLRequest):
(WebKit::WebURLRequest::WebURLRequest):
(WebKit::WebURLRequest::operator=):
* public/WebURLResponse.h: Added.
(WebKit::WebURLResponse::~WebURLResponse):
(WebKit::WebURLResponse::WebURLResponse):
(WebKit::WebURLResponse::operator=):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50682 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index ed56555..f6abe03 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -2,6 +2,41 @@
Reviewed by Dimitri Glazkov.
+ Upstreaming the Chromium WebKit API: WebURL and friends.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28394
+
+ * public/WebURL.h: Added.
+ (WebKit::WebURL::~WebURL):
+ (WebKit::WebURL::WebURL):
+ (WebKit::WebURL::operator=):
+ (WebKit::WebURL::assign):
+ (WebKit::WebURL::spec):
+ (WebKit::WebURL::parsed):
+ (WebKit::WebURL::isValid):
+ (WebKit::WebURL::isEmpty):
+ (WebKit::WebURL::isNull):
+ (WebKit::WebURL::operator GURL):
+ * public/WebURLError.h: Added.
+ (WebKit::WebURLError::WebURLError):
+ * public/WebURLLoader.h: Added.
+ (WebKit::WebURLLoader::~WebURLLoader):
+ * public/WebURLLoaderClient.h: Added.
+ (WebKit::WebURLLoaderClient::~WebURLLoaderClient):
+ * public/WebURLRequest.h: Added.
+ (WebKit::WebURLRequest::):
+ (WebKit::WebURLRequest::~WebURLRequest):
+ (WebKit::WebURLRequest::WebURLRequest):
+ (WebKit::WebURLRequest::operator=):
+ * public/WebURLResponse.h: Added.
+ (WebKit::WebURLResponse::~WebURLResponse):
+ (WebKit::WebURLResponse::WebURLResponse):
+ (WebKit::WebURLResponse::operator=):
+
+2009-11-09 Yaar Schnitman <yaar at chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
Upstreaming the Chromium WebKit API: WebVector to WebWorkerClient
https://bugs.webkit.org/show_bug.cgi?id=28394
diff --git a/WebKit/chromium/public/WebURL.h b/WebKit/chromium/public/WebURL.h
new file mode 100644
index 0000000..78a16a8
--- /dev/null
+++ b/WebKit/chromium/public/WebURL.h
@@ -0,0 +1,143 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebURL_h
+#define WebURL_h
+
+#include "WebCString.h"
+#include <googleurl/src/url_parse.h>
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class KURL; }
+#else
+#include <googleurl/src/gurl.h>
+#endif
+
+namespace WebKit {
+
+class WebURL {
+public:
+ ~WebURL()
+ {
+ }
+
+ WebURL() : m_isValid(false)
+ {
+ }
+
+ WebURL(const WebCString& spec, const url_parse::Parsed& parsed, bool isValid)
+ : m_spec(spec)
+ , m_parsed(parsed)
+ , m_isValid(isValid)
+ {
+ }
+
+ WebURL(const WebURL& s)
+ : m_spec(s.m_spec)
+ , m_parsed(s.m_parsed)
+ , m_isValid(s.m_isValid)
+ {
+ }
+
+ WebURL& operator=(const WebURL& s)
+ {
+ m_spec = s.m_spec;
+ m_parsed = s.m_parsed;
+ m_isValid = s.m_isValid;
+ return *this;
+ }
+
+ void assign(const WebCString& spec, const url_parse::Parsed& parsed, bool isValid)
+ {
+ m_spec = spec;
+ m_parsed = parsed;
+ m_isValid = isValid;
+ }
+
+ const WebCString& spec() const
+ {
+ return m_spec;
+ }
+
+ const url_parse::Parsed& parsed() const
+ {
+ return m_parsed;
+ }
+
+ bool isValid() const
+ {
+ return m_isValid;
+ }
+
+ bool isEmpty() const
+ {
+ return m_spec.isEmpty();
+ }
+
+ bool isNull() const
+ {
+ return m_spec.isEmpty();
+ }
+
+#if WEBKIT_IMPLEMENTATION
+ WebURL(const WebCore::KURL&);
+ WebURL& operator=(const WebCore::KURL&);
+ operator WebCore::KURL() const;
+#else
+ WebURL(const GURL& g)
+ : m_spec(g.possibly_invalid_spec())
+ , m_parsed(g.parsed_for_possibly_invalid_spec())
+ , m_isValid(g.is_valid())
+ {
+ }
+
+ WebURL& operator=(const GURL& g)
+ {
+ m_spec = g.possibly_invalid_spec();
+ m_parsed = g.parsed_for_possibly_invalid_spec();
+ m_isValid = g.is_valid();
+ return *this;
+ }
+
+ operator GURL() const
+ {
+ return isNull() ? GURL() : GURL(m_spec.data(), m_spec.length(), m_parsed, m_isValid);
+ }
+#endif
+
+private:
+ WebCString m_spec; // UTF-8 encoded
+ url_parse::Parsed m_parsed;
+ bool m_isValid;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebURLError.h b/WebKit/chromium/public/WebURLError.h
new file mode 100644
index 0000000..de88e3e
--- /dev/null
+++ b/WebKit/chromium/public/WebURLError.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebURLError_h
+#define WebURLError_h
+
+#include "WebString.h"
+#include "WebURL.h"
+
+#if defined(WEBKIT_IMPLEMENTATION)
+namespace WebCore { class ResourceError; }
+#endif
+
+namespace WebKit {
+
+struct WebURLError {
+ // A namespace for "reason" to support various layers generating
+ // resource errors. WebKit does not care about the value of this
+ // string as it will just be passed via callbacks to the consumer.
+ WebString domain;
+
+ // A numeric error code detailing the reason for this error. A value
+ // of 0 means no error. WebKit does not interpret the meaning of other
+ // values and normally just forwards this error information back to the
+ // embedder (see for example WebFrameClient).
+ int reason;
+
+ // The url that failed to load.
+ WebURL unreachableURL;
+
+ WebURLError() : reason(0) { }
+
+#if defined(WEBKIT_IMPLEMENTATION)
+ WebURLError(const WebCore::ResourceError&);
+ WebURLError& operator=(const WebCore::ResourceError&);
+ operator WebCore::ResourceError() const;
+#endif
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebURLLoader.h b/WebKit/chromium/public/WebURLLoader.h
new file mode 100644
index 0000000..54d105e
--- /dev/null
+++ b/WebKit/chromium/public/WebURLLoader.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebURLLoader_h
+#define WebURLLoader_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+class WebData;
+class WebURLLoaderClient;
+class WebURLRequest;
+class WebURLResponse;
+struct WebURLError;
+
+class WebURLLoader {
+public:
+ // The WebURLLoader may be deleted in a call to its client.
+ virtual ~WebURLLoader() {}
+
+ // Load the request synchronously, returning results directly to the
+ // caller upon completion. There is no mechanism to interrupt a
+ // synchronous load!!
+ virtual void loadSynchronously(const WebURLRequest&,
+ WebURLResponse&, WebURLError&, WebData& data) = 0;
+
+ // Load the request asynchronously, sending notifications to the given
+ // client. The client will receive no further notifications if the
+ // loader is disposed before it completes its work.
+ virtual void loadAsynchronously(const WebURLRequest&,
+ WebURLLoaderClient*) = 0;
+
+ // Cancels an asynchronous load. This will appear as a load error to
+ // the client.
+ virtual void cancel() = 0;
+
+ // Suspends/resumes an asynchronous load.
+ virtual void setDefersLoading(bool) = 0;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebURLLoaderClient.h b/WebKit/chromium/public/WebURLLoaderClient.h
new file mode 100644
index 0000000..03b2c54
--- /dev/null
+++ b/WebKit/chromium/public/WebURLLoaderClient.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebURLLoaderClient_h
+#define WebURLLoaderClient_h
+
+namespace WebKit {
+
+class WebURLLoader;
+class WebURLRequest;
+class WebURLResponse;
+struct WebURLError;
+
+class WebURLLoaderClient {
+public:
+ // Called when following a redirect. |newRequest| contains the request
+ // generated by the redirect. The client may modify |newRequest|.
+ virtual void willSendRequest(
+ WebURLLoader*, WebURLRequest& newRequest, const WebURLResponse& redirectResponse) = 0;
+
+ // Called to report upload progress. The bytes reported correspond to
+ // the HTTP message body.
+ virtual void didSendData(
+ WebURLLoader*, unsigned long long bytesSent, unsigned long long totalBytesToBeSent) = 0;
+
+ // Called when response headers are received.
+ virtual void didReceiveResponse(WebURLLoader*, const WebURLResponse&) = 0;
+
+ // Called when a chunk of response data is received.
+ virtual void didReceiveData(WebURLLoader*, const char* data, int dataLength) = 0;
+
+ // Called when the load completes successfully.
+ virtual void didFinishLoading(WebURLLoader*) = 0;
+
+ // Called when the load completes with an error.
+ virtual void didFail(WebURLLoader*, const WebURLError&) = 0;
+
+protected:
+ ~WebURLLoaderClient() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebURLRequest.h b/WebKit/chromium/public/WebURLRequest.h
new file mode 100644
index 0000000..ce5c17c
--- /dev/null
+++ b/WebKit/chromium/public/WebURLRequest.h
@@ -0,0 +1,155 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebURLRequest_h
+#define WebURLRequest_h
+
+#include "WebCommon.h"
+#include "WebHTTPBody.h"
+
+#if defined(WEBKIT_IMPLEMENTATION)
+namespace WebCore { struct ResourceRequest; }
+#endif
+
+namespace WebKit {
+
+class WebCString;
+class WebHTTPBody;
+class WebHTTPHeaderVisitor;
+class WebString;
+class WebURL;
+class WebURLRequestPrivate;
+
+class WebURLRequest {
+public:
+ enum CachePolicy {
+ UseProtocolCachePolicy, // normal load
+ ReloadIgnoringCacheData, // reload
+ ReturnCacheDataElseLoad, // back/forward or encoding change - allow stale data
+ ReturnCacheDataDontLoad, // results of a post - allow stale data and only use cache
+ };
+
+ enum TargetType {
+ TargetIsMainFrame,
+ TargetIsSubFrame,
+ TargetIsSubResource,
+ TargetIsObject,
+ TargetIsMedia
+ };
+
+ ~WebURLRequest() { reset(); }
+
+ WebURLRequest() : m_private(0) { }
+ WebURLRequest(const WebURLRequest& r) : m_private(0) { assign(r); }
+ WebURLRequest& operator=(const WebURLRequest& r)
+ {
+ assign(r);
+ return *this;
+ }
+
+ explicit WebURLRequest(const WebURL& url) : m_private(0)
+ {
+ initialize();
+ setURL(url);
+ }
+
+ WEBKIT_API void initialize();
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebURLRequest&);
+
+ WEBKIT_API bool isNull() const;
+
+ WEBKIT_API WebURL url() const;
+ WEBKIT_API void setURL(const WebURL&);
+
+ // Used to implement third-party cookie blocking.
+ WEBKIT_API WebURL firstPartyForCookies() const;
+ WEBKIT_API void setFirstPartyForCookies(const WebURL&);
+
+ WEBKIT_API bool allowCookies() const;
+ WEBKIT_API void setAllowCookies(bool allowCookies);
+
+ // Controls whether user name, password, and cookies may be sent with the
+ // request. (If false, this overrides allowCookies.)
+ WEBKIT_API bool allowStoredCredentials() const;
+ WEBKIT_API void setAllowStoredCredentials(bool allowStoredCredentials);
+
+ WEBKIT_API CachePolicy cachePolicy() const;
+ WEBKIT_API void setCachePolicy(CachePolicy);
+
+ WEBKIT_API WebString httpMethod() const;
+ WEBKIT_API void setHTTPMethod(const WebString&);
+
+ WEBKIT_API WebString httpHeaderField(const WebString& name) const;
+ WEBKIT_API void setHTTPHeaderField(const WebString& name, const WebString& value);
+ WEBKIT_API void addHTTPHeaderField(const WebString& name, const WebString& value);
+ WEBKIT_API void clearHTTPHeaderField(const WebString& name);
+ WEBKIT_API void visitHTTPHeaderFields(WebHTTPHeaderVisitor*) const;
+
+ WEBKIT_API WebHTTPBody httpBody() const;
+ WEBKIT_API void setHTTPBody(const WebHTTPBody&);
+
+ // Controls whether upload progress events are generated when a request
+ // has a body.
+ WEBKIT_API bool reportUploadProgress() const;
+ WEBKIT_API void setReportUploadProgress(bool);
+
+ WEBKIT_API TargetType targetType() const;
+ WEBKIT_API void setTargetType(TargetType);
+
+ // A consumer controlled value intended to be used to identify the
+ // requestor.
+ WEBKIT_API int requestorID() const;
+ WEBKIT_API void setRequestorID(int);
+
+ // A consumer controlled value intended to be used to identify the
+ // process of the requestor.
+ WEBKIT_API int requestorProcessID() const;
+ WEBKIT_API void setRequestorProcessID(int);
+
+ // Allows the request to be matched up with its app cache host.
+ WEBKIT_API int appCacheHostID() const;
+ WEBKIT_API void setAppCacheHostID(int id);
+
+#if defined(WEBKIT_IMPLEMENTATION)
+ WebCore::ResourceRequest& toMutableResourceRequest();
+ const WebCore::ResourceRequest& toResourceRequest() const;
+#endif
+
+protected:
+ void assign(WebURLRequestPrivate*);
+
+private:
+ WebURLRequestPrivate* m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebURLResponse.h b/WebKit/chromium/public/WebURLResponse.h
new file mode 100644
index 0000000..cdac83c
--- /dev/null
+++ b/WebKit/chromium/public/WebURLResponse.h
@@ -0,0 +1,130 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebURLResponse_h
+#define WebURLResponse_h
+
+#include "WebCommon.h"
+
+#if defined(WEBKIT_IMPLEMENTATION)
+namespace WebCore { class ResourceResponse; }
+#endif
+
+namespace WebKit {
+
+class WebCString;
+class WebHTTPHeaderVisitor;
+class WebString;
+class WebURL;
+class WebURLResponsePrivate;
+
+class WebURLResponse {
+public:
+ ~WebURLResponse() { reset(); }
+
+ WebURLResponse() : m_private(0) { }
+ WebURLResponse(const WebURLResponse& r) : m_private(0) { assign(r); }
+ WebURLResponse& operator=(const WebURLResponse& r)
+ {
+ assign(r);
+ return *this;
+ }
+
+ explicit WebURLResponse(const WebURL& url) : m_private(0)
+ {
+ initialize();
+ setURL(url);
+ }
+
+ WEBKIT_API void initialize();
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebURLResponse&);
+
+ WEBKIT_API bool isNull() const;
+
+ WEBKIT_API WebURL url() const;
+ WEBKIT_API void setURL(const WebURL&);
+
+ WEBKIT_API WebString mimeType() const;
+ WEBKIT_API void setMIMEType(const WebString&);
+
+ WEBKIT_API long long expectedContentLength() const;
+ WEBKIT_API void setExpectedContentLength(long long);
+
+ WEBKIT_API WebString textEncodingName() const;
+ WEBKIT_API void setTextEncodingName(const WebString&);
+
+ WEBKIT_API WebString suggestedFileName() const;
+ WEBKIT_API void setSuggestedFileName(const WebString&);
+
+ WEBKIT_API int httpStatusCode() const;
+ WEBKIT_API void setHTTPStatusCode(int);
+
+ WEBKIT_API WebString httpStatusText() const;
+ WEBKIT_API void setHTTPStatusText(const WebString&);
+
+ WEBKIT_API WebString httpHeaderField(const WebString& name) const;
+ WEBKIT_API void setHTTPHeaderField(const WebString& name, const WebString& value);
+ WEBKIT_API void addHTTPHeaderField(const WebString& name, const WebString& value);
+ WEBKIT_API void clearHTTPHeaderField(const WebString& name);
+ WEBKIT_API void visitHTTPHeaderFields(WebHTTPHeaderVisitor*) const;
+
+ WEBKIT_API double lastModifiedDate() const;
+ WEBKIT_API void setLastModifiedDate(double);
+
+ WEBKIT_API bool isContentFiltered() const;
+ WEBKIT_API void setIsContentFiltered(bool);
+
+ WEBKIT_API long long appCacheID() const;
+ WEBKIT_API void setAppCacheID(long long);
+
+ WEBKIT_API WebURL appCacheManifestURL() const;
+ WEBKIT_API void setAppCacheManifestURL(const WebURL&);
+
+ // A consumer controlled value intended to be used to record opaque
+ // security info related to this request.
+ WEBKIT_API WebCString securityInfo() const;
+ WEBKIT_API void setSecurityInfo(const WebCString&);
+
+#if defined(WEBKIT_IMPLEMENTATION)
+ WebCore::ResourceResponse& toMutableResourceResponse();
+ const WebCore::ResourceResponse& toResourceResponse() const;
+#endif
+
+protected:
+ void assign(WebURLResponsePrivate*);
+
+private:
+ WebURLResponsePrivate* m_private;
+};
+
+} // namespace WebKit
+
+#endif
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list