[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.16-1409-g5afdf4d
eric at webkit.org
eric at webkit.org
Thu Dec 3 13:30:12 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit b27d87b8b4328eadb00dfaf6720003bd4f8431f9
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Nov 9 22:19:38 2009 +0000
2009-11-09 Yaar Schnitman <yaar at chromium.org>
Reviewed by Dimitri Glazkov.
Upstreaming the Chromium WebKit API: WebScreenInfo to WebSharedWorkerRepo.
https://bugs.webkit.org/show_bug.cgi?id=28394
* public/WebScreenInfo.h: Added.
(WebKit::WebScreenInfo::WebScreenInfo):
* public/WebScriptController.h: Added.
* public/WebScriptSource.h: Added.
(WebKit::WebScriptSource::WebScriptSource):
* public/WebSearchableFormData.h: Added.
(WebKit::WebSearchableFormData::isValid):
(WebKit::WebSearchableFormData::url):
(WebKit::WebSearchableFormData::encoding):
* public/WebSecurityOrigin.h: Added.
(WebKit::WebSecurityOrigin::~WebSecurityOrigin):
(WebKit::WebSecurityOrigin::WebSecurityOrigin):
(WebKit::WebSecurityOrigin::operator=):
(WebKit::WebSecurityOrigin::isNull):
* public/WebSecurityPolicy.h: Added.
* public/WebSettings.h: Added.
(WebKit::WebSettings::~WebSettings):
* public/WebSharedWorker.h: Added.
(WebKit::WebSharedWorker::~WebSharedWorker):
* public/WebSharedWorkerRepository.h: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50692 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index e52ee9b..517c598 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,32 @@
+2009-11-09 Yaar Schnitman <yaar at chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Upstreaming the Chromium WebKit API: WebScreenInfo to WebSharedWorkerRepo.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28394
+
+ * public/WebScreenInfo.h: Added.
+ (WebKit::WebScreenInfo::WebScreenInfo):
+ * public/WebScriptController.h: Added.
+ * public/WebScriptSource.h: Added.
+ (WebKit::WebScriptSource::WebScriptSource):
+ * public/WebSearchableFormData.h: Added.
+ (WebKit::WebSearchableFormData::isValid):
+ (WebKit::WebSearchableFormData::url):
+ (WebKit::WebSearchableFormData::encoding):
+ * public/WebSecurityOrigin.h: Added.
+ (WebKit::WebSecurityOrigin::~WebSecurityOrigin):
+ (WebKit::WebSecurityOrigin::WebSecurityOrigin):
+ (WebKit::WebSecurityOrigin::operator=):
+ (WebKit::WebSecurityOrigin::isNull):
+ * public/WebSecurityPolicy.h: Added.
+ * public/WebSettings.h: Added.
+ (WebKit::WebSettings::~WebSettings):
+ * public/WebSharedWorker.h: Added.
+ (WebKit::WebSharedWorker::~WebSharedWorker):
+ * public/WebSharedWorkerRepository.h: Added.
+
2009-11-09 Nate Chapin <japhet at chromium.org>
Reviewed by Dimitri Glazkov.
diff --git a/WebKit/chromium/public/WebScreenInfo.h b/WebKit/chromium/public/WebScreenInfo.h
new file mode 100644
index 0000000..d3d268a
--- /dev/null
+++ b/WebKit/chromium/public/WebScreenInfo.h
@@ -0,0 +1,74 @@
+/*
+ * 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 WebScreenInfo_h
+#define WebScreenInfo_h
+
+#include "WebRect.h"
+
+namespace WebKit {
+
+struct WebScreenInfo {
+ // The screen depth in bits per pixel
+ int depth;
+
+ // The bits per colour component. This assumes that the colours are balanced
+ // equally.
+ int depthPerComponent;
+
+ // This can be true for black and white printers
+ bool isMonochrome;
+
+ // This is set from the rcMonitor member of MONITORINFOEX, to whit:
+ // "A RECT structure that specifies the display monitor rectangle,
+ // expressed in virtual-screen coordinates. Note that if the monitor
+ // is not the primary display monitor, some of the rectangle's
+ // coordinates may be negative values."
+ WebRect rect;
+
+ // This is set from the rcWork member of MONITORINFOEX, to whit:
+ // "A RECT structure that specifies the work area rectangle of the
+ // display monitor that can be used by applications, expressed in
+ // virtual-screen coordinates. Windows uses this rectangle to
+ // maximize an application on the monitor. The rest of the area in
+ // rcMonitor contains system windows such as the task bar and side
+ // bars. Note that if the monitor is not the primary display monitor,
+ // some of the rectangle's coordinates may be negative values".
+ WebRect availableRect;
+
+ WebScreenInfo()
+ : depth(0)
+ , depthPerComponent(0)
+ , isMonochrome(false) { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebScriptController.h b/WebKit/chromium/public/WebScriptController.h
new file mode 100644
index 0000000..54bb08a
--- /dev/null
+++ b/WebKit/chromium/public/WebScriptController.h
@@ -0,0 +1,74 @@
+/*
+ * 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 WebScriptController_h
+#define WebScriptController_h
+
+#include "WebCommon.h"
+
+namespace v8 {
+class Extension;
+}
+
+namespace WebKit {
+
+class WebString;
+
+class WebScriptController {
+public:
+ // Registers a v8 extension to be available on webpages. The three forms
+ // offer various restrictions on what types of contexts the extension is
+ // loaded into. If a scheme is provided, only pages whose URL has the given
+ // scheme will match. If extensionGroup is provided, the extension will only
+ // be loaded into scripts run via WebFrame::ExecuteInNewWorld with the
+ // matching group.
+ // Will only affect v8 contexts initialized after this call. Takes ownership
+ // of the v8::Extension object passed.
+ WEBKIT_API static void registerExtension(v8::Extension*);
+ WEBKIT_API static void registerExtension(v8::Extension*,
+ const WebString& schemeRestriction);
+ WEBKIT_API static void registerExtension(v8::Extension*, int extensionGroup);
+
+ // Enables special settings which are only applicable if V8 is executed
+ // in the single thread which must be the main thread.
+ // FIXME: make a try to dynamically detect when this condition is broken
+ // and automatically switch off single thread mode.
+ WEBKIT_API static void enableV8SingleThreadMode();
+
+ // Process any pending JavaScript console messages.
+ WEBKIT_API static void flushConsoleMessages();
+
+private:
+ WebScriptController();
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebScriptSource.h b/WebKit/chromium/public/WebScriptSource.h
new file mode 100644
index 0000000..344815b
--- /dev/null
+++ b/WebKit/chromium/public/WebScriptSource.h
@@ -0,0 +1,54 @@
+/*
+ * 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 WebScriptSource_h
+#define WebScriptSource_h
+
+#include "WebString.h"
+#include "WebURL.h"
+
+namespace WebKit {
+
+struct WebScriptSource {
+ WebString code;
+ WebURL url;
+ int startLine;
+
+ WebScriptSource(const WebString& code)
+ : code(code), startLine(1) { }
+ WebScriptSource(const WebString& code, const WebURL& url)
+ : code(code), url(url), startLine(1) { }
+ WebScriptSource(const WebString& code, const WebURL& url, int startLine)
+ : code(code), url(url), startLine(startLine) { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebSearchableFormData.h b/WebKit/chromium/public/WebSearchableFormData.h
new file mode 100644
index 0000000..e453387
--- /dev/null
+++ b/WebKit/chromium/public/WebSearchableFormData.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 WebSearchableFormData_h
+#define WebSearchableFormData_h
+
+#include "WebString.h"
+#include "WebURL.h"
+
+namespace WebKit {
+class WebFormElement;
+
+// SearchableFormData encapsulates a URL and encoding of an INPUT field that
+// corresponds to a searchable form request.
+class WebSearchableFormData {
+public:
+ // If the provided form is suitable for automated searching, isValid()
+ // will return false.
+ WebSearchableFormData(const WebFormElement&);
+
+ bool isValid() { return m_url.isValid(); }
+
+ // URL for the searchable form request.
+ const WebURL& url() const
+ {
+ return m_url;
+ }
+
+ // Encoding used to encode the form parameters; never empty.
+ const WebString& encoding() const
+ {
+ return m_encoding;
+ }
+
+private:
+ WebURL m_url;
+ WebString m_encoding;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebSecurityOrigin.h b/WebKit/chromium/public/WebSecurityOrigin.h
new file mode 100644
index 0000000..d04fbc6
--- /dev/null
+++ b/WebKit/chromium/public/WebSecurityOrigin.h
@@ -0,0 +1,92 @@
+/*
+ * 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 WebSecurityOrigin_h
+#define WebSecurityOrigin_h
+
+#include "WebCommon.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class SecurityOrigin; }
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+
+class WebSecurityOriginPrivate;
+class WebString;
+
+class WebSecurityOrigin {
+public:
+ ~WebSecurityOrigin() { reset(); }
+
+ WebSecurityOrigin() : m_private(0) { }
+ WebSecurityOrigin(const WebSecurityOrigin& s) : m_private(0) { assign(s); }
+ WebSecurityOrigin& operator=(const WebSecurityOrigin& s)
+ {
+ assign(s);
+ return *this;
+ }
+
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebSecurityOrigin&);
+
+ bool isNull() const { return !m_private; }
+
+ WEBKIT_API WebString protocol() const;
+ WEBKIT_API WebString host() const;
+ WEBKIT_API unsigned short port() const;
+
+ // The empty WebSecurityOrigin is the least privileged WebSecurityOrigin.
+ WEBKIT_API bool isEmpty() const;
+
+ // Returns a string representation of the WebSecurityOrigin. The empty
+ // WebSecurityOrigin is represented by "null". The representation of a
+ // non-empty WebSecurityOrigin resembles a standard URL.
+ WEBKIT_API WebString toString() const;
+
+ // Returns a string representation of this WebSecurityOrigin that can
+ // be used as a file. Should be used in storage APIs only.
+ WEBKIT_API WebString databaseIdentifier();
+
+#if WEBKIT_IMPLEMENTATION
+ WebSecurityOrigin(const WTF::PassRefPtr<WebCore::SecurityOrigin>&);
+ WebSecurityOrigin& operator=(const WTF::PassRefPtr<WebCore::SecurityOrigin>&);
+ operator WTF::PassRefPtr<WebCore::SecurityOrigin>() const;
+#endif
+
+private:
+ void assign(WebSecurityOriginPrivate*);
+ WebSecurityOriginPrivate* m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebSecurityPolicy.h b/WebKit/chromium/public/WebSecurityPolicy.h
new file mode 100644
index 0000000..47dfe87
--- /dev/null
+++ b/WebKit/chromium/public/WebSecurityPolicy.h
@@ -0,0 +1,65 @@
+/*
+ * 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 WebSecurityPolicy_h
+#define WebSecurityPolicy_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+class WebString;
+class WebURL;
+
+class WebSecurityPolicy {
+public:
+ // Registers a URL scheme to be treated as a local scheme (i.e., with the
+ // same security rules as those applied to "file" URLs). This means that
+ // normal pages cannot link to or access URLs of this scheme.
+ WEBKIT_API static void registerURLSchemeAsLocal(const WebString&);
+
+ // Registers a URL scheme to be treated as a noAccess scheme. This means
+ // that pages loaded with this URL scheme cannot access pages loaded with
+ // any other URL scheme.
+ WEBKIT_API static void registerURLSchemeAsNoAccess(const WebString&);
+
+ // Support for whitelisting access to origins beyond the same-origin policy.
+ WEBKIT_API static void whiteListAccessFromOrigin(
+ const WebURL& sourceOrigin, const WebString& destinationProtocol,
+ const WebString& destinationHost, bool allowDestinationSubdomains);
+ WEBKIT_API static void resetOriginAccessWhiteLists();
+
+private:
+ WebSecurityPolicy();
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebSettings.h b/WebKit/chromium/public/WebSettings.h
new file mode 100644
index 0000000..8ec41f8
--- /dev/null
+++ b/WebKit/chromium/public/WebSettings.h
@@ -0,0 +1,89 @@
+/*
+ * 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 WebSettings_h
+#define WebSettings_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+class WebString;
+class WebURL;
+
+// WebSettings is owned by the WebView and allows code to modify the settings for
+// the WebView's page without any knowledge of WebCore itself. For the most part,
+// these functions have a 1:1 mapping with the methods in WebCore/page/settings.h.
+class WebSettings {
+public:
+ virtual void setStandardFontFamily(const WebString&) = 0;
+ virtual void setFixedFontFamily(const WebString&) = 0;
+ virtual void setSerifFontFamily(const WebString&) = 0;
+ virtual void setSansSerifFontFamily(const WebString&) = 0;
+ virtual void setCursiveFontFamily(const WebString&) = 0;
+ virtual void setFantasyFontFamily(const WebString&) = 0;
+ virtual void setDefaultFontSize(int) = 0;
+ virtual void setDefaultFixedFontSize(int) = 0;
+ virtual void setMinimumFontSize(int) = 0;
+ virtual void setMinimumLogicalFontSize(int) = 0;
+ virtual void setDefaultTextEncodingName(const WebString&) = 0;
+ virtual void setJavaScriptEnabled(bool) = 0;
+ virtual void setWebSecurityEnabled(bool) = 0;
+ virtual void setJavaScriptCanOpenWindowsAutomatically(bool) = 0;
+ virtual void setLoadsImagesAutomatically(bool) = 0;
+ virtual void setPluginsEnabled(bool) = 0;
+ virtual void setDOMPasteAllowed(bool) = 0;
+ virtual void setDeveloperExtrasEnabled(bool) = 0;
+ virtual void setShrinksStandaloneImagesToFit(bool) = 0;
+ virtual void setUsesEncodingDetector(bool) = 0;
+ virtual void setTextAreasAreResizable(bool) = 0;
+ virtual void setJavaEnabled(bool) = 0;
+ virtual void setAllowScriptsToCloseWindows(bool) = 0;
+ virtual void setUserStyleSheetLocation(const WebURL&) = 0;
+ virtual void setUsesPageCache(bool) = 0;
+ virtual void setDownloadableBinaryFontsEnabled(bool) = 0;
+ virtual void setXSSAuditorEnabled(bool) = 0;
+ virtual void setLocalStorageEnabled(bool) = 0;
+ virtual void setEditableLinkBehaviorNeverLive() = 0;
+ virtual void setFontRenderingModeNormal() = 0;
+ virtual void setShouldPaintCustomScrollbars(bool) = 0;
+ virtual void setDatabasesEnabled(bool) = 0;
+ virtual void setAllowUniversalAccessFromFileURLs(bool) = 0;
+ virtual void setTextDirectionSubmenuInclusionBehaviorNeverIncluded() = 0;
+ virtual void setOfflineWebApplicationCacheEnabled(bool) = 0;
+ virtual void setExperimentalWebGLEnabled(bool) = 0;
+
+protected:
+ ~WebSettings() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebSharedWorker.h b/WebKit/chromium/public/WebSharedWorker.h
new file mode 100644
index 0000000..4ac7639
--- /dev/null
+++ b/WebKit/chromium/public/WebSharedWorker.h
@@ -0,0 +1,82 @@
+/*
+ * 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 WebSharedWorker_h
+#define WebSharedWorker_h
+
+#include "WebCommon.h"
+
+namespace WebCore {
+class ScriptExecutionContext;
+}
+
+namespace WebKit {
+
+class WebString;
+class WebMessagePortChannel;
+class WebCommonWorkerClient;
+class WebURL;
+
+// This is the interface to a SharedWorker thread.
+// Since SharedWorkers communicate entirely through MessagePorts this interface only contains APIs for starting up a SharedWorker.
+class WebSharedWorker {
+public:
+ // Invoked from the worker thread to instantiate a WebSharedWorker that interacts with the WebKit worker components.
+ WEBKIT_API static WebSharedWorker* create(WebCommonWorkerClient*);
+
+ virtual ~WebSharedWorker() {};
+
+ // Returns false if the thread hasn't been started yet (script loading has not taken place).
+ // FIXME(atwilson): Remove this when we move the initial script loading into the worker process.
+ virtual bool isStarted() = 0;
+
+ virtual void startWorkerContext(const WebURL& scriptURL,
+ const WebString& name,
+ const WebString& userAgent,
+ const WebString& sourceCode) = 0;
+ class ConnectListener {
+ public:
+ // Invoked once the connect event has been sent so the caller can free this object.
+ virtual void connected() = 0;
+ };
+
+ // Sends a connect event to the SharedWorker context. The listener is invoked when this async operation completes.
+ virtual void connect(WebMessagePortChannel*, ConnectListener*) = 0;
+
+ // Invoked to shutdown the worker when there are no more associated documents.
+ virtual void terminateWorkerContext() = 0;
+
+ // Notification when the WebCommonWorkerClient is destroyed.
+ virtual void clientDestroyed() = 0;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebSharedWorkerRepository.h b/WebKit/chromium/public/WebSharedWorkerRepository.h
new file mode 100644
index 0000000..9fe6890
--- /dev/null
+++ b/WebKit/chromium/public/WebSharedWorkerRepository.h
@@ -0,0 +1,59 @@
+/*
+ * 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 WebSharedWorkerRepository_h
+#define WebSharedWorkerRepository_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+class WebString;
+class WebSharedWorker;
+class WebURL;
+
+class WebSharedWorkerRepository {
+public:
+ // Unique identifier for the parent document of a worker (unique within a given process).
+ typedef unsigned long long DocumentID;
+
+ // Tracks a newly-created SharedWorker via the repository.
+ virtual void addSharedWorker(WebSharedWorker*, DocumentID) = 0;
+
+ // Invoked when a document has been detached. DocumentID can be re-used after documentDetached() is invoked.
+ virtual void documentDetached(DocumentID) = 0;
+
+ // Returns true if the passed document is associated with any SharedWorkers.
+ virtual bool hasSharedWorkers(DocumentID) = 0;
+};
+
+} // namespace WebKit
+
+#endif // WebSharedWorkerRepository_h
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list