[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9

eric at webkit.org eric at webkit.org
Thu Feb 4 21:24:17 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit 0f6a9abb6022d98750995147cb7d1eb8706fd244
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Jan 22 04:21:21 2010 +0000

    2010-01-21  Michael Nordman  <michaeln at google.com>
    
            Reviewed by Darin Fisher.
    
            Adds WebKit::WebDataSource::applicationCacheHost() to the API.
            https://bugs.webkit.org/show_bug.cgi?id=33880
    
            * WebKit.gyp:
            * public/WebDataSource.h:
            * src/ApplicationCacheHost.cpp:
            * src/ApplicationCacheHostInternal.h: Copied from WebKit/chromium/src/ApplicationCacheHost.cpp.
            (WebCore::ApplicationCacheHostInternal::notifyEventListener):
            (WebCore::ApplicationCacheHostInternal::toWebApplicationCacheHost):
            * src/WebDataSourceImpl.cpp:
            (WebKit::WebDataSourceImpl::applicationCacheHost):
            * src/WebDataSourceImpl.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53671 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 6d1e026..d2a2ac6 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,20 @@
+2010-01-21  Michael Nordman  <michaeln at google.com>
+
+        Reviewed by Darin Fisher.
+
+        Adds WebKit::WebDataSource::applicationCacheHost() to the API.
+        https://bugs.webkit.org/show_bug.cgi?id=33880
+
+        * WebKit.gyp:
+        * public/WebDataSource.h:
+        * src/ApplicationCacheHost.cpp:
+        * src/ApplicationCacheHostInternal.h: Copied from WebKit/chromium/src/ApplicationCacheHost.cpp.
+        (WebCore::ApplicationCacheHostInternal::notifyEventListener):
+        (WebCore::ApplicationCacheHostInternal::toWebApplicationCacheHost):
+        * src/WebDataSourceImpl.cpp:
+        (WebKit::WebDataSourceImpl::applicationCacheHost):
+        * src/WebDataSourceImpl.h:
+
 2010-01-21  Eric Uhrhane  <ericu at chromium.org>
 
         Reviewed by Dmitry Titov.
diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp
index 0f84efe..f8c2e38 100644
--- a/WebKit/chromium/WebKit.gyp
+++ b/WebKit/chromium/WebKit.gyp
@@ -190,6 +190,7 @@
                 'public/win/WebScreenInfoFactory.h',
                 'public/win/WebScreenInfoFactory.h',
                 'src/ApplicationCacheHost.cpp',
+                'src/ApplicationCacheHostInternal.h',
                 'src/AssertMatchingEnums.cpp',
                 'src/AutocompletePopupMenuClient.cpp',
                 'src/AutocompletePopupMenuClient.h',
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/src/ApplicationCacheHost.cpp b/WebKit/chromium/src/ApplicationCacheHost.cpp
index ef8f860..fdd1649 100644
--- a/WebKit/chromium/src/ApplicationCacheHost.cpp
+++ b/WebKit/chromium/src/ApplicationCacheHost.cpp
@@ -33,14 +33,11 @@
 
 #if ENABLE(OFFLINE_WEB_APPLICATIONS)
 
+#include "ApplicationCacheHostInternal.h"
 #include "DocumentLoader.h"
 #include "DOMApplicationCache.h"
 #include "Frame.h"
 #include "Settings.h"
-#include "WebApplicationCacheHost.h"
-#include "WebApplicationCacheHostClient.h"
-#include "WebKit.h"
-#include "WebKitClient.h"
 #include "WebURL.h"
 #include "WebURLError.h"
 #include "WebURLResponse.h"
@@ -51,27 +48,6 @@ using namespace WebKit;
 
 namespace WebCore {
 
-// ApplicationCacheHostInternal -----------------------------------------------
-
-class ApplicationCacheHostInternal : public WebApplicationCacheHostClient {
-public:
-    ApplicationCacheHostInternal(ApplicationCacheHost* host)
-        : m_innerHost(host)
-    {
-        m_outerHost.set(WebKit::webKitClient()->createApplicationCacheHost(this));
-    }
-
-    virtual void notifyEventListener(WebApplicationCacheHost::EventID eventID)
-    {
-        m_innerHost->notifyDOMApplicationCache(
-            static_cast<ApplicationCacheHost::EventID>(eventID));
-    }
-
-    ApplicationCacheHost* m_innerHost;
-    OwnPtr<WebApplicationCacheHost> m_outerHost;
-};
-
-// ApplicationCacheHost -------------------------------------------------------
 // We provide a custom implementation of this class that calls out to the
 // embedding application instead of using WebCore's built in appcache system.
 // This file replaces webcore/appcache/ApplicationCacheHost.cpp in our build.
diff --git a/WebKit/chromium/src/ApplicationCacheHostInternal.h b/WebKit/chromium/src/ApplicationCacheHostInternal.h
new file mode 100644
index 0000000..3e52c1b
--- /dev/null
+++ b/WebKit/chromium/src/ApplicationCacheHostInternal.h
@@ -0,0 +1,70 @@
+/*
+ * 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.
+ */
+
+#include "config.h"
+#include "ApplicationCacheHost.h"
+
+#if ENABLE(OFFLINE_WEB_APPLICATIONS)
+
+#include "WebApplicationCacheHostClient.h"
+#include "WebKit.h"
+#include "WebKitClient.h"
+
+namespace WebCore {
+
+class ApplicationCacheHostInternal : public WebKit::WebApplicationCacheHostClient {
+public:
+    ApplicationCacheHostInternal(ApplicationCacheHost* host)
+        : m_innerHost(host)
+    {
+        m_outerHost.set(WebKit::webKitClient()->createApplicationCacheHost(this));
+    }
+
+    virtual void notifyEventListener(WebKit::WebApplicationCacheHost::EventID eventID)
+    {
+        m_innerHost->notifyDOMApplicationCache(static_cast<ApplicationCacheHost::EventID>(eventID));
+    }
+
+    static WebKit::WebApplicationCacheHost* toWebApplicationCacheHost(ApplicationCacheHost* innerHost)
+    {
+        if (innerHost && innerHost->m_internal.get())
+            return innerHost->m_internal->m_outerHost.get();
+        return 0;
+    }
+
+private:
+    friend class ApplicationCacheHost;
+    ApplicationCacheHost* m_innerHost;
+    OwnPtr<WebKit::WebApplicationCacheHost> m_outerHost;
+};
+
+}
+
+#endif  // ENABLE(OFFLINE_WEB_APPLICATIONS)
diff --git a/WebKit/chromium/src/WebDataSourceImpl.cpp b/WebKit/chromium/src/WebDataSourceImpl.cpp
index 456706a..5a315cf 100644
--- a/WebKit/chromium/src/WebDataSourceImpl.cpp
+++ b/WebKit/chromium/src/WebDataSourceImpl.cpp
@@ -31,6 +31,7 @@
 #include "config.h"
 #include "WebDataSourceImpl.h"
 
+#include "ApplicationCacheHostInternal.h"
 #include "WebURL.h"
 #include "WebURLError.h"
 #include "WebVector.h"
@@ -108,6 +109,14 @@ void WebDataSourceImpl::setExtraData(ExtraData* extraData)
     m_extraData.set(extraData);
 }
 
+WebApplicationCacheHost* WebDataSourceImpl::applicationCacheHost() {
+#if ENABLE(OFFLINE_WEB_APPLICATIONS)
+    return ApplicationCacheHostInternal::toWebApplicationCacheHost(DocumentLoader::applicationCacheHost());
+#else
+    return 0;
+#endif
+}
+
 WebNavigationType WebDataSourceImpl::toWebNavigationType(NavigationType type)
 {
     switch (type) {
diff --git a/WebKit/chromium/src/WebDataSourceImpl.h b/WebKit/chromium/src/WebDataSourceImpl.h
index 8860fe4..f868e95 100644
--- a/WebKit/chromium/src/WebDataSourceImpl.h
+++ b/WebKit/chromium/src/WebDataSourceImpl.h
@@ -46,7 +46,6 @@
 #include <wtf/PassOwnPtr.h>
 #include <wtf/Vector.h>
 
-
 namespace WebKit {
 
 class WebPluginLoadObserver;
@@ -73,6 +72,7 @@ public:
     virtual double triggeringEventTime() const;
     virtual ExtraData* extraData() const;
     virtual void setExtraData(ExtraData*);
+    virtual WebApplicationCacheHost* applicationCacheHost();
 
     static WebNavigationType toWebNavigationType(WebCore::NavigationType type);
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list