diff options
Diffstat (limited to 'webkit/appcache/appcache_host.h')
-rw-r--r-- | webkit/appcache/appcache_host.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/webkit/appcache/appcache_host.h b/webkit/appcache/appcache_host.h index c449982..6f25a57 100644 --- a/webkit/appcache/appcache_host.h +++ b/webkit/appcache/appcache_host.h @@ -71,6 +71,22 @@ class AppCacheHost : public AppCacheStorage::Delegate, void SwapCacheWithCallback(SwapCacheCallback* callback, void* callback_param); + // Called prior to the main resource load. When the system contains multiple + // candidates for a main resource load, the appcache preferred by the host + // that created this host is used to break ties. + void SetSpawningHostId(int spawning_process_id, int spawning_host_id); + + // May return NULL if the spawning host context has been closed, or if a + // spawning host context was never identified. + const AppCacheHost* GetSpawningHost() const; + + const GURL& preferred_manifest_url() const { + return preferred_manifest_url_; + } + void set_preferred_manifest_url(const GURL& url) { + preferred_manifest_url_ = url; + } + // Support for loading resources out of the appcache. // May return NULL if the request isn't subject to retrieval from an appache. AppCacheRequestHandler* CreateRequestHandler( @@ -149,6 +165,13 @@ class AppCacheHost : public AppCacheStorage::Delegate, // Identifies the corresponding appcache host in the child process. int host_id_; + // Information about the host that created this one; the manifest + // preferred by our creator influences which cache our main resource + // should be loaded from. + int spawning_host_id_; + int spawning_process_id_; + GURL preferred_manifest_url_; + // Hosts for dedicated workers are special cased to shunt // request handling off to the dedicated worker's parent. // The scriptable api is not accessible in dedicated workers |