summaryrefslogtreecommitdiffstats
path: root/WebKit/chromium/src/ApplicationCacheHost.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/chromium/src/ApplicationCacheHost.cpp')
-rw-r--r--WebKit/chromium/src/ApplicationCacheHost.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/WebKit/chromium/src/ApplicationCacheHost.cpp b/WebKit/chromium/src/ApplicationCacheHost.cpp
index b90126f..dfd4754 100644
--- a/WebKit/chromium/src/ApplicationCacheHost.cpp
+++ b/WebKit/chromium/src/ApplicationCacheHost.cpp
@@ -37,11 +37,15 @@
#include "DocumentLoader.h"
#include "DOMApplicationCache.h"
#include "Frame.h"
+#include "InspectorApplicationCacheAgent.h"
+#include "InspectorController.h"
+#include "Page.h"
#include "ProgressEvent.h"
#include "Settings.h"
#include "WebURL.h"
#include "WebURLError.h"
#include "WebURLResponse.h"
+#include "WebVector.h"
#include "WrappedResourceRequest.h"
#include "WrappedResourceResponse.h"
@@ -206,6 +210,32 @@ void ApplicationCacheHost::notifyDOMApplicationCache(EventID id, int total, int
dispatchDOMEvent(id, total, done);
}
+#if ENABLE(INSPECTOR)
+ApplicationCacheHost::CacheInfo ApplicationCacheHost::applicationCacheInfo()
+{
+ if (!m_internal)
+ return CacheInfo(KURL(), 0, 0, 0);
+
+ WebKit::WebApplicationCacheHost::CacheInfo webInfo;
+ m_internal->m_outerHost->getAssociatedCacheInfo(&webInfo);
+ return CacheInfo(webInfo.manifestURL, webInfo.creationTime, webInfo.updateTime, webInfo.totalSize);
+}
+
+void ApplicationCacheHost::fillResourceList(ResourceInfoList* resources)
+{
+ if (!m_internal)
+ return;
+
+ WebKit::WebVector<WebKit::WebApplicationCacheHost::ResourceInfo> webResources;
+ m_internal->m_outerHost->getResourceList(&webResources);
+ for (size_t i = 0; i < webResources.size(); ++i) {
+ resources->append(ResourceInfo(
+ webResources[i].url, webResources[i].isMaster, webResources[i].isManifest, webResources[i].isFallback,
+ webResources[i].isForeign, webResources[i].isExplicit, webResources[i].size));
+ }
+}
+#endif
+
void ApplicationCacheHost::stopDeferringEvents()
{
RefPtr<DocumentLoader> protect(documentLoader());