[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Wed Apr 7 23:27:26 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 7c6268b9a106eb3124763f2b3a524d683ea387e2
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Nov 9 21:06:44 2009 +0000

    2009-11-09  Yaar Schnitman  <yaar at chromium.org>
    
            Reviewed by Dimitri Glazkov.
    
            Upstreaming the Chromium WebKit API: WebVector to WebWorkerClient
    
            https://bugs.webkit.org/show_bug.cgi?id=28394
    
            * public/WebVector.h: Added.
            (WebKit::WebVector::~WebVector):
            (WebKit::WebVector::WebVector):
            (WebKit::WebVector::operator=):
            (WebKit::WebVector::assign):
            (WebKit::WebVector::size):
            (WebKit::WebVector::isEmpty):
            (WebKit::WebVector::operator[]):
            (WebKit::WebVector::data):
            (WebKit::WebVector::swap):
            (WebKit::WebVector::initialize):
            (WebKit::WebVector::initializeFrom):
            (WebKit::WebVector::destroy):
            * public/WebView.h: Added.
            (WebKit::WebView::~WebView):
            * public/WebViewClient.h: Added.
            (WebKit::WebViewClient::createView):
            (WebKit::WebViewClient::createPopupMenu):
            (WebKit::WebViewClient::didAddMessageToConsole):
            (WebKit::WebViewClient::printPage):
            (WebKit::WebViewClient::notificationPresenter):
            (WebKit::WebViewClient::didStartLoading):
            (WebKit::WebViewClient::didStopLoading):
            (WebKit::WebViewClient::shouldBeginEditing):
            (WebKit::WebViewClient::shouldEndEditing):
            (WebKit::WebViewClient::shouldInsertNode):
            (WebKit::WebViewClient::shouldInsertText):
            (WebKit::WebViewClient::shouldChangeSelectedRange):
            (WebKit::WebViewClient::shouldDeleteRange):
            (WebKit::WebViewClient::shouldApplyStyle):
            (WebKit::WebViewClient::isSmartInsertDeleteEnabled):
            (WebKit::WebViewClient::isSelectTrailingWhitespaceEnabled):
            (WebKit::WebViewClient::setInputMethodEnabled):
            (WebKit::WebViewClient::didBeginEditing):
            (WebKit::WebViewClient::didChangeSelection):
            (WebKit::WebViewClient::didChangeContents):
            (WebKit::WebViewClient::didExecuteCommand):
            (WebKit::WebViewClient::didEndEditing):
            (WebKit::WebViewClient::handleCurrentKeyboardEvent):
            (WebKit::WebViewClient::spellCheck):
            (WebKit::WebViewClient::autoCorrectWord):
            (WebKit::WebViewClient::showSpellingUI):
            (WebKit::WebViewClient::isShowingSpellingUI):
            (WebKit::WebViewClient::updateSpellingUIWithMisspelledWord):
            (WebKit::WebViewClient::runFileChooser):
            (WebKit::WebViewClient::runModalAlertDialog):
            (WebKit::WebViewClient::runModalConfirmDialog):
            (WebKit::WebViewClient::runModalPromptDialog):
            (WebKit::WebViewClient::runModalBeforeUnloadDialog):
            (WebKit::WebViewClient::setStatusText):
            (WebKit::WebViewClient::setMouseOverURL):
            (WebKit::WebViewClient::setKeyboardFocusURL):
            (WebKit::WebViewClient::setToolTipText):
            (WebKit::WebViewClient::showContextMenu):
            (WebKit::WebViewClient::startDragging):
            (WebKit::WebViewClient::acceptsLoadDrops):
            (WebKit::WebViewClient::focusNext):
            (WebKit::WebViewClient::focusPrevious):
            (WebKit::WebViewClient::navigateBackForwardSoon):
            (WebKit::WebViewClient::historyBackListCount):
            (WebKit::WebViewClient::historyForwardListCount):
            (WebKit::WebViewClient::didAddHistoryItem):
            (WebKit::WebViewClient::focusAccessibilityObject):
            (WebKit::WebViewClient::didUpdateInspectorSettings):
            (WebKit::WebViewClient::queryAutofillSuggestions):
            (WebKit::WebViewClient::removeAutofillSuggestions):
            (WebKit::WebViewClient::~WebViewClient):
            * public/WebWidget.h: Added.
            (WebKit::WebWidget::~WebWidget):
            * public/WebWidgetClient.h: Added.
            (WebKit::WebWidgetClient::didInvalidateRect):
            (WebKit::WebWidgetClient::didScrollRect):
            (WebKit::WebWidgetClient::didFocus):
            (WebKit::WebWidgetClient::didBlur):
            (WebKit::WebWidgetClient::didChangeCursor):
            (WebKit::WebWidgetClient::closeWidgetSoon):
            (WebKit::WebWidgetClient::show):
            (WebKit::WebWidgetClient::runModal):
            (WebKit::WebWidgetClient::windowRect):
            (WebKit::WebWidgetClient::setWindowRect):
            (WebKit::WebWidgetClient::windowResizerRect):
            (WebKit::WebWidgetClient::rootWindowRect):
            (WebKit::WebWidgetClient::screenInfo):
            (WebKit::WebWidgetClient::~WebWidgetClient):
            * public/WebWorker.h: Added.
            (WebKit::WebWorker::~WebWorker):
            * public/WebWorkerClient.h: Added.
            (WebKit::WebWorkerClient::~WebWorkerClient):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50681 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 3276179..ed56555 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,100 @@
+2009-11-09  Yaar Schnitman  <yaar at chromium.org>
+
+        Reviewed by Dimitri Glazkov.
+
+        Upstreaming the Chromium WebKit API: WebVector to WebWorkerClient
+
+        https://bugs.webkit.org/show_bug.cgi?id=28394
+
+        * public/WebVector.h: Added.
+        (WebKit::WebVector::~WebVector):
+        (WebKit::WebVector::WebVector):
+        (WebKit::WebVector::operator=):
+        (WebKit::WebVector::assign):
+        (WebKit::WebVector::size):
+        (WebKit::WebVector::isEmpty):
+        (WebKit::WebVector::operator[]):
+        (WebKit::WebVector::data):
+        (WebKit::WebVector::swap):
+        (WebKit::WebVector::initialize):
+        (WebKit::WebVector::initializeFrom):
+        (WebKit::WebVector::destroy):
+        * public/WebView.h: Added.
+        (WebKit::WebView::~WebView):
+        * public/WebViewClient.h: Added.
+        (WebKit::WebViewClient::createView):
+        (WebKit::WebViewClient::createPopupMenu):
+        (WebKit::WebViewClient::didAddMessageToConsole):
+        (WebKit::WebViewClient::printPage):
+        (WebKit::WebViewClient::notificationPresenter):
+        (WebKit::WebViewClient::didStartLoading):
+        (WebKit::WebViewClient::didStopLoading):
+        (WebKit::WebViewClient::shouldBeginEditing):
+        (WebKit::WebViewClient::shouldEndEditing):
+        (WebKit::WebViewClient::shouldInsertNode):
+        (WebKit::WebViewClient::shouldInsertText):
+        (WebKit::WebViewClient::shouldChangeSelectedRange):
+        (WebKit::WebViewClient::shouldDeleteRange):
+        (WebKit::WebViewClient::shouldApplyStyle):
+        (WebKit::WebViewClient::isSmartInsertDeleteEnabled):
+        (WebKit::WebViewClient::isSelectTrailingWhitespaceEnabled):
+        (WebKit::WebViewClient::setInputMethodEnabled):
+        (WebKit::WebViewClient::didBeginEditing):
+        (WebKit::WebViewClient::didChangeSelection):
+        (WebKit::WebViewClient::didChangeContents):
+        (WebKit::WebViewClient::didExecuteCommand):
+        (WebKit::WebViewClient::didEndEditing):
+        (WebKit::WebViewClient::handleCurrentKeyboardEvent):
+        (WebKit::WebViewClient::spellCheck):
+        (WebKit::WebViewClient::autoCorrectWord):
+        (WebKit::WebViewClient::showSpellingUI):
+        (WebKit::WebViewClient::isShowingSpellingUI):
+        (WebKit::WebViewClient::updateSpellingUIWithMisspelledWord):
+        (WebKit::WebViewClient::runFileChooser):
+        (WebKit::WebViewClient::runModalAlertDialog):
+        (WebKit::WebViewClient::runModalConfirmDialog):
+        (WebKit::WebViewClient::runModalPromptDialog):
+        (WebKit::WebViewClient::runModalBeforeUnloadDialog):
+        (WebKit::WebViewClient::setStatusText):
+        (WebKit::WebViewClient::setMouseOverURL):
+        (WebKit::WebViewClient::setKeyboardFocusURL):
+        (WebKit::WebViewClient::setToolTipText):
+        (WebKit::WebViewClient::showContextMenu):
+        (WebKit::WebViewClient::startDragging):
+        (WebKit::WebViewClient::acceptsLoadDrops):
+        (WebKit::WebViewClient::focusNext):
+        (WebKit::WebViewClient::focusPrevious):
+        (WebKit::WebViewClient::navigateBackForwardSoon):
+        (WebKit::WebViewClient::historyBackListCount):
+        (WebKit::WebViewClient::historyForwardListCount):
+        (WebKit::WebViewClient::didAddHistoryItem):
+        (WebKit::WebViewClient::focusAccessibilityObject):
+        (WebKit::WebViewClient::didUpdateInspectorSettings):
+        (WebKit::WebViewClient::queryAutofillSuggestions):
+        (WebKit::WebViewClient::removeAutofillSuggestions):
+        (WebKit::WebViewClient::~WebViewClient):
+        * public/WebWidget.h: Added.
+        (WebKit::WebWidget::~WebWidget):
+        * public/WebWidgetClient.h: Added.
+        (WebKit::WebWidgetClient::didInvalidateRect):
+        (WebKit::WebWidgetClient::didScrollRect):
+        (WebKit::WebWidgetClient::didFocus):
+        (WebKit::WebWidgetClient::didBlur):
+        (WebKit::WebWidgetClient::didChangeCursor):
+        (WebKit::WebWidgetClient::closeWidgetSoon):
+        (WebKit::WebWidgetClient::show):
+        (WebKit::WebWidgetClient::runModal):
+        (WebKit::WebWidgetClient::windowRect):
+        (WebKit::WebWidgetClient::setWindowRect):
+        (WebKit::WebWidgetClient::windowResizerRect):
+        (WebKit::WebWidgetClient::rootWindowRect):
+        (WebKit::WebWidgetClient::screenInfo):
+        (WebKit::WebWidgetClient::~WebWidgetClient):
+        * public/WebWorker.h: Added.
+        (WebKit::WebWorker::~WebWorker):
+        * public/WebWorkerClient.h: Added.
+        (WebKit::WebWorkerClient::~WebWorkerClient):
+
 2009-11-09  Nate Chapin  <japhet at chromium.org>
 
         Reviewed by Dimitri Glazkov.
diff --git a/WebKit/chromium/public/WebVector.h b/WebKit/chromium/public/WebVector.h
new file mode 100644
index 0000000..d1f99b4
--- /dev/null
+++ b/WebKit/chromium/public/WebVector.h
@@ -0,0 +1,162 @@
+/*
+ * 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 WebVector_h
+#define WebVector_h
+
+#include "WebCommon.h"
+
+#include <algorithm>
+
+namespace WebKit {
+
+// A simple vector class.
+//
+// Sample usage:
+//
+//   void Foo(WebVector<int>& result)
+//   {
+//       WebVector<int> data(10);
+//       for (size_t i = 0; i < data.size(); ++i)
+//           data[i] = ...
+//       result.swap(data);
+//   }
+//
+// It is also possible to assign from other types of random access
+// containers:
+//
+//   void Foo(const std::vector<std::string>& input)
+//   {
+//       WebVector<WebCString> cstrings = input;
+//       ...
+//   }
+//
+template <typename T>
+class WebVector {
+public:
+    typedef T ValueType;
+
+    ~WebVector()
+    {
+        destroy();
+    }
+
+    explicit WebVector(size_t size = 0)
+    {
+        initialize(size);
+    }
+
+    WebVector(const WebVector<T>& other)
+    {
+        initializeFrom(other.m_ptr, other.m_size);
+    }
+
+    template <typename C>
+    WebVector(const C& other)
+    {
+        initializeFrom(other.size() ? &other[0] : 0, other.size());
+    }
+
+    template <typename C>
+    WebVector<T>& operator=(const C& other)
+    {
+        if (this != reinterpret_cast<const WebVector<T>*>(&other))
+            assign(other);
+        return *this;
+    }
+
+    template <typename C>
+    void assign(const C& other)
+    {
+        assign(other.size() ? &other[0] : 0, other.size());
+    }
+
+    template <typename U>
+    void assign(const U* values, size_t size)
+    {
+        destroy();
+        initializeFrom(values, size);
+    }
+
+    size_t size() const { return m_size; }
+    bool isEmpty() const { return !m_size; }
+
+    T& operator[](size_t i) { return m_ptr[i]; }
+    const T& operator[](size_t i) const { return m_ptr[i]; }
+
+    T* data() { return m_ptr; }
+    const T* data() const { return m_ptr; }
+
+    void swap(WebVector<T>& other)
+    {
+        std::swap(m_ptr, other.m_ptr);
+        std::swap(m_size, other.m_size);
+    }
+
+private:
+    void initialize(size_t size)
+    {
+        m_size = size;
+        if (!m_size)
+            m_ptr = 0;
+        else {
+            m_ptr = static_cast<T*>(::operator new(sizeof(T) * m_size));
+            for (size_t i = 0; i < m_size; ++i)
+                new (&m_ptr[i]) T();
+        }
+    }
+
+    template <typename U>
+    void initializeFrom(const U* values, size_t size)
+    {
+        m_size = size;
+        if (!m_size)
+            m_ptr = 0;
+        else {
+            m_ptr = static_cast<T*>(::operator new(sizeof(T) * m_size));
+            for (size_t i = 0; i < m_size; ++i)
+                new (&m_ptr[i]) T(values[i]);
+        }
+    }
+
+    void destroy()
+    {
+        for (size_t i = 0; i < m_size; ++i)
+            m_ptr[i].~T();
+        ::operator delete(m_ptr);
+    }
+
+    T* m_ptr;
+    size_t m_size;
+};
+
+}  // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebView.h b/WebKit/chromium/public/WebView.h
new file mode 100644
index 0000000..2ad1364
--- /dev/null
+++ b/WebKit/chromium/public/WebView.h
@@ -0,0 +1,251 @@
+/*
+ * 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 WebView_h
+#define WebView_h
+
+#include "WebDragOperation.h"
+#include "WebWidget.h"
+
+namespace WebKit {
+
+class WebAccessibilityObject;
+class WebDevToolsAgent;
+class WebDragData;
+class WebFrame;
+class WebFrameClient;
+class WebNode;
+class WebSettings;
+class WebString;
+class WebViewClient;
+struct WebMediaPlayerAction;
+struct WebPoint;
+template <typename T> class WebVector;
+
+class WebView : public WebWidget {
+public:
+    // Initialization ------------------------------------------------------
+
+    // Creates a WebView that is NOT yet initialized.  You will need to
+    // call initializeMainFrame to finish the initialization.  It is valid
+    // to pass a null WebViewClient pointer.
+    WEBKIT_API static WebView* create(WebViewClient*);
+
+    // After creating a WebView, you should immediately call this method.
+    // You can optionally modify the settings before calling this method.
+    // The WebFrameClient will receive events for the main frame and any
+    // child frames.  It is valid to pass a null WebFrameClient pointer.
+    virtual void initializeMainFrame(WebFrameClient*) = 0;
+
+
+    // Options -------------------------------------------------------------
+
+    // The returned pointer is valid for the lifetime of the WebView.
+    virtual WebSettings* settings() = 0;
+
+    // Corresponds to the encoding of the main frame.  Setting the page
+    // encoding may cause the main frame to reload.
+    virtual WebString pageEncoding() const = 0;
+    virtual void setPageEncoding(const WebString&) = 0;
+
+    // Makes the WebView transparent.  This is useful if you want to have
+    // some custom background rendered behind it.
+    virtual bool isTransparent() const = 0;
+    virtual void setIsTransparent(bool) = 0;
+
+    // Controls whether pressing Tab key advances focus to links.
+    virtual bool tabsToLinks() const = 0;
+    virtual void setTabsToLinks(bool) = 0;
+
+    // Method that controls whether pressing Tab key cycles through page
+    // elements or inserts a '\t' char in the focused text area.
+    virtual bool tabKeyCyclesThroughElements() const = 0;
+    virtual void setTabKeyCyclesThroughElements(bool) = 0;
+
+    // Controls the WebView's active state, which may affect the rendering
+    // of elements on the page (i.e., tinting of input elements).
+    virtual bool isActive() const = 0;
+    virtual void setIsActive(bool) = 0;
+
+
+    // Closing -------------------------------------------------------------
+
+    // Runs beforeunload handlers for the current page, returning false if
+    // any handler suppressed unloading.
+    virtual bool dispatchBeforeUnloadEvent() = 0;
+
+    // Runs unload handlers for the current page.
+    virtual void dispatchUnloadEvent() = 0;
+
+
+    // Frames --------------------------------------------------------------
+
+    virtual WebFrame* mainFrame() = 0;
+
+    // Returns the frame identified by the given name.  This method
+    // supports pseudo-names like _self, _top, and _blank.  It traverses
+    // the entire frame tree containing this tree looking for a frame that
+    // matches the given name.  If the optional relativeToFrame parameter
+    // is specified, then the search begins with the given frame and its
+    // children.
+    virtual WebFrame* findFrameByName(
+        const WebString& name, WebFrame* relativeToFrame = 0) = 0;
+
+
+    // Focus ---------------------------------------------------------------
+
+    virtual WebFrame* focusedFrame() = 0;
+    virtual void setFocusedFrame(WebFrame*) = 0;
+
+    // Focus the first (last if reverse is true) focusable node.
+    virtual void setInitialFocus(bool reverse) = 0;
+
+    // Clears the focused node (and selection if a text field is focused)
+    // to ensure that a text field on the page is not eating keystrokes we
+    // send it.
+    virtual void clearFocusedNode() = 0;
+
+
+    // Zoom ----------------------------------------------------------------
+
+    // Change the text zoom level.  It will make the zoom level 20% larger
+    // or smaller.  If textOnly is set, the text size will be changed.
+    // When unset, the entire page's zoom factor will be changed.
+    //
+    // You can only have either text zoom or full page zoom at one time.
+    // Changing the mode will change things in weird ways.  Generally the
+    // app should only support text zoom or full page zoom, and not both.
+    //
+    // zoomDefault will reset both full page and text zoom.
+    virtual void zoomIn(bool textOnly) = 0;
+    virtual void zoomOut(bool textOnly) = 0;
+    virtual void zoomDefault() = 0;
+
+
+    // Media ---------------------------------------------------------------
+
+    // Performs the specified action on the node at the given location.
+    virtual void performMediaPlayerAction(
+        const WebMediaPlayerAction&, const WebPoint& location) = 0;
+
+
+    // Data exchange -------------------------------------------------------
+
+    // Copy to the clipboard the image located at a particular point in the
+    // WebView (if there is such an image)
+    virtual void copyImageAt(const WebPoint&) = 0;
+
+    // Notifies the WebView that a drag has terminated.
+    virtual void dragSourceEndedAt(
+        const WebPoint& clientPoint, const WebPoint& screenPoint,
+        WebDragOperation operation) = 0;
+
+    // Notifies the WebView that a drag and drop operation is in progress, with
+    // dropable items over the view.
+    virtual void dragSourceMovedTo(
+        const WebPoint& clientPoint, const WebPoint& screenPoint) = 0;
+
+    // Notfies the WebView that the system drag and drop operation has ended.
+    virtual void dragSourceSystemDragEnded() = 0;
+
+    // Callback methods when a drag-and-drop operation is trying to drop
+    // something on the WebView.
+    virtual WebDragOperation dragTargetDragEnter(
+        const WebDragData&, int identity,
+        const WebPoint& clientPoint, const WebPoint& screenPoint,
+        WebDragOperationsMask operationsAllowed) = 0;
+    virtual WebDragOperation dragTargetDragOver(
+        const WebPoint& clientPoint, const WebPoint& screenPoint,
+        WebDragOperationsMask operationsAllowed) = 0;
+    virtual void dragTargetDragLeave() = 0;
+    virtual void dragTargetDrop(
+        const WebPoint& clientPoint, const WebPoint& screenPoint) = 0;
+
+    virtual int dragIdentity() = 0;
+
+    // Helper method for drag and drop target operations: override the
+    // default drop effect with either a "copy" (accept true) or "none"
+    // (accept false) effect.  Return true on success.
+    virtual bool setDropEffect(bool accept) = 0;
+
+
+    // Developer tools -----------------------------------------------------
+
+    // Inspect a particular point in the WebView.  (x = -1 || y = -1) is a
+    // special case, meaning inspect the current page and not a specific
+    // point.
+    virtual void inspectElementAt(const WebPoint&) = 0;
+
+    // Settings used by the inspector.
+    virtual WebString inspectorSettings() const = 0;
+    virtual void setInspectorSettings(const WebString&) = 0;
+
+    // The embedder may optionally engage a WebDevToolsAgent.  This may only
+    // be set once per WebView.
+    virtual WebDevToolsAgent* devToolsAgent() = 0;
+    virtual void setDevToolsAgent(WebDevToolsAgent*) = 0;
+
+
+    // Accessibility -------------------------------------------------------
+
+    // Returns the accessibility object for this view.
+    virtual WebAccessibilityObject accessibilityObject() = 0;
+
+
+    // Autofill ------------------------------------------------------------
+
+    // Notifies the WebView that autofill suggestions are available for a node.
+    virtual void applyAutofillSuggestions(
+        const WebNode&,
+        const WebVector<WebString>& suggestions,
+        int defaultSuggestionIndex) = 0;
+
+    // Hides the autofill popup if any are showing.
+    virtual void hideAutofillPopup() = 0;
+
+
+    // Visited link state --------------------------------------------------
+
+    // Tells all WebView instances to update the visited link state for the
+    // specified hash.
+    WEBKIT_API static void updateVisitedLinkState(unsigned long long hash);
+
+    // Tells all WebView instances to update the visited state for all
+    // their links.
+    WEBKIT_API static void resetVisitedLinkState();
+
+
+protected:
+    ~WebView() {}
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebViewClient.h b/WebKit/chromium/public/WebViewClient.h
new file mode 100644
index 0000000..2e2f953
--- /dev/null
+++ b/WebKit/chromium/public/WebViewClient.h
@@ -0,0 +1,278 @@
+/*
+ * 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 WebViewClient_h
+#define WebViewClient_h
+
+#include "WebDragOperation.h"
+#include "WebEditingAction.h"
+#include "WebFileChooserCompletion.h"
+#include "WebString.h"
+#include "WebTextAffinity.h"
+#include "WebTextDirection.h"
+#include "WebWidgetClient.h"
+
+namespace WebKit {
+
+class WebAccessibilityObject;
+class WebDragData;
+class WebFileChooserCompletion;
+class WebFrame;
+class WebNode;
+class WebNotificationPresenter;
+class WebRange;
+class WebURL;
+class WebView;
+class WebWidget;
+struct WebConsoleMessage;
+struct WebContextMenuData;
+struct WebPoint;
+struct WebPopupMenuInfo;
+
+// Since a WebView is a WebWidget, a WebViewClient is a WebWidgetClient.
+// Virtual inheritance allows an implementation of WebWidgetClient to be
+// easily reused as part of an implementation of WebViewClient.
+class WebViewClient : virtual public WebWidgetClient {
+public:
+    // Factory methods -----------------------------------------------------
+
+    // Create a new related WebView.
+    virtual WebView* createView(WebFrame* creator) { return 0; }
+
+    // Create a new WebPopupMenu.  In the second form, the client is
+    // responsible for rendering the contents of the popup menu.
+    virtual WebWidget* createPopupMenu(bool activatable) { return 0; }
+    virtual WebWidget* createPopupMenu(const WebPopupMenuInfo&) { return 0; }
+
+
+    // Misc ----------------------------------------------------------------
+
+    // A new message was added to the console.
+    virtual void didAddMessageToConsole(
+        const WebConsoleMessage&, const WebString& sourceName, unsigned sourceLine) { }
+
+    // Called when script in the page calls window.print().  If frame is
+    // non-null, then it selects a particular frame, including its
+    // children, to print.  Otherwise, the main frame and its children
+    // should be printed.
+    virtual void printPage(WebFrame*) { }
+
+    // Called to retrieve the provider of desktop notifications.
+    virtual WebNotificationPresenter* notificationPresenter() { return 0; }
+
+
+    // Navigational --------------------------------------------------------
+
+    // These notifications bracket any loading that occurs in the WebView.
+    virtual void didStartLoading() { }
+    virtual void didStopLoading() { }
+
+
+    // Editing -------------------------------------------------------------
+
+    // These methods allow the client to intercept and overrule editing
+    // operations.
+    virtual bool shouldBeginEditing(const WebRange&) { return true; }
+    virtual bool shouldEndEditing(const WebRange&) { return true; }
+    virtual bool shouldInsertNode(
+        const WebNode&, const WebRange&, WebEditingAction) { return true; }
+    virtual bool shouldInsertText(
+        const WebString&, const WebRange&, WebEditingAction) { return true; }
+    virtual bool shouldChangeSelectedRange(
+        const WebRange& from, const WebRange& to, WebTextAffinity,
+        bool stillSelecting) { return true; }
+    virtual bool shouldDeleteRange(const WebRange&) { return true; }
+    virtual bool shouldApplyStyle(const WebString& style, const WebRange&) { return true; }
+
+    virtual bool isSmartInsertDeleteEnabled() { return true; }
+    virtual bool isSelectTrailingWhitespaceEnabled() { return true; }
+    virtual void setInputMethodEnabled(bool enabled) { }
+
+    virtual void didBeginEditing() { }
+    virtual void didChangeSelection(bool isSelectionEmpty) { }
+    virtual void didChangeContents() { }
+    virtual void didExecuteCommand(const WebString& commandName) { }
+    virtual void didEndEditing() { }
+
+    // This method is called in response to WebView's handleInputEvent()
+    // when the default action for the current keyboard event is not
+    // suppressed by the page, to give the embedder a chance to handle
+    // the keyboard event specially.
+    //
+    // Returns true if the keyboard event was handled by the embedder,
+    // indicating that the default action should be suppressed.
+    virtual bool handleCurrentKeyboardEvent() { return false; }
+
+
+    // Spellchecker --------------------------------------------------------
+
+    // The client should perform spell-checking on the given text.  If the
+    // text contains a misspelled word, then upon return misspelledOffset
+    // will point to the start of the misspelled word, and misspelledLength
+    // will indicates its length.  Otherwise, if there was not a spelling
+    // error, then upon return misspelledLength is 0.
+    virtual void spellCheck(
+        const WebString& text, int& misspelledOffset, int& misspelledLength) { }
+
+    // Computes an auto-corrected replacement for a misspelled word.  If no
+    // replacement is found, then an empty string is returned.
+    virtual WebString autoCorrectWord(const WebString& misspelledWord) { return WebString(); }
+
+    // Show or hide the spelling UI.
+    virtual void showSpellingUI(bool show) { }
+
+    // Returns true if the spelling UI is showing.
+    virtual bool isShowingSpellingUI() { return false; }
+
+    // Update the spelling UI with the given word.
+    virtual void updateSpellingUIWithMisspelledWord(const WebString& word) { }
+
+
+    // Dialogs -------------------------------------------------------------
+
+    // This method returns immediately after showing the dialog. When the
+    // 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; }
+
+    // Displays a modal alert dialog containing the given message.  Returns
+    // once the user dismisses the dialog.
+    virtual void runModalAlertDialog(
+        WebFrame*, const WebString& message) { }
+
+    // Displays a modal confirmation dialog with the given message as
+    // description and OK/Cancel choices.  Returns true if the user selects
+    // 'OK' or false otherwise.
+    virtual bool runModalConfirmDialog(
+        WebFrame*, const WebString& message) { return false; }
+
+    // Displays a modal input dialog with the given message as description
+    // and OK/Cancel choices.  The input field is pre-filled with
+    // defaultValue.  Returns true if the user selects 'OK' or false
+    // otherwise.  Upon returning true, actualValue contains the value of
+    // the input field.
+    virtual bool runModalPromptDialog(
+        WebFrame*, const WebString& message, const WebString& defaultValue,
+        WebString* actualValue) { return false; }
+
+    // Displays a modal confirmation dialog containing the given message as
+    // description and OK/Cancel choices, where 'OK' means that it is okay
+    // to proceed with closing the view.  Returns true if the user selects
+    // 'OK' or false otherwise.
+    virtual bool runModalBeforeUnloadDialog(
+        WebFrame*, const WebString& message) { return true; }
+
+
+    // UI ------------------------------------------------------------------
+
+    // Called when script modifies window.status
+    virtual void setStatusText(const WebString&) { }
+
+    // Called when hovering over an anchor with the given URL.
+    virtual void setMouseOverURL(const WebURL&) { }
+
+    // Called when keyboard focus switches to an anchor with the given URL.
+    virtual void setKeyboardFocusURL(const WebURL&) { }
+
+    // Called when a tooltip should be shown at the current cursor position.
+    virtual void setToolTipText(const WebString&, WebTextDirection hint) { }
+
+    // Shows a context menu with commands relevant to a specific element on
+    // the given frame. Additional context data is supplied.
+    virtual void showContextMenu(WebFrame*, const WebContextMenuData&) { }
+
+    // Called when a drag-n-drop operation should begin.
+    virtual void startDragging(
+        const WebPoint& from, const WebDragData&, WebDragOperationsMask) { }
+
+    // Called to determine if drag-n-drop operations may initiate a page
+    // navigation.
+    virtual bool acceptsLoadDrops() { return true; }
+
+    // Take focus away from the WebView by focusing an adjacent UI element
+    // in the containing window.
+    virtual void focusNext() { }
+    virtual void focusPrevious() { }
+
+
+    // Session history -----------------------------------------------------
+
+    // Tells the embedder to navigate back or forward in session history by
+    // the given offset (relative to the current position in session
+    // history).
+    virtual void navigateBackForwardSoon(int offset) { }
+
+    // Returns the number of history items before/after the current
+    // history item.
+    virtual int historyBackListCount() { return 0; }
+    virtual int historyForwardListCount() { return 0; }
+
+    // Called to notify the embedder when a new history item is added.
+    virtual void didAddHistoryItem() { }
+
+
+    // Accessibility -------------------------------------------------------
+
+    // Notifies embedder that the focus has changed to the given
+    // accessibility object.
+    virtual void focusAccessibilityObject(const WebAccessibilityObject&) { }
+
+
+    // Developer tools -----------------------------------------------------
+
+    // Called to notify the client that the inspector's settings were
+    // changed and should be saved.  See WebView::inspectorSettings.
+    virtual void didUpdateInspectorSettings() { }
+
+
+    // Autofill ------------------------------------------------------------
+
+    // Queries the browser for suggestions to be shown for the form text
+    // field named |name|.  |value| is the text entered by the user so
+    // far and the WebNode corresponds to the input field.
+    virtual void queryAutofillSuggestions(const WebNode&,
+                                          const WebString& name,
+                                          const WebString& value) { }
+
+    // Instructs the browser to remove the autofill entry specified from
+    // its DB.
+    virtual void removeAutofillSuggestions(const WebString& name,
+                                           const WebString& value) { }
+
+protected:
+    ~WebViewClient() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebWidget.h b/WebKit/chromium/public/WebWidget.h
new file mode 100644
index 0000000..9dfeefc
--- /dev/null
+++ b/WebKit/chromium/public/WebWidget.h
@@ -0,0 +1,99 @@
+/*
+ * 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 WebWidget_h
+#define WebWidget_h
+
+#include "WebCanvas.h"
+#include "WebCommon.h"
+#include "WebCompositionCommand.h"
+#include "WebTextDirection.h"
+
+namespace WebKit {
+
+class WebInputEvent;
+class WebString;
+struct WebRect;
+struct WebSize;
+
+class WebWidget {
+public:
+    // This method closes and deletes the WebWidget.
+    virtual void close() = 0;
+
+    // Returns the current size of the WebWidget.
+    virtual WebSize size() = 0;
+
+    // Called to resize the WebWidget.
+    virtual void resize(const WebSize&) = 0;
+
+    // Called to layout the WebWidget.  This MUST be called before Paint,
+    // and it may result in calls to WebWidgetClient::didInvalidateRect.
+    virtual void layout() = 0;
+
+    // Called to paint the specified region of the WebWidget onto the given
+    // canvas.  You MUST call Layout before calling this method.  It is
+    // okay to call paint multiple times once layout has been called,
+    // assuming no other changes are made to the WebWidget (e.g., once
+    // events are processed, it should be assumed that another call to
+    // layout is warranted before painting again).
+    virtual void paint(WebCanvas*, const WebRect&) = 0;
+
+    // Called to inform the WebWidget of an input event.  Returns true if
+    // the event has been processed, false otherwise.
+    virtual bool handleInputEvent(const WebInputEvent&) = 0;
+
+    // Called to inform the WebWidget that mouse capture was lost.
+    virtual void mouseCaptureLost() = 0;
+
+    // Called to inform the WebWidget that it has gained or lost keyboard focus.
+    virtual void setFocus(bool) = 0;
+
+    // Called to inform the WebWidget of a composition event.
+    virtual bool handleCompositionEvent(WebCompositionCommand command,
+                                        int cursorPosition,
+                                        int targetStart,
+                                        int targetEnd,
+                                        const WebString& text) = 0;
+
+    // Retrieve the status of this WebWidget required by IME APIs.  Upon
+    // success enabled and caretBounds are set.
+    virtual bool queryCompositionStatus(bool* enabled, WebRect* caretBounds) = 0;
+
+    // Changes the text direction of the selected input node.
+    virtual void setTextDirection(WebTextDirection) = 0;
+
+protected:
+    ~WebWidget() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebWidgetClient.h b/WebKit/chromium/public/WebWidgetClient.h
new file mode 100644
index 0000000..06d9eba
--- /dev/null
+++ b/WebKit/chromium/public/WebWidgetClient.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 WebWidgetClient_h
+#define WebWidgetClient_h
+
+#include "WebCommon.h"
+#include "WebNavigationPolicy.h"
+#include "WebRect.h"
+#include "WebScreenInfo.h"
+
+namespace WebKit {
+
+class WebWidget;
+struct WebCursorInfo;
+
+class WebWidgetClient {
+public:
+    // Called when a region of the WebWidget needs to be re-painted.
+    virtual void didInvalidateRect(const WebRect&) { }
+
+    // Called when a region of the WebWidget, given by clipRect, should be
+    // scrolled by the specified dx and dy amounts.
+    virtual void didScrollRect(int dx, int dy, const WebRect& clipRect) { }
+
+    // Called when the widget acquires or loses focus, respectively.
+    virtual void didFocus() { }
+    virtual void didBlur() { }
+
+    // Called when the cursor for the widget changes.
+    virtual void didChangeCursor(const WebCursorInfo&) { }
+
+    // Called when the widget should be closed.  WebWidget::close() should
+    // be called asynchronously as a result of this notification.
+    virtual void closeWidgetSoon() { }
+
+    // Called to show the widget according to the given policy.
+    virtual void show(WebNavigationPolicy) { }
+
+    // Called to block execution of the current thread until the widget is
+    // closed.
+    virtual void runModal() { }
+
+    // Called to get/set the position of the widget in screen coordinates.
+    virtual WebRect windowRect() { return WebRect(); }
+    virtual void setWindowRect(const WebRect&) { }
+
+    // Called to get the position of the resizer rect in window coordinates.
+    virtual WebRect windowResizerRect() { return WebRect(); }
+
+    // Called to get the position of the root window containing the widget
+    // in screen coordinates.
+    virtual WebRect rootWindowRect() { return WebRect(); }
+
+    // Called to query information about the screen where this widget is
+    // displayed.
+    virtual WebScreenInfo screenInfo() { return WebScreenInfo(); }
+
+protected:
+    ~WebWidgetClient() { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebWorker.h b/WebKit/chromium/public/WebWorker.h
new file mode 100644
index 0000000..9397bcd
--- /dev/null
+++ b/WebKit/chromium/public/WebWorker.h
@@ -0,0 +1,62 @@
+/*
+ * 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 WebWorker_h
+#define WebWorker_h
+
+#include "WebMessagePortChannel.h"
+
+namespace WebKit {
+
+class WebString;
+class WebURL;
+class WebWorkerClient;
+
+// Provides an interface to the script execution context for a worker.
+class WebWorker {
+public:
+    // Instantiates a built-in WebWorker.
+    WEBKIT_API static WebWorker* create(WebWorkerClient*);
+
+    virtual ~WebWorker() { }
+    virtual void startWorkerContext(const WebURL& scriptURL,
+                                    const WebString& userAgent,
+                                    const WebString& sourceCode) = 0;
+    virtual void terminateWorkerContext() = 0;
+    virtual void postMessageToWorkerContext(
+        const WebString&,
+        const WebMessagePortChannelArray&) = 0;
+    virtual void workerObjectDestroyed() = 0;
+    virtual void clientDestroyed() = 0;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebWorkerClient.h b/WebKit/chromium/public/WebWorkerClient.h
new file mode 100644
index 0000000..eb2e63e
--- /dev/null
+++ b/WebKit/chromium/public/WebWorkerClient.h
@@ -0,0 +1,61 @@
+/*
+ * 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 WebWorkerClient_h
+#define WebWorkerClient_h
+
+#include "WebCommonWorkerClient.h"
+#include "WebMessagePortChannel.h"
+
+namespace WebKit {
+
+class WebNotificationPresenter;
+class WebString;
+class WebWorker;
+
+// Provides an interface back to the in-page script object for a worker.
+// All functions are expected to be called back on the thread that created
+// the Worker object, unless noted.
+class WebWorkerClient : public WebCommonWorkerClient {
+public:
+    virtual void postMessageToWorkerObject(
+        const WebString&,
+        const WebMessagePortChannelArray&) = 0;
+
+    virtual void confirmMessageFromWorkerObject(bool hasPendingActivity) = 0;
+    virtual void reportPendingActivity(bool hasPendingActivity) = 0;
+
+protected:
+    ~WebWorkerClient() { }
+};
+
+} // namespace WebKit
+
+#endif

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list