summaryrefslogtreecommitdiffstats
path: root/WebKit/chromium/public
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/chromium/public')
-rw-r--r--WebKit/chromium/public/WebAccessibilityObject.h2
-rw-r--r--WebKit/chromium/public/WebAccessibilityRole.h6
-rw-r--r--WebKit/chromium/public/WebAnimationController.h60
-rw-r--r--WebKit/chromium/public/WebDataSource.h4
-rw-r--r--WebKit/chromium/public/WebDevToolsAgent.h12
-rw-r--r--WebKit/chromium/public/WebDevToolsAgentClient.h16
-rw-r--r--WebKit/chromium/public/WebDevToolsFrontend.h5
-rw-r--r--WebKit/chromium/public/WebDevToolsFrontendClient.h5
-rw-r--r--WebKit/chromium/public/WebDocument.h82
-rw-r--r--WebKit/chromium/public/WebDragData.h3
-rw-r--r--WebKit/chromium/public/WebElement.h12
-rw-r--r--WebKit/chromium/public/WebEvent.h116
-rw-r--r--WebKit/chromium/public/WebEventListener.h66
-rw-r--r--WebKit/chromium/public/WebFileChooserParams.h64
-rw-r--r--WebKit/chromium/public/WebFormElement.h6
-rw-r--r--WebKit/chromium/public/WebFrame.h40
-rw-r--r--WebKit/chromium/public/WebFrameClient.h6
-rw-r--r--WebKit/chromium/public/WebGlyphCache.h51
-rw-r--r--WebKit/chromium/public/WebHistoryItem.h3
-rw-r--r--WebKit/chromium/public/WebInputElement.h1
-rw-r--r--WebKit/chromium/public/WebKit.h3
-rw-r--r--WebKit/chromium/public/WebKitClient.h20
-rw-r--r--WebKit/chromium/public/WebMutationEvent.h58
-rw-r--r--WebKit/chromium/public/WebNode.h46
-rw-r--r--WebKit/chromium/public/WebNodeCollection.h75
-rw-r--r--WebKit/chromium/public/WebNodeList.h74
-rw-r--r--WebKit/chromium/public/WebNotificationPresenter.h7
-rw-r--r--WebKit/chromium/public/WebPageSerializer.h85
-rw-r--r--WebKit/chromium/public/WebPageSerializerClient.h75
-rw-r--r--WebKit/chromium/public/WebRuntimeFeatures.h6
-rw-r--r--WebKit/chromium/public/WebSecurityOrigin.h2
-rw-r--r--WebKit/chromium/public/WebSecurityPolicy.h4
-rw-r--r--WebKit/chromium/public/WebSettings.h1
-rw-r--r--WebKit/chromium/public/WebStorageArea.h35
-rw-r--r--WebKit/chromium/public/WebString.h25
-rw-r--r--WebKit/chromium/public/WebURLResponse.h5
-rw-r--r--WebKit/chromium/public/WebVector.h7
-rw-r--r--WebKit/chromium/public/WebView.h16
-rw-r--r--WebKit/chromium/public/WebViewClient.h13
39 files changed, 1045 insertions, 72 deletions
diff --git a/WebKit/chromium/public/WebAccessibilityObject.h b/WebKit/chromium/public/WebAccessibilityObject.h
index d32c548..f46c0d8 100644
--- a/WebKit/chromium/public/WebAccessibilityObject.h
+++ b/WebKit/chromium/public/WebAccessibilityObject.h
@@ -85,7 +85,7 @@ public:
bool isEnabled() const;
bool isHovered() const;
bool isIndeterminate() const;
- bool isMultiSelect() const;
+ bool isMultiSelectable() const;
bool isOffScreen() const;
bool isPasswordField() const;
bool isPressed() const;
diff --git a/WebKit/chromium/public/WebAccessibilityRole.h b/WebKit/chromium/public/WebAccessibilityRole.h
index e836c56..ec041e0 100644
--- a/WebKit/chromium/public/WebAccessibilityRole.h
+++ b/WebKit/chromium/public/WebAccessibilityRole.h
@@ -106,8 +106,14 @@ enum WebAccessibilityRole {
WebAccessibilityRoleTabList,
WebAccessibilityRoleTabPanel,
WebAccessibilityRoleTreeRole,
+ WebAccessibilityRoleTreeGrid,
WebAccessibilityRoleTreeItemRole,
WebAccessibilityRoleDirectory,
+ WebAccessibilityRoleEditableText,
+
+ WebAccessibilityRoleListItem,
+ WebAccessibilityRoleMenuListPopup,
+ WebAccessibilityRoleMenuListOption,
WebAccessibilityRoleLandmarkApplication,
WebAccessibilityRoleLandmarkBanner,
diff --git a/WebKit/chromium/public/WebAnimationController.h b/WebKit/chromium/public/WebAnimationController.h
new file mode 100644
index 0000000..d727d70
--- /dev/null
+++ b/WebKit/chromium/public/WebAnimationController.h
@@ -0,0 +1,60 @@
+/*
+ * 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 WebAnimationController_h
+#define WebAnimationController_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+class WebElement;
+class WebString;
+class WebURL;
+
+// WebAnimationController can be used to control animations in a frame. It is
+// owned by a WebFrame and its life span is bound to that WebFrame.
+class WebAnimationController {
+public:
+ WEBKIT_API virtual bool pauseAnimationAtTime(WebElement&,
+ const WebString& animationName,
+ double time) = 0;
+ WEBKIT_API virtual bool pauseTransitionAtTime(WebElement&,
+ const WebString& propertyName,
+ double time) = 0;
+
+ WEBKIT_API virtual unsigned numberOfActiveAnimations() const = 0;
+protected:
+ ~WebAnimationController() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebDataSource.h b/WebKit/chromium/public/WebDataSource.h
index 3a83341..1aa7a98 100644
--- a/WebKit/chromium/public/WebDataSource.h
+++ b/WebKit/chromium/public/WebDataSource.h
@@ -36,6 +36,7 @@
namespace WebKit {
+class WebApplicationCacheHost;
class WebString;
class WebURL;
class WebURLRequest;
@@ -91,6 +92,9 @@ public:
virtual ExtraData* extraData() const = 0;
virtual void setExtraData(ExtraData*) = 0;
+ // The application cache host associated with this datasource.
+ virtual WebApplicationCacheHost* applicationCacheHost() = 0;
+
protected:
~WebDataSource() { }
};
diff --git a/WebKit/chromium/public/WebDevToolsAgent.h b/WebKit/chromium/public/WebDevToolsAgent.h
index 9c27628..e3b5186 100644
--- a/WebKit/chromium/public/WebDevToolsAgent.h
+++ b/WebKit/chromium/public/WebDevToolsAgent.h
@@ -55,12 +55,6 @@ public:
virtual void didNavigate() = 0;
- // TODO(32320): remove this method from API.
- virtual void dispatchMessageFromFrontend(const WebString& className,
- const WebString& methodName,
- const WebString& param1,
- const WebString& param2,
- const WebString& param3) = 0;
virtual void dispatchMessageFromFrontend(const WebDevToolsMessageData&) = 0;
virtual void inspectElementAt(const WebPoint&) = 0;
@@ -79,12 +73,6 @@ public:
// Asynchronously request debugger to pause immediately.
WEBKIT_API static void debuggerPauseScript();
- // TODO(32320): remove this method from API.
- WEBKIT_API static bool dispatchMessageFromFrontendOnIOThread(const WebString& className,
- const WebString& methodName,
- const WebString& param1,
- const WebString& param2,
- const WebString& param3);
WEBKIT_API static bool dispatchMessageFromFrontendOnIOThread(const WebDevToolsMessageData&);
typedef void (*MessageLoopDispatchHandler)();
diff --git a/WebKit/chromium/public/WebDevToolsAgentClient.h b/WebKit/chromium/public/WebDevToolsAgentClient.h
index ec51654..d78a6f1 100644
--- a/WebKit/chromium/public/WebDevToolsAgentClient.h
+++ b/WebKit/chromium/public/WebDevToolsAgentClient.h
@@ -31,6 +31,7 @@
#ifndef WebDevToolsAgentClient_h
#define WebDevToolsAgentClient_h
+#include "WebCString.h"
#include "WebCommon.h"
namespace WebKit {
@@ -39,12 +40,6 @@ struct WebDevToolsMessageData;
class WebDevToolsAgentClient {
public:
- // TODO(32320): remove this method from API.
- virtual void sendMessageToFrontend(const WebString& className,
- const WebString& methodName,
- const WebString& param1,
- const WebString& param2,
- const WebString& param3) {}
virtual void sendMessageToFrontend(const WebDevToolsMessageData&) { }
// Invalidates widget which leads to the repaint.
@@ -56,14 +51,11 @@ public:
// Notifies host upon runtime feature being enabled/disabled.
virtual void runtimeFeatureStateChanged(const WebString& feature, bool enabled) { }
- // TODO(32320): remove this method from API.
- WEBKIT_API static void sendMessageToFrontendOnIOThread(const WebString& className,
- const WebString& methodName,
- const WebString& param1,
- const WebString& param2,
- const WebString& param3);
WEBKIT_API static void sendMessageToFrontendOnIOThread(const WebDevToolsMessageData&);
+ virtual WebCString injectedScriptSource() { return WebCString(); }
+ virtual WebCString injectedScriptDispatcherSource() { return WebCString(); }
+
protected:
~WebDevToolsAgentClient() { }
};
diff --git a/WebKit/chromium/public/WebDevToolsFrontend.h b/WebKit/chromium/public/WebDevToolsFrontend.h
index b7d7189..d95f35a 100644
--- a/WebKit/chromium/public/WebDevToolsFrontend.h
+++ b/WebKit/chromium/public/WebDevToolsFrontend.h
@@ -50,11 +50,6 @@ public:
virtual ~WebDevToolsFrontend() {}
- virtual void dispatchMessageFromAgent(const WebString& className,
- const WebString& methodName,
- const WebString& param1,
- const WebString& param2,
- const WebString& param3) = 0;
virtual void dispatchMessageFromAgent(const WebDevToolsMessageData&) = 0;
};
diff --git a/WebKit/chromium/public/WebDevToolsFrontendClient.h b/WebKit/chromium/public/WebDevToolsFrontendClient.h
index 2f74a8c..6200709 100644
--- a/WebKit/chromium/public/WebDevToolsFrontendClient.h
+++ b/WebKit/chromium/public/WebDevToolsFrontendClient.h
@@ -40,11 +40,6 @@ class WebDevToolsFrontendClient {
public:
WebDevToolsFrontendClient() {}
- virtual void sendMessageToAgent(const WebString& className,
- const WebString& methodName,
- const WebString& param1,
- const WebString& param2,
- const WebString& param3) {};
virtual void sendMessageToAgent(const WebDevToolsMessageData&) {};
virtual void sendDebuggerCommandToAgent(const WebString& command) {};
virtual void sendDebuggerPauseScript() {}
diff --git a/WebKit/chromium/public/WebDocument.h b/WebKit/chromium/public/WebDocument.h
new file mode 100644
index 0000000..e158c41
--- /dev/null
+++ b/WebKit/chromium/public/WebDocument.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 WebDocument_h
+#define WebDocument_h
+
+#include "WebNode.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class Document; }
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+class WebElement;
+class WebFrame;
+class WebNodeCollection;
+class WebString;
+class WebURL;
+
+// Provides readonly access to some properties of a DOM document.
+class WebDocument : public WebNode {
+public:
+ WebDocument() { }
+ WebDocument(const WebDocument& e) : WebNode(e) { }
+
+ WebDocument& operator=(const WebDocument& e)
+ {
+ WebNode::assign(e);
+ return *this;
+ }
+ void assign(const WebDocument& e) { WebNode::assign(e); }
+
+ // Returns the frame the document belongs to or 0 if the document is frameless.
+ WEBKIT_API WebFrame* frame() const;
+ WEBKIT_API bool isHTMLDocument() const;
+ WEBKIT_API WebURL baseURL() const;
+ WEBKIT_API WebElement documentElement() const;
+ WEBKIT_API WebElement body() const;
+ WEBKIT_API WebElement head();
+ WEBKIT_API WebNodeCollection all();
+ WEBKIT_API WebURL completeURL(const WebString&) const;
+ WEBKIT_API WebElement getElementById(const WebString& id) const;
+ WEBKIT_API WebString applicationID() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebDocument(const WTF::PassRefPtr<WebCore::Document>&);
+ WebDocument& operator=(const WTF::PassRefPtr<WebCore::Document>&);
+ operator WTF::PassRefPtr<WebCore::Document>() const;
+#endif
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebDragData.h b/WebKit/chromium/public/WebDragData.h
index f7a165d..01582a9 100644
--- a/WebKit/chromium/public/WebDragData.h
+++ b/WebKit/chromium/public/WebDragData.h
@@ -72,6 +72,9 @@ public:
WEBKIT_API WebString urlTitle() const;
WEBKIT_API void setURLTitle(const WebString&);
+ WEBKIT_API WebURL downloadURL() const;
+ WEBKIT_API void setDownloadURL(const WebURL&);
+
WEBKIT_API WebString fileExtension() const;
WEBKIT_API void setFileExtension(const WebString&);
diff --git a/WebKit/chromium/public/WebElement.h b/WebKit/chromium/public/WebElement.h
index d7a2cbf..20f6c9a 100644
--- a/WebKit/chromium/public/WebElement.h
+++ b/WebKit/chromium/public/WebElement.h
@@ -39,15 +39,21 @@ namespace WTF { template <typename T> class PassRefPtr; }
#endif
namespace WebKit {
-
- // Provides readonly access to some properties of a DOM element node.
+ // Provides access to some properties of a DOM element node.
class WebElement : public WebNode {
public:
WebElement() : WebNode() { }
WebElement(const WebElement& e) : WebNode(e) { }
WebElement& operator=(const WebElement& e) { WebNode::assign(e); return *this; }
- WEBKIT_API void assign(const WebElement& e) { WebNode::assign(e); }
+ void assign(const WebElement& e) { WebNode::assign(e); }
+
+ WEBKIT_API WebString tagName() const;
+ WEBKIT_API bool hasTagName(const WebString&) const;
+ WEBKIT_API bool hasAttribute(const WebString&) const;
+ WEBKIT_API WebString getAttribute(const WebString&) const;
+ WEBKIT_API bool setAttribute(const WebString& name, const WebString& value);
+ WEBKIT_API WebString innerText() const;
#if WEBKIT_IMPLEMENTATION
WebElement(const WTF::PassRefPtr<WebCore::Element>&);
diff --git a/WebKit/chromium/public/WebEvent.h b/WebKit/chromium/public/WebEvent.h
new file mode 100644
index 0000000..b0964d1
--- /dev/null
+++ b/WebKit/chromium/public/WebEvent.h
@@ -0,0 +1,116 @@
+/*
+ * Copyright (C) 2010 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 WebEvent_h
+#define WebEvent_h
+
+#include "WebCommon.h"
+#include "WebNode.h"
+#include "WebString.h"
+
+namespace WebCore { class Event; }
+#if WEBKIT_IMPLEMENTATION
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+
+class WebEvent {
+public:
+ enum PhaseType {
+ CapturingPhase = 1,
+ AtTarget = 2,
+ BubblingPhase = 3
+ };
+
+ WebEvent() : m_private(0) { }
+ WebEvent(const WebEvent& e) : m_private(0) { assign(e); }
+ WebEvent& operator=(const WebEvent& e)
+ {
+ assign(e);
+ return *this;
+ }
+
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebEvent&);
+
+ bool isNull() const { return !m_private; }
+
+ WEBKIT_API WebString type() const;
+ WEBKIT_API WebNode target() const;
+ WEBKIT_API WebNode currentTarget() const;
+
+ WEBKIT_API PhaseType eventPhase() const;
+ WEBKIT_API bool bubbles() const;
+ WEBKIT_API bool cancelable() const;
+
+ WEBKIT_API bool isUIEvent() const;
+ WEBKIT_API bool isMouseEvent() const;
+ WEBKIT_API bool isMutationEvent() const;
+ WEBKIT_API bool isKeyboardEvent() const;
+ WEBKIT_API bool isTextEvent() const;
+ WEBKIT_API bool isCompositionEvent() const;
+ WEBKIT_API bool isDragEvent() const;
+ WEBKIT_API bool isClipboardEvent() const;
+ WEBKIT_API bool isMessageEvent() const;
+ WEBKIT_API bool isWheelEvent() const;
+ WEBKIT_API bool isBeforeTextInsertedEvent() const;
+ WEBKIT_API bool isOverflowEvent() const;
+ WEBKIT_API bool isPageTransitionEvent() const;
+ WEBKIT_API bool isPopStateEvent() const;
+ WEBKIT_API bool isProgressEvent() const;
+ WEBKIT_API bool isXMLHttpRequestProgressEvent() const;
+ WEBKIT_API bool isWebKitAnimationEvent() const;
+ WEBKIT_API bool isWebKitTransitionEvent() const;
+ WEBKIT_API bool isBeforeLoadEvent() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebEvent(const WTF::PassRefPtr<WebCore::Event>&);
+#endif
+
+protected:
+ typedef WebCore::Event WebEventPrivate;
+ void assign(WebEventPrivate*);
+ WebEventPrivate* m_private;
+
+ template<typename T> T* unwrap()
+ {
+ return static_cast<T*>(m_private);
+ }
+
+ template<typename T> const T* constUnwrap() const
+ {
+ return static_cast<const T*>(m_private);
+ }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebEventListener.h b/WebKit/chromium/public/WebEventListener.h
new file mode 100644
index 0000000..52de1cd
--- /dev/null
+++ b/WebKit/chromium/public/WebEventListener.h
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2010 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 WebEventListener_h
+#define WebEventListener_h
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class Node; }
+#endif
+
+namespace WebKit {
+
+class EventListenerWrapper;
+class WebEvent;
+class WebEventListenerPrivate;
+class WebNode;
+class WebString;
+
+class WebEventListener {
+public:
+ WebEventListener();
+ virtual ~WebEventListener();
+
+ // Called when an event is received.
+ virtual void handleEvent(const WebEvent&) = 0;
+
+#if WEBKIT_IMPLEMENTATION
+ void notifyEventListenerDeleted(EventListenerWrapper*);
+ EventListenerWrapper* createEventListenerWrapper(const WebString& eventType, bool useCapture, WebCore::Node* node);
+ EventListenerWrapper* getEventListenerWrapper(const WebString& eventType, bool useCapture, WebCore::Node* node);
+#endif
+
+private:
+ WebEventListenerPrivate* m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebFileChooserParams.h b/WebKit/chromium/public/WebFileChooserParams.h
new file mode 100644
index 0000000..6359f14
--- /dev/null
+++ b/WebKit/chromium/public/WebFileChooserParams.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2010 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 WebFileChooserParams_h
+#define WebFileChooserParams_h
+
+#include "WebFileChooserCompletion.h"
+#include "WebString.h"
+#include "WebVector.h"
+
+namespace WebKit {
+
+struct WebFileChooserParams {
+ // If |multiSelect| is true, the dialog allow to select multiple files.
+ bool multiSelect;
+ // |title| is a title of a file chooser dialog. It can be an empty string.
+ WebString title;
+ // |initialValue| is a filename which the dialog should select by default.
+ // It can be an empty string.
+ WebString initialValue;
+ // |acceptTypes| has a comma-separated MIME types such as "audio/*,text/plain".
+ // The dialog may restrict selectable files to the specified MIME types.
+ // This value comes from an 'accept' attribute value of an INPUT element.
+ // So it might be a wrong formatted string.
+ WebString acceptTypes;
+ // |selectedFiles| has filenames which a file upload control already select.
+ // A WebViewClient implementation may ask a user to select
+ // - removing a file from the selected files,
+ // - appending other files, or
+ // - replacing with other files
+ // before opening a file chooser dialog.
+ WebVector<WebString> selectedFiles;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebFormElement.h b/WebKit/chromium/public/WebFormElement.h
index 27a1edb..b07bff9 100644
--- a/WebKit/chromium/public/WebFormElement.h
+++ b/WebKit/chromium/public/WebFormElement.h
@@ -50,7 +50,11 @@ namespace WebKit {
WebFormElement() : WebElement() { }
WebFormElement(const WebFormElement& e) : WebElement(e) { }
- WebElement& operator=(const WebFormElement& e) { WebElement::assign(e); return *this; }
+ WebFormElement& operator=(const WebFormElement& e)
+ {
+ WebElement::assign(e);
+ return *this;
+ }
WEBKIT_API void assign(const WebFormElement& e) { WebElement::assign(e); }
#if WEBKIT_IMPLEMENTATION
diff --git a/WebKit/chromium/public/WebFrame.h b/WebKit/chromium/public/WebFrame.h
index 44b57aa..4197c23 100644
--- a/WebKit/chromium/public/WebFrame.h
+++ b/WebKit/chromium/public/WebFrame.h
@@ -45,8 +45,11 @@ template <class T> class Local;
namespace WebKit {
+class WebAnimationController;
class WebData;
class WebDataSource;
+class WebDocument;
+class WebElement;
class WebFormElement;
class WebHistoryItem;
class WebInputElement;
@@ -66,6 +69,9 @@ template <typename T> class WebVector;
class WebFrame {
public:
+ // Returns the number of live WebFrame objects, used for leak checking.
+ WEBKIT_API static int instanceCount();
+
// The two functions below retrieve the WebFrame instances relating the
// currently executing JavaScript. Since JavaScript can make function
// calls across frames, though, we need to be more precise.
@@ -85,11 +91,16 @@ public:
WEBKIT_API static WebFrame* frameForEnteredContext();
WEBKIT_API static WebFrame* frameForCurrentContext();
+ // Returns the frame inside a given frame or iframe element. Returns 0 if
+ // the given element is not a frame, iframe or if the frame is empty.
+ WEBKIT_API static WebFrame* fromFrameOwnerElement(const WebElement&);
+
// Basic properties ---------------------------------------------------
// The name of this frame.
virtual WebString name() const = 0;
+ virtual void clearName() = 0;
// The url of the document loaded in this frame. This is equivalent to
// dataSource()->request().url().
@@ -103,6 +114,9 @@ public:
// the document loaded in this frame.
virtual WebURL openSearchDescriptionURL() const = 0;
+ // Return the frame's encoding.
+ virtual WebString encoding() const = 0;
+
// Geometry -----------------------------------------------------------
@@ -164,8 +178,12 @@ public:
// Content ------------------------------------------------------------
+ virtual WebDocument document() const = 0;
+
virtual void forms(WebVector<WebFormElement>&) const = 0;
+ virtual WebAnimationController* animationController() = 0;
+
// Scripting ----------------------------------------------------------
@@ -186,17 +204,6 @@ public:
// Executes script in the context of the current page.
virtual void executeScript(const WebScriptSource&) = 0;
- // Executes script in a new context associated with the frame. The
- // script gets its own global scope and its own prototypes for
- // intrinsic JS objects (String, Array, and so-on). It shares the
- // wrappers for all DOM nodes and DOM constructors. extensionGroup is
- // an embedder-provided specifier that controls which v8 extensions are
- // loaded into the new context - see WebKit::registerExtension for the
- // corresponding specifier.
- virtual void executeScriptInNewContext(const WebScriptSource* sources,
- unsigned numSources,
- int extensionGroup) = 0;
-
// Executes JavaScript in a new world associated with the web frame.
// The script gets its own global scope and its own prototypes for
// intrinsic JavaScript objects (String, Array, and so-on). It also
@@ -428,6 +435,7 @@ public:
// of matches found during the scoping effort.
virtual void resetMatchCount() = 0;
+
// Password autocompletion ---------------------------------------------
// Registers a listener for the specified user name input element. The
@@ -438,12 +446,14 @@ public:
WebInputElement,
WebPasswordAutocompleteListener*) = 0;
+
// Utility -------------------------------------------------------------
// Given a relative URL, returns an absolute URL by resolving the URL
// relative to the base URL of the frame's document. This uses the
// same algorithm that WebKit uses to resolve hyperlinks found in a
// HTML document.
+ // Deprecated. Use document().completeURL() instead.
virtual WebURL completeURL(const WebString&) const = 0;
// Returns the contents of this frame as a string. If the text is
@@ -460,6 +470,14 @@ public:
// from the DOM.
virtual WebString contentAsMarkup() const = 0;
+ // Returns a text representation of the render tree. This method is used
+ // to support layout tests.
+ virtual WebString renderTreeAsText() const = 0;
+
+ // Returns the counter value for the specified element. This method is
+ // used to support layout tests.
+ virtual WebString counterValueForElementById(const WebString& id) const = 0;
+
protected:
~WebFrame() { }
};
diff --git a/WebKit/chromium/public/WebFrameClient.h b/WebKit/chromium/public/WebFrameClient.h
index 297eb62..4078151 100644
--- a/WebKit/chromium/public/WebFrameClient.h
+++ b/WebKit/chromium/public/WebFrameClient.h
@@ -80,6 +80,12 @@ public:
// This frame is about to be closed.
virtual void willClose(WebFrame*) { }
+ // Controls whether plugins are allowed for this frame.
+ virtual bool allowPlugins(WebFrame*, bool enabledPerSettings) { return enabledPerSettings; }
+
+ // Controls whether images are allowed for this frame.
+ virtual bool allowImages(WebFrame*, bool enabledPerSettings) { return enabledPerSettings; }
+
// Load commands -------------------------------------------------------
diff --git a/WebKit/chromium/public/WebGlyphCache.h b/WebKit/chromium/public/WebGlyphCache.h
new file mode 100644
index 0000000..661767d
--- /dev/null
+++ b/WebKit/chromium/public/WebGlyphCache.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2010 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 WebGlyphCache_h
+#define WebGlyphCache_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+// An interface to query WebKit's glyph cache (which maps unicode characters to
+// glyphs in particular fonts).
+class WebGlyphCache {
+public:
+ // Returns the number of pages in the glyph cache.
+ WEBKIT_API static size_t pageCount();
+
+private:
+ WebGlyphCache(); // Not intended to be instanced.
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebHistoryItem.h b/WebKit/chromium/public/WebHistoryItem.h
index f15a62c..e248a61 100644
--- a/WebKit/chromium/public/WebHistoryItem.h
+++ b/WebKit/chromium/public/WebHistoryItem.h
@@ -105,6 +105,9 @@ public:
WEBKIT_API WebVector<WebString> documentState() const;
WEBKIT_API void setDocumentState(const WebVector<WebString>&);
+ WEBKIT_API long long documentSequenceNumber() const;
+ WEBKIT_API void setDocumentSequenceNumber(long long);
+
WEBKIT_API WebString httpContentType() const;
WEBKIT_API void setHTTPContentType(const WebString&);
diff --git a/WebKit/chromium/public/WebInputElement.h b/WebKit/chromium/public/WebInputElement.h
index 75e44b9..226624a 100644
--- a/WebKit/chromium/public/WebInputElement.h
+++ b/WebKit/chromium/public/WebInputElement.h
@@ -82,6 +82,7 @@ namespace WebKit {
Week
};
+ WEBKIT_API bool autoComplete() const;
WEBKIT_API bool isEnabledFormControl() const;
WEBKIT_API InputType inputType() const;
WEBKIT_API WebString formControlType() const;
diff --git a/WebKit/chromium/public/WebKit.h b/WebKit/chromium/public/WebKit.h
index b9e6407..732cac6 100644
--- a/WebKit/chromium/public/WebKit.h
+++ b/WebKit/chromium/public/WebKit.h
@@ -55,6 +55,9 @@ WEBKIT_API WebKitClient* webKitClient();
WEBKIT_API void setLayoutTestMode(bool);
WEBKIT_API bool layoutTestMode();
+// Enables the named log channel. See WebCore/platform/Logging.h for details.
+WEBKIT_API void enableLogChannel(const char*);
+
// Purge the plugin list cache. If |reloadPages| is true, any pages
// containing plugins will be reloaded after refreshing the plugin list.
WEBKIT_API void resetPluginCache(bool reloadPages);
diff --git a/WebKit/chromium/public/WebKitClient.h b/WebKit/chromium/public/WebKitClient.h
index 2a00a9a..fe6c801 100644
--- a/WebKit/chromium/public/WebKitClient.h
+++ b/WebKit/chromium/public/WebKitClient.h
@@ -89,6 +89,7 @@ public:
virtual WebStorageNamespace* createLocalStorageNamespace(const WebString& path, unsigned quota) { return 0; }
// Return a new SessionStorage namespace.
+ // THIS IS DEPRECATED. WebViewClient::getSessionStorageNamespace() is the new way to access this.
virtual WebStorageNamespace* createSessionStorageNamespace() { return 0; }
// Called when storage events fire.
@@ -178,10 +179,11 @@ public:
// Network -------------------------------------------------------------
virtual void setCookies(
- const WebURL& url, const WebURL& policyURL, const WebString& cookies) { }
- virtual WebString cookies(const WebURL& url, const WebURL& policyURL) { return WebString(); }
- virtual bool rawCookies(const WebURL& url, const WebURL& policyURL, WebVector<WebCookie>*) { return false; }
+ const WebURL& url, const WebURL& firstPartyForCookies, const WebString& cookies) { }
+ virtual WebString cookies(const WebURL& url, const WebURL& firstPartyForCookies) { return WebString(); }
+ virtual bool rawCookies(const WebURL& url, const WebURL& firstPartyForCookies, WebVector<WebCookie>*) { return false; }
virtual void deleteCookie(const WebURL& url, const WebString& cookieName) { }
+ virtual bool cookiesEnabled(const WebURL& url, const WebURL& firstPartyForCookies) { return true; }
// A suggestion to prefetch IP information for the given hostname.
virtual void prefetchHostName(const WebString&) { }
@@ -200,23 +202,23 @@ public:
// If refresh is true, then cached information should not be used to
// satisfy this call.
- virtual void getPluginList(bool refresh, WebPluginListBuilder*) { };
+ virtual void getPluginList(bool refresh, WebPluginListBuilder*) { }
// Profiling -----------------------------------------------------------
- virtual void decrementStatsCounter(const char* name) { };
- virtual void incrementStatsCounter(const char* name) { };
+ virtual void decrementStatsCounter(const char* name) { }
+ virtual void incrementStatsCounter(const char* name) { }
// An event is identified by the pair (name, id). The extra parameter
// specifies additional data to log with the event.
- virtual void traceEventBegin(const char* name, void* id, const char* extra) { };
- virtual void traceEventEnd(const char* name, void* id, const char* extra) { };
+ virtual void traceEventBegin(const char* name, void* id, const char* extra) { }
+ virtual void traceEventEnd(const char* name, void* id, const char* extra) { }
// Generic callback for reporting histogram data. Range is identified by the min, max pair.
// By default, histogram is exponential, so that min=1, max=1000000, bucketCount=50 would do. Setting
// linear to true would require bucket count to cover whole min-max range.
- virtual void histogramCounts(const WebString& name, int sample, int min, int max, int bucketCount, bool linear) { };
+ virtual void histogramCounts(const WebString& name, int sample, int min, int max, int bucketCount, bool linear) { }
// Resources -----------------------------------------------------------
diff --git a/WebKit/chromium/public/WebMutationEvent.h b/WebKit/chromium/public/WebMutationEvent.h
new file mode 100644
index 0000000..75eb9c4
--- /dev/null
+++ b/WebKit/chromium/public/WebMutationEvent.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2010 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 WebMutationEvent_h
+#define WebMutationEvent_h
+
+#include "WebEvent.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class Event; }
+#endif
+
+namespace WebKit {
+
+class WebMutationEvent : public WebEvent {
+public:
+ enum AttrChangeType {
+ Modification = 1,
+ Addition = 2,
+ Removal = 3
+ };
+
+ WEBKIT_API WebNode relatedNode() const;
+ WEBKIT_API WebString prevValue() const;
+ WEBKIT_API WebString newValue() const;
+ WEBKIT_API WebString attrName() const;
+ WEBKIT_API AttrChangeType attrChange() const;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebNode.h b/WebKit/chromium/public/WebNode.h
index 03afa90..4d2a0e9 100644
--- a/WebKit/chromium/public/WebNode.h
+++ b/WebKit/chromium/public/WebNode.h
@@ -40,9 +40,13 @@ namespace WTF { template <typename T> class PassRefPtr; }
#endif
namespace WebKit {
+class WebDocument;
+class WebEventListener;
+class WebEventListenerPrivate;
class WebFrame;
+class WebNodeList;
-// Provides readonly access to some properties of a DOM node.
+// Provides access to some properties of a DOM node.
class WebNode {
public:
virtual ~WebNode() { reset(); }
@@ -66,14 +70,52 @@ public:
operator WTF::PassRefPtr<WebCore::Node>() const;
#endif
+ enum NodeType {
+ ElementNode = 1,
+ AttributeNode,
+ TextNode,
+ CDataSectionNode,
+ EntityReferenceNode,
+ EntityNode,
+ ProcessingInstructionsNode,
+ CommentNode,
+ DocumentNode,
+ DocumentTypeNode,
+ DocumentFragmentNode,
+ NotationNode,
+ XPathNamespaceNode
+ };
+ WEBKIT_API NodeType nodeType() const;
WEBKIT_API WebNode parentNode() const;
WEBKIT_API WebString nodeName() const;
+ WEBKIT_API WebString nodeValue() const;
+ WEBKIT_API bool setNodeValue(const WebString&);
+ // Deprecated. Use document().frame() instead.
WEBKIT_API WebFrame* frame() const;
+ WEBKIT_API WebDocument document() const;
+ WEBKIT_API WebNode firstChild() const;
+ WEBKIT_API WebNode lastChild() const;
+ WEBKIT_API WebNode previousSibling() const;
+ WEBKIT_API WebNode nextSibling() const;
+ WEBKIT_API bool hasChildNodes() const;
+ WEBKIT_API WebNodeList childNodes();
+ WEBKIT_API WebString createMarkup() const;
+ WEBKIT_API bool isTextNode() const;
+ WEBKIT_API bool isElementNode() const;
+ WEBKIT_API void addEventListener(const WebString& eventType, WebEventListener* listener, bool useCapture);
+ WEBKIT_API void removeEventListener(const WebString& eventType, WebEventListener* listener, bool useCapture);
template<typename T> T toElement()
{
T res;
- res.m_private = m_private;
+ res.WebNode::assign(*this);
+ return res;
+ }
+
+ template<typename T> const T toConstElement() const
+ {
+ T res;
+ res.WebNode::assign(*this);
return res;
}
diff --git a/WebKit/chromium/public/WebNodeCollection.h b/WebKit/chromium/public/WebNodeCollection.h
new file mode 100644
index 0000000..fee4f44
--- /dev/null
+++ b/WebKit/chromium/public/WebNodeCollection.h
@@ -0,0 +1,75 @@
+/*
+ * 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 WebNodeCollection_h
+#define WebNodeCollection_h
+
+#include "WebCommon.h"
+
+namespace WebCore { class HTMLCollection; }
+#if WEBKIT_IMPLEMENTATION
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+class WebNode;
+
+// Provides readonly access to some properties of a DOM node.
+class WebNodeCollection {
+public:
+ ~WebNodeCollection() { reset(); }
+
+ WebNodeCollection() : m_private(0) { }
+ WebNodeCollection(const WebNodeCollection& n) : m_private(0) { assign(n); }
+ WebNodeCollection& operator=(const WebNodeCollection& n)
+ {
+ assign(n);
+ return *this;
+ }
+
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebNodeCollection&);
+
+ WEBKIT_API unsigned length() const;
+ WEBKIT_API WebNode nextItem() const;
+ WEBKIT_API WebNode firstItem() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebNodeCollection(const WTF::PassRefPtr<WebCore::HTMLCollection>&);
+#endif
+
+private:
+ void assign(WebCore::HTMLCollection*);
+ WebCore::HTMLCollection* m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebNodeList.h b/WebKit/chromium/public/WebNodeList.h
new file mode 100644
index 0000000..23efab0
--- /dev/null
+++ b/WebKit/chromium/public/WebNodeList.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 WebNodeList_h
+#define WebNodeList_h
+
+#include "WebCommon.h"
+
+namespace WebCore { class NodeList; }
+#if WEBKIT_IMPLEMENTATION
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+class WebNode;
+
+// Provides readonly access to some properties of a DOM node.
+class WebNodeList {
+public:
+ ~WebNodeList() { reset(); }
+
+ WebNodeList() : m_private(0) { }
+ WebNodeList(const WebNodeList& n) : m_private(0) { assign(n); }
+ WebNodeList& operator=(const WebNodeList& n)
+ {
+ assign(n);
+ return *this;
+ }
+
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebNodeList&);
+
+ WEBKIT_API unsigned length() const;
+ WEBKIT_API WebNode item(size_t) const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebNodeList(const WTF::PassRefPtr<WebCore::NodeList>&);
+#endif
+
+private:
+ void assign(WebCore::NodeList*);
+ WebCore::NodeList* m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebNotificationPresenter.h b/WebKit/chromium/public/WebNotificationPresenter.h
index 653b142..a3764aa 100644
--- a/WebKit/chromium/public/WebNotificationPresenter.h
+++ b/WebKit/chromium/public/WebNotificationPresenter.h
@@ -35,8 +35,10 @@
namespace WebKit {
+class WebDocument;
class WebNotification;
class WebNotificationPermissionCallback;
+class WebURL;
// Provides the services to show desktop notifications to the user.
class WebNotificationPresenter {
@@ -57,8 +59,9 @@ public:
// being destroyed. Does _not_ remove the notification if being shown, but detaches it from receiving events.
virtual void objectDestroyed(const WebNotification&) = 0;
- // Checks the permission level of a given origin.
- virtual Permission checkPermission(const WebString& origin) = 0;
+ // Checks the permission level for the given URL. If the URL is being displayed in a document
+ // (as opposed to a worker or other ScriptExecutionContext), |document| will also be provided.
+ virtual Permission checkPermission(const WebURL& url, WebDocument* document) = 0;
// Requests permission for a given origin. This operation is asynchronous and the callback provided
// will be invoked when the permission decision is made. Callback pointer must remain
diff --git a/WebKit/chromium/public/WebPageSerializer.h b/WebKit/chromium/public/WebPageSerializer.h
new file mode 100644
index 0000000..94f7994
--- /dev/null
+++ b/WebKit/chromium/public/WebPageSerializer.h
@@ -0,0 +1,85 @@
+/*
+ * 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 WebPageSerializer_h
+#define WebPageSerializer_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+class WebFrame;
+class WebPageSerializerClient;
+class WebString;
+class WebURL;
+template <typename T> class WebVector;
+
+// Get html data by serializing all frames of current page with lists
+// which contain all resource links that have local copy.
+class WebPageSerializer {
+public:
+ // This function will find out all frames and serialize them to HTML data.
+ // We have a data buffer to temporary saving generated html data. We will
+ // sequentially call WebPageSeriazlierClient once the data buffer is full.
+ //
+ // Return false means no available frame has been serialized, otherwise
+ // return true.
+ //
+ // The parameter frame specifies which frame need to be serialized.
+ // The parameter recursive specifies whether we need to
+ // serialize all sub frames of the specified frame or not.
+ // The parameter client specifies the pointer of interface
+ // WebPageSerializerClient providing a sink interface to receive the
+ // individual chunks of data to be saved.
+ // The parameter links contain original URLs of all saved links.
+ // The parameter localPaths contain corresponding local file paths of all
+ // saved links, which matched with vector:links one by one.
+ // The parameter localDirectoryName is relative path of directory which
+ // contain all saved auxiliary files included all sub frames and resources.
+ WEBKIT_API static bool serialize(WebFrame* frame,
+ bool recursive,
+ WebPageSerializerClient* client,
+ const WebVector<WebURL>& links,
+ const WebVector<WebString>& localPaths,
+ const WebString& localDirectoryName);
+
+ // FIXME: The following are here for unit testing purposes. Consider
+ // changing the unit tests instead.
+
+ // Generate the META for charset declaration.
+ WEBKIT_API static WebString generateMetaCharsetDeclaration(const WebString& charset);
+ // Generate the MOTW declaration.
+ WEBKIT_API static WebString generateMarkOfTheWebDeclaration(const WebURL& url);
+ // Generate the default base tag declaration.
+ WEBKIT_API static WebString generateBaseTagDeclaration(const WebString& baseTarget);
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebPageSerializerClient.h b/WebKit/chromium/public/WebPageSerializerClient.h
new file mode 100644
index 0000000..c30ddbc
--- /dev/null
+++ b/WebKit/chromium/public/WebPageSerializerClient.h
@@ -0,0 +1,75 @@
+/*
+ * 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 WebPageSerializerClient_h
+#define WebPageSerializerClient_h
+
+namespace WebKit {
+class WebCString;
+class WebURL;
+
+// This class is used for providing sink interface that can be used to receive
+// the individual chunks of data to be saved.
+class WebPageSerializerClient {
+public:
+ // This enum indicates This sink interface can receive the individual chunks
+ // of serialized data to be saved, so we use values of following enum
+ // definition to indicate the serialization status of serializing all html
+ // content. If current frame is not complete serialized, call
+ // didSerializeDataForFrame with URL of current frame, data, data length and
+ // flag CurrentFrameIsNotFinished.
+ // If current frame is complete serialized, call didSerializeDataForFrame
+ // with URL of current frame, data, data length and flag
+ // CurrentFrameIsFinished.
+ // If all frames of page are complete serialized, call
+ // didSerializeDataForFrame with empty URL, empty data, 0 and flag
+ // AllFramesAreFinished.
+ enum PageSerializationStatus {
+ CurrentFrameIsNotFinished,
+ CurrentFrameIsFinished,
+ AllFramesAreFinished,
+ };
+
+ // Receive the individual chunks of serialized and encoded data to be saved.
+ // The parameter frameURL specifies what frame the data belongs. The
+ // parameter data contains the available data for saving. The parameter
+ // status indicates the status of data serialization.
+ virtual void didSerializeDataForFrame(const WebURL& frameURL,
+ const WebCString& data,
+ PageSerializationStatus status) = 0;
+ WebPageSerializerClient() { }
+
+protected:
+ virtual ~WebPageSerializerClient() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebRuntimeFeatures.h b/WebKit/chromium/public/WebRuntimeFeatures.h
index eb6b2da..04f88c9 100644
--- a/WebKit/chromium/public/WebRuntimeFeatures.h
+++ b/WebKit/chromium/public/WebRuntimeFeatures.h
@@ -62,6 +62,12 @@ public:
WEBKIT_API static void enableApplicationCache(bool);
WEBKIT_API static bool isApplicationCacheEnabled();
+ WEBKIT_API static void enableGeolocation(bool);
+ WEBKIT_API static bool isGeolocationEnabled();
+
+ WEBKIT_API static void enableIndexedDatabase(bool);
+ WEBKIT_API static bool isIndexedDatabaseEnabled();
+
private:
WebRuntimeFeatures();
};
diff --git a/WebKit/chromium/public/WebSecurityOrigin.h b/WebKit/chromium/public/WebSecurityOrigin.h
index d04fbc6..7b04aac 100644
--- a/WebKit/chromium/public/WebSecurityOrigin.h
+++ b/WebKit/chromium/public/WebSecurityOrigin.h
@@ -55,6 +55,8 @@ public:
return *this;
}
+ WEBKIT_API static WebSecurityOrigin* createFromDatabaseIdentifier(const WebString& databaseIdentifier);
+
WEBKIT_API void reset();
WEBKIT_API void assign(const WebSecurityOrigin&);
diff --git a/WebKit/chromium/public/WebSecurityPolicy.h b/WebKit/chromium/public/WebSecurityPolicy.h
index 47dfe87..8e1ee52 100644
--- a/WebKit/chromium/public/WebSecurityPolicy.h
+++ b/WebKit/chromium/public/WebSecurityPolicy.h
@@ -55,6 +55,10 @@ public:
const WebURL& sourceOrigin, const WebString& destinationProtocol,
const WebString& destinationHost, bool allowDestinationSubdomains);
WEBKIT_API static void resetOriginAccessWhiteLists();
+
+ // Returns whether the url should be allowed to see the referrer
+ // based on their respective protocols.
+ WEBKIT_API static bool shouldHideReferrer(const WebURL& url, const WebString& referrer);
private:
WebSecurityPolicy();
diff --git a/WebKit/chromium/public/WebSettings.h b/WebKit/chromium/public/WebSettings.h
index da36806..d75ccde 100644
--- a/WebKit/chromium/public/WebSettings.h
+++ b/WebKit/chromium/public/WebSettings.h
@@ -58,6 +58,7 @@ public:
virtual void setWebSecurityEnabled(bool) = 0;
virtual void setJavaScriptCanOpenWindowsAutomatically(bool) = 0;
virtual void setLoadsImagesAutomatically(bool) = 0;
+ virtual void setImagesEnabled(bool) = 0;
virtual void setPluginsEnabled(bool) = 0;
virtual void setDOMPasteAllowed(bool) = 0;
virtual void setDeveloperExtrasEnabled(bool) = 0;
diff --git a/WebKit/chromium/public/WebStorageArea.h b/WebKit/chromium/public/WebStorageArea.h
index 71dc7a5..302e10c 100644
--- a/WebKit/chromium/public/WebStorageArea.h
+++ b/WebKit/chromium/public/WebStorageArea.h
@@ -32,10 +32,10 @@
#define WebStorageArea_h
#include "WebCommon.h"
+#include "WebString.h"
namespace WebKit {
-class WebString;
class WebURL;
// In WebCore, there's one distinct StorageArea per origin per StorageNamespace. This
@@ -60,14 +60,41 @@ public:
// Set the value that corresponds to a specific key. QuotaException is set if we've
// the StorageArea would have exceeded its quota. The value is NOT set when there's
// an exception. url is the url that should be used if a storage event fires.
- virtual void setItem(const WebString& key, const WebString& value, const WebURL& url, bool& quotaException) = 0;
+ // FIXME: The following is a hack to keep Chromium compiling until the other half is landed. Remove soon.
+ virtual void setItem(const WebString& key, const WebString& newValue, const WebURL& url, bool& quotaException) // Deprecated.
+ {
+ WebString oldValue;
+ setItem(key, newValue, url, quotaException, oldValue);
+ }
+ virtual void setItem(const WebString& key, const WebString& newValue, const WebURL& url, bool& quotaException, WebString& oldValue)
+ {
+ setItem(key, newValue, url, quotaException);
+ }
// Remove the value associated with a particular key. url is the url that should be used
// if a storage event fires.
- virtual void removeItem(const WebString& key, const WebURL& url) = 0;
+ // FIXME: The following is a hack to keep Chromium compiling until the other half is landed. Remove soon.
+ virtual void removeItem(const WebString& key, const WebURL& url) // Deprecated.
+ {
+ WebString oldValue;
+ removeItem(key, url, oldValue);
+ }
+ virtual void removeItem(const WebString& key, const WebURL& url, WebString& oldValue)
+ {
+ removeItem(key, url);
+ }
// Clear all key/value pairs. url is the url that should be used if a storage event fires.
- virtual void clear(const WebURL& url) = 0;
+ // FIXME: The following is a hack to keep Chromium compiling until the other half is landed. Remove soon.
+ virtual void clear(const WebURL& url) // Deprecated.
+ {
+ bool somethingCleared;
+ clear(url, somethingCleared);
+ }
+ virtual void clear(const WebURL& url, bool& somethingCleared)
+ {
+ clear(url);
+ }
};
} // namespace WebKit
diff --git a/WebKit/chromium/public/WebString.h b/WebKit/chromium/public/WebString.h
index d9b66b2..d2cf9ea 100644
--- a/WebKit/chromium/public/WebString.h
+++ b/WebKit/chromium/public/WebString.h
@@ -76,6 +76,8 @@ public:
WEBKIT_API void assign(const WebString&);
WEBKIT_API void assign(const WebUChar* data, size_t len);
+ WEBKIT_API bool equals(const WebString& s) const;
+
WEBKIT_API size_t length() const;
WEBKIT_API const WebUChar* data() const;
@@ -87,6 +89,18 @@ public:
WEBKIT_API static WebString fromUTF8(const char* data, size_t length);
WEBKIT_API static WebString fromUTF8(const char* data);
+ template <int N> WebString(const char (&data)[N])
+ : m_private(0)
+ {
+ assign(fromUTF8(data, N - 1));
+ }
+
+ template <int N> WebString& operator=(const char (&data)[N])
+ {
+ assign(fromUTF8(data, N - 1));
+ return *this;
+ }
+
#if WEBKIT_IMPLEMENTATION
WebString(const WebCore::String&);
WebString& operator=(const WebCore::String&);
@@ -96,6 +110,7 @@ public:
WebString& operator=(const WebCore::AtomicString&);
operator WebCore::AtomicString() const;
#else
+
WebString(const string16& s) : m_private(0)
{
assign(s.data(), s.length());
@@ -150,6 +165,16 @@ private:
WebStringPrivate* m_private;
};
+inline bool operator==(const WebString& a, const WebString& b)
+{
+ return a.equals(b);
+}
+
+inline bool operator!=(const WebString& a, const WebString& b)
+{
+ return !(a == b);
+}
+
} // namespace WebKit
#endif
diff --git a/WebKit/chromium/public/WebURLResponse.h b/WebKit/chromium/public/WebURLResponse.h
index cdac83c..1dac069 100644
--- a/WebKit/chromium/public/WebURLResponse.h
+++ b/WebKit/chromium/public/WebURLResponse.h
@@ -118,6 +118,11 @@ public:
const WebCore::ResourceResponse& toResourceResponse() const;
#endif
+ // Flag whether this request was loaded via the SPDY protocol or not.
+ // SPDY is an experimental web protocol, see http://dev.chromium.org/spdy
+ WEBKIT_API bool wasFetchedViaSPDY() const;
+ WEBKIT_API void setWasFetchedViaSPDY(bool);
+
protected:
void assign(WebURLResponsePrivate*);
diff --git a/WebKit/chromium/public/WebVector.h b/WebKit/chromium/public/WebVector.h
index d1f99b4..0520895 100644
--- a/WebKit/chromium/public/WebVector.h
+++ b/WebKit/chromium/public/WebVector.h
@@ -84,6 +84,13 @@ public:
initializeFrom(other.size() ? &other[0] : 0, other.size());
}
+ WebVector& operator=(const WebVector& other)
+ {
+ if (this != &other)
+ assign(other);
+ return *this;
+ }
+
template <typename C>
WebVector<T>& operator=(const C& other)
{
diff --git a/WebKit/chromium/public/WebView.h b/WebKit/chromium/public/WebView.h
index 5e1f15d..aba556c 100644
--- a/WebKit/chromium/public/WebView.h
+++ b/WebKit/chromium/public/WebView.h
@@ -251,11 +251,25 @@ public:
WEBKIT_API static void resetVisitedLinkState();
- // Scrollbar colors ----------------------------------------------------
+ // Custom colors -------------------------------------------------------
+
virtual void setScrollbarColors(unsigned inactiveColor,
unsigned activeColor,
unsigned trackColor) = 0;
+ virtual void setSelectionColors(unsigned activeBackgroundColor,
+ unsigned activeForegroundColor,
+ unsigned inactiveBackgroundColor,
+ unsigned inactiveForegroundColor) = 0;
+
+
+ // Modal dialog support ------------------------------------------------
+
+ // Call these methods before and after running a nested, modal event loop
+ // to suspend script callbacks and resource loads.
+ WEBKIT_API static void willEnterModalLoop();
+ WEBKIT_API static void didExitModalLoop();
+
protected:
~WebView() {}
};
diff --git a/WebKit/chromium/public/WebViewClient.h b/WebKit/chromium/public/WebViewClient.h
index 2e2f953..964d382 100644
--- a/WebKit/chromium/public/WebViewClient.h
+++ b/WebKit/chromium/public/WebViewClient.h
@@ -34,6 +34,7 @@
#include "WebDragOperation.h"
#include "WebEditingAction.h"
#include "WebFileChooserCompletion.h"
+#include "WebFileChooserParams.h"
#include "WebString.h"
#include "WebTextAffinity.h"
#include "WebTextDirection.h"
@@ -48,6 +49,7 @@ class WebFrame;
class WebNode;
class WebNotificationPresenter;
class WebRange;
+class WebStorageNamespace;
class WebURL;
class WebView;
class WebWidget;
@@ -63,7 +65,9 @@ class WebViewClient : virtual public WebWidgetClient {
public:
// Factory methods -----------------------------------------------------
- // Create a new related WebView.
+ // Create a new related WebView. This method must clone its session storage
+ // so any subsequent calls to createSessionStorageNamespace conform to the
+ // WebStorage specification.
virtual WebView* createView(WebFrame* creator) { return 0; }
// Create a new WebPopupMenu. In the second form, the client is
@@ -71,6 +75,8 @@ public:
virtual WebWidget* createPopupMenu(bool activatable) { return 0; }
virtual WebWidget* createPopupMenu(const WebPopupMenuInfo&) { return 0; }
+ // Create a session storage namespace object associated with this WebView.
+ virtual WebStorageNamespace* createSessionStorageNamespace() { return 0; }
// Misc ----------------------------------------------------------------
@@ -161,9 +167,8 @@ public:
// dialog is closed, it should call the WebFileChooserCompletion to
// pass the results of the dialog. Returns false if
// WebFileChooseCompletion will never be called.
- virtual bool runFileChooser(
- bool multiSelect, const WebString& title,
- const WebString& initialValue, WebFileChooserCompletion*) { return false; }
+ virtual bool runFileChooser(const WebFileChooserParams&,
+ WebFileChooserCompletion*) { return false; }
// Displays a modal alert dialog containing the given message. Returns
// once the user dismisses the dialog.