Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / content / worker / worker_webapplicationcachehost_impl.h
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.
4
5 #ifndef CHROME_WORKER_WORKER_WEBAPPLICATIONCACHEHOST_IMPL_H_
6 #define CHROME_WORKER_WORKER_WEBAPPLICATIONCACHEHOST_IMPL_H_
7
8 #include "content/child/appcache/web_application_cache_host_impl.h"
9
10 namespace content {
11
12 class WorkerWebApplicationCacheHostImpl : public WebApplicationCacheHostImpl {
13  public:
14   WorkerWebApplicationCacheHostImpl(
15       blink::WebApplicationCacheHostClient* client);
16
17   // Main resource loading is different for workers. The main resource is
18   // loaded by the worker using WorkerScriptLoader.
19   // These overrides are stubbed out.
20   virtual void willStartMainResourceRequest(
21       blink::WebURLRequest&, const blink::WebFrame*);
22   virtual void willStartMainResourceRequest(
23       blink::WebURLRequest&, const blink::WebApplicationCacheHost*);
24   virtual void didReceiveResponseForMainResource(
25       const blink::WebURLResponse&);
26   virtual void didReceiveDataForMainResource(const char* data, int len);
27   virtual void didFinishLoadingMainResource(bool success);
28
29   // Cache selection is also different for workers. We know at construction
30   // time what cache to select and do so then.
31   // These overrides are stubbed out.
32   virtual void selectCacheWithoutManifest();
33   virtual bool selectCacheWithManifest(const blink::WebURL& manifestURL);
34 };
35
36 }  // namespace content
37
38 #endif  // CHROME_WORKER_WORKER_WEBAPPLICATIONCACHEHOST_IMPL_H_