[content shell] hook up testRunner.dumpEditingCallbacks
[chromium-blink-merge.git] / content / worker / worker_webapplicationcachehost_impl.h
blob9f9baa2c7890c272439492d1d5b677b06bdd3fce
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_WORKER_WORKER_WEBAPPLICATIONCACHEHOST_IMPL_H_
6 #define CHROME_WORKER_WORKER_WEBAPPLICATIONCACHEHOST_IMPL_H_
8 #include "webkit/appcache/web_application_cache_host_impl.h"
10 namespace content {
12 // Information used to construct and initialize an appcache host
13 // for a worker.
14 struct WorkerAppCacheInitInfo {
15 int parent_process_id;
16 int64 main_resource_appcache_id; // Only valid for shared workers.
18 WorkerAppCacheInitInfo()
19 : parent_process_id(0),
20 main_resource_appcache_id(0) {
22 WorkerAppCacheInitInfo(
23 int process_id, int64 cache_id)
24 : parent_process_id(process_id),
25 main_resource_appcache_id(cache_id) {
29 class WorkerWebApplicationCacheHostImpl
30 : public appcache::WebApplicationCacheHostImpl {
31 public:
32 WorkerWebApplicationCacheHostImpl(
33 const WorkerAppCacheInitInfo& init_info,
34 WebKit::WebApplicationCacheHostClient* client);
36 // Main resource loading is different for workers. The resource is
37 // loaded by the creator of the worker rather than the worker itself.
38 // These overrides are stubbed out.
39 virtual void willStartMainResourceRequest(
40 WebKit::WebURLRequest&, const WebKit::WebFrame*);
41 virtual void didReceiveResponseForMainResource(
42 const WebKit::WebURLResponse&);
43 virtual void didReceiveDataForMainResource(const char* data, int len);
44 virtual void didFinishLoadingMainResource(bool success);
46 // Cache selection is also different for workers. We know at construction
47 // time what cache to select and do so then.
48 // These overrides are stubbed out.
49 virtual void selectCacheWithoutManifest();
50 virtual bool selectCacheWithManifest(const WebKit::WebURL& manifestURL);
53 } // namespace content
55 #endif // CHROME_WORKER_WORKER_WEBAPPLICATIONCACHEHOST_IMPL_H_