Index: webkit/common/appcache/appcache_interfaces.h |
diff --git a/webkit/common/appcache/appcache_interfaces.h b/webkit/common/appcache/appcache_interfaces.h |
index e33cd88a2b831a9e46f20fcdf1c7017dd59b1881..dba7529c5c535fddeb36a31e871870f8dda06fb5 100644 |
--- a/webkit/common/appcache/appcache_interfaces.h |
+++ b/webkit/common/appcache/appcache_interfaces.h |
@@ -5,6 +5,7 @@ |
#ifndef WEBKIT_COMMON_APPCACHE_APPCACHE_INTERFACES_H_ |
#define WEBKIT_COMMON_APPCACHE_APPCACHE_INTERFACES_H_ |
+#include <map> |
#include <string> |
#include <vector> |
@@ -26,6 +27,7 @@ namespace appcache { |
static const int kNoHostId = 0; |
static const int64 kNoCacheId = 0; |
static const int64 kNoResponseId = 0; |
+static const int64 kSynthesizedResponseId = -1; |
static const int64 kUnknownCacheId = -1; |
enum Status { |
@@ -92,6 +94,8 @@ struct WEBKIT_STORAGE_COMMON_EXPORT AppCacheResourceInfo { |
bool is_fallback; |
bool is_foreign; |
bool is_explicit; |
+ bool is_executable; |
+ std::string intercept_target_url; |
int64 response_id; |
}; |
@@ -134,6 +138,7 @@ class WEBKIT_STORAGE_COMMON_EXPORT AppCacheFrontend { |
const GURL& manifest_url) = 0; |
virtual void OnLogMessage(int host_id, LogLevel log_level, |
const std::string& message) = 0; |
+ virtual void OnControllerReady(int host_id) = 0; |
virtual ~AppCacheFrontend() {} |
}; |
@@ -142,6 +147,13 @@ class WEBKIT_STORAGE_COMMON_EXPORT AppCacheBackend { |
public: |
virtual void RegisterHost(int host_id) = 0; |
virtual void UnregisterHost(int host_id) = 0; |
+ virtual void RegisterController(int host_id, |
+ const GURL& document_url, |
+ const string16& pattern, |
+ const GURL& controller_url) = 0; |
+ virtual void UnregisterController(int host_id, |
+ const GURL& document_url, |
+ const string16& pattern) = 0; |
virtual void SetSpawningHostId(int host_id, int spawning_host_id) = 0; |
virtual void SelectCache(int host_id, |
const GURL& document_url, |
@@ -188,6 +200,33 @@ WEBKIT_STORAGE_COMMON_EXPORT bool IsSchemeAndMethodSupported( |
WEBKIT_STORAGE_COMMON_EXPORT extern const base::FilePath::CharType |
kAppCacheDatabaseName[]; |
+ |
+class WEBKIT_STORAGE_COMMON_EXPORT AppCacheExecutableHandlerInterfaces { |
+ public: |
+ struct WEBKIT_STORAGE_COMMON_EXPORT Request { |
+ GURL url; |
+ std::string method; /* probably an enum somewhere? */ |
+ std::string referrer; /* string because URLRequest::referrer is a string */ |
+ std::map<std::string, std::string> headers; |
+ bool is_main_resource_load; |
+ |
+ Request(); |
+ ~Request(); |
+ }; |
+ |
+ // A handler can respond with either a response or defer to the network. |
+ struct WEBKIT_STORAGE_COMMON_EXPORT Response { |
+ int status_code; |
+ string16 status_text; |
+ string16 blob_id; |
+ bool use_default; /* overrides all other settings */ |
+ std::map<string16, string16> headers; |
+ |
+ Response(); |
+ ~Response(); |
+ }; |
+}; |
+ |
} // namespace |
#endif // WEBKIT_COMMON_APPCACHE_APPCACHE_INTERFACES_H_ |