[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 11:14:09 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 0570b83815246ebe05ce0d37b5a1c38d986004d6
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jul 15 18:37:23 2010 +0000

    2010-07-15  Michael Nordman  <michaeln at google.com>
    
            Reviewed by Darin Fisher.
    
            WebKitAPI additions to support inspecting application caches.
            https://bugs.webkit.org/show_bug.cgi?id=41993
    
            * public/WebApplicationCacheHost.h:
            (WebKit::WebApplicationCacheHost::CacheInfo::CacheInfo):
            (WebKit::WebApplicationCacheHost::ResourceInfo::ResourceInfo):
            (WebKit::WebApplicationCacheHost::getAssociatedCacheInfo):
            (WebKit::WebApplicationCacheHost::getResourceList):
            (WebKit::WebApplicationCacheHost::deleteAssociatedCacheGroup):
            * public/WebApplicationCacheHostClient.h:
            (WebKit::WebApplicationCacheHostClient::didChangeCacheAssociation):
            * src/ApplicationCacheHostInternal.h:
            (WebCore::ApplicationCacheHostInternal::didChangeCacheAssociation):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63440 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 2324608..3ab759b 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,21 @@
+2010-07-15  Michael Nordman  <michaeln at google.com>
+
+        Reviewed by Darin Fisher.
+
+        WebKitAPI additions to support inspecting application caches.
+        https://bugs.webkit.org/show_bug.cgi?id=41993
+
+        * public/WebApplicationCacheHost.h:
+        (WebKit::WebApplicationCacheHost::CacheInfo::CacheInfo):
+        (WebKit::WebApplicationCacheHost::ResourceInfo::ResourceInfo):
+        (WebKit::WebApplicationCacheHost::getAssociatedCacheInfo):
+        (WebKit::WebApplicationCacheHost::getResourceList):
+        (WebKit::WebApplicationCacheHost::deleteAssociatedCacheGroup):
+        * public/WebApplicationCacheHostClient.h:
+        (WebKit::WebApplicationCacheHostClient::didChangeCacheAssociation):
+        * src/ApplicationCacheHostInternal.h:
+        (WebCore::ApplicationCacheHostInternal::didChangeCacheAssociation):
+
 2010-07-15  Pavel Feldman  <pfeldman at chromium.org>
 
         Reviewed by Yury Semikhatsky.
diff --git a/WebKit/chromium/public/WebApplicationCacheHost.h b/WebKit/chromium/public/WebApplicationCacheHost.h
index 23be4dd..acbc106 100644
--- a/WebKit/chromium/public/WebApplicationCacheHost.h
+++ b/WebKit/chromium/public/WebApplicationCacheHost.h
@@ -32,6 +32,8 @@
 #define WebApplicationCacheHost_h
 
 #include "WebCommon.h"
+#include "WebURL.h"
+#include "WebVector.h"
 
 namespace WebKit {
 
@@ -71,24 +73,46 @@ public:
     virtual ~WebApplicationCacheHost() { }
 
     // Called for every request made within the context.
-    virtual void willStartMainResourceRequest(WebURLRequest&) = 0;
-    virtual void willStartSubResourceRequest(WebURLRequest&) = 0;
+    virtual void willStartMainResourceRequest(WebURLRequest&) { }
+    virtual void willStartSubResourceRequest(WebURLRequest&) { }
 
     // One or the other selectCache methods is called after having parsed the <html> tag.
     // The latter returns false if the current document has been identified as a "foreign"
     // entry, in which case the frame navigation will be restarted by webkit.
-    virtual void selectCacheWithoutManifest() = 0;
-    virtual bool selectCacheWithManifest(const WebURL& manifestURL) = 0;
+    virtual void selectCacheWithoutManifest() { }
+    virtual bool selectCacheWithManifest(const WebURL& manifestURL) { return true; }
 
     // Called as the main resource is retrieved.
-    virtual void didReceiveResponseForMainResource(const WebURLResponse&) = 0;
-    virtual void didReceiveDataForMainResource(const char* data, int len) = 0;
-    virtual void didFinishLoadingMainResource(bool success) = 0;
+    virtual void didReceiveResponseForMainResource(const WebURLResponse&) { }
+    virtual void didReceiveDataForMainResource(const char* data, int len) { }
+    virtual void didFinishLoadingMainResource(bool success) { }
 
     // Called on behalf of the scriptable interface.
-    virtual Status status() = 0;
-    virtual bool startUpdate() = 0;
-    virtual bool swapCache() = 0;
+    virtual Status status() { return Uncached; }
+    virtual bool startUpdate() { return false; }
+    virtual bool swapCache() { return false; }
+
+    // Structures and methods to support inspecting Application Caches.
+    struct CacheInfo {
+        WebURL manifestURL; // Empty if there is no associated cache.
+        double creationTime;
+        double updateTime;
+        long long totalSize;
+        CacheInfo() : creationTime(0), updateTime(0), totalSize(0) { }
+    };
+    struct ResourceInfo {
+        WebURL url;
+        long long size;
+        bool isMaster;
+        bool isManifest;
+        bool isExplicit;
+        bool isForeign;
+        bool isFallback;
+        ResourceInfo() : size(0), isMaster(false), isManifest(false), isExplicit(false), isForeign(false), isFallback(false) { }
+    };
+    virtual void getAssociatedCacheInfo(CacheInfo*) { }
+    virtual void getResourceList(WebVector<ResourceInfo>*) { }
+    virtual void deleteAssociatedCacheGroup() { }
 };
 
 }  // namespace WebKit
diff --git a/WebKit/chromium/public/WebApplicationCacheHostClient.h b/WebKit/chromium/public/WebApplicationCacheHostClient.h
index 39b7fa2..3f84c51 100644
--- a/WebKit/chromium/public/WebApplicationCacheHostClient.h
+++ b/WebKit/chromium/public/WebApplicationCacheHostClient.h
@@ -39,6 +39,9 @@ namespace WebKit {
 // This interface is used by the embedder to call into webkit.
 class WebApplicationCacheHostClient {
 public:
+    // Called when a different cache, including possibly no cache, is associated with the host.
+    virtual void didChangeCacheAssociation() = 0;
+
     // Called to fire events in the scriptable interface.
     virtual void notifyEventListener(WebApplicationCacheHost::EventID) = 0;
     virtual void notifyProgressEventListener(const WebURL&, int num_total, int num_complete) = 0;
diff --git a/WebKit/chromium/src/ApplicationCacheHostInternal.h b/WebKit/chromium/src/ApplicationCacheHostInternal.h
index 902b9b5..c88420b 100644
--- a/WebKit/chromium/src/ApplicationCacheHostInternal.h
+++ b/WebKit/chromium/src/ApplicationCacheHostInternal.h
@@ -53,6 +53,11 @@ public:
         m_outerHost.set(webFrame->client()->createApplicationCacheHost(webFrame, this));
     }
 
+    virtual void didChangeCacheAssociation()
+    {
+        // FIXME: Prod the inspector to update it's notion of what cache the page is using.
+    }
+
     virtual void notifyEventListener(WebKit::WebApplicationCacheHost::EventID eventID)
     {
         m_innerHost->notifyDOMApplicationCache(static_cast<ApplicationCacheHost::EventID>(eventID), 0, 0);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list