summaryrefslogtreecommitdiffstats
path: root/webkit/appcache/appcache_interfaces.h
diff options
context:
space:
mode:
authorkkanetkar@chromium.org <kkanetkar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-28 03:14:37 +0000
committerkkanetkar@chromium.org <kkanetkar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-28 03:14:37 +0000
commitec5c192817606b55ad99edb256997b70eea41b85 (patch)
tree16e863d9b1fa02f029c050b028177b7c984da6eb /webkit/appcache/appcache_interfaces.h
parent16d35b25ec19b82c13dc7cd24f744951cc12fad0 (diff)
downloadchromium_src-ec5c192817606b55ad99edb256997b70eea41b85.zip
chromium_src-ec5c192817606b55ad99edb256997b70eea41b85.tar.gz
chromium_src-ec5c192817606b55ad99edb256997b70eea41b85.tar.bz2
Chrome side of changes required to populate appcache resource list.
BUG = 2821005 TEST = Manually navigate. Review URL: http://codereview.chromium.org/3009005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53902 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache/appcache_interfaces.h')
-rw-r--r--webkit/appcache/appcache_interfaces.h35
1 files changed, 32 insertions, 3 deletions
diff --git a/webkit/appcache/appcache_interfaces.h b/webkit/appcache/appcache_interfaces.h
index 1956135..1dfd326 100644
--- a/webkit/appcache/appcache_interfaces.h
+++ b/webkit/appcache/appcache_interfaces.h
@@ -9,8 +9,9 @@
#include <vector>
#include "base/basictypes.h"
#include "base/file_path.h"
+#include "base/time.h"
+#include "googleurl/src/gurl.h"
-class GURL;
class URLRequest;
namespace appcache {
@@ -51,11 +52,37 @@ enum LogLevel {
LOG_ERROR,
};
+struct AppCacheInfo {
+ GURL manifest_url;
+ base::Time creation_time;
+ base::Time last_update_time;
+ base::Time last_access_time;
+ int64 cache_id;
+ Status status;
+ int64 size;
+ bool is_complete;
+ AppCacheInfo() : cache_id(kNoCacheId), status(UNCACHED),
+ size(0), is_complete(false) { }
+};
+
+typedef std::vector<AppCacheInfo> AppCacheInfoVector;
+
+// POD type to hold information about a single appcache resource.
+struct AppCacheResourceInfo {
+ GURL url;
+ int64 size;
+ bool is_master;
+ bool is_manifest;
+ bool is_fallback;
+ bool is_foreign;
+ bool is_explicit;
+};
+
// Interface used by backend (browser-process) to talk to frontend (renderer).
class AppCacheFrontend {
public:
- virtual void OnCacheSelected(int host_id, int64 cache_id ,
- Status status) = 0;
+ virtual void OnCacheSelected(
+ int host_id, const appcache::AppCacheInfo& info) = 0;
virtual void OnStatusChanged(const std::vector<int>& host_ids,
Status status) = 0;
virtual void OnEventRaised(const std::vector<int>& host_ids,
@@ -93,6 +120,8 @@ class AppCacheBackend {
virtual Status GetStatus(int host_id) = 0;
virtual bool StartUpdate(int host_id) = 0;
virtual bool SwapCache(int host_id) = 0;
+ virtual void GetResourceList(
+ int host_id, std::vector<AppCacheResourceInfo>* resource_infos) = 0;
virtual ~AppCacheBackend() {}
};