OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 13 matching lines...) Expand all Loading... |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef WebApplicationCacheHost_h | 31 #ifndef WebApplicationCacheHost_h |
32 #define WebApplicationCacheHost_h | 32 #define WebApplicationCacheHost_h |
33 | 33 |
34 #include "../platform/WebCommon.h" | 34 #include "WebCommon.h" |
35 #include "../platform/WebURL.h" | 35 #include "WebURL.h" |
36 #include "../platform/WebVector.h" | 36 #include "WebVector.h" |
37 | 37 |
38 namespace blink { | 38 namespace blink { |
39 | 39 |
40 class WebApplicationCacheHostClient; | 40 class WebApplicationCacheHostClient; |
41 class WebFrame; | 41 class WebFrame; |
42 class WebURL; | 42 class WebURL; |
43 class WebURLRequest; | 43 class WebURLRequest; |
44 class WebURLResponse; | 44 class WebURLResponse; |
45 struct WebURLError; | 45 struct WebURLError; |
46 | 46 |
(...skipping 21 matching lines...) Expand all Loading... |
68 ProgressEvent, | 68 ProgressEvent, |
69 UpdateReadyEvent, | 69 UpdateReadyEvent, |
70 CachedEvent, | 70 CachedEvent, |
71 ObsoleteEvent | 71 ObsoleteEvent |
72 }; | 72 }; |
73 | 73 |
74 virtual ~WebApplicationCacheHost() { } | 74 virtual ~WebApplicationCacheHost() { } |
75 | 75 |
76 // Called for every request made within the context. | 76 // Called for every request made within the context. |
77 virtual void willStartMainResourceRequest(WebURLRequest& r, const WebApplica
tionCacheHost* spawningHost) { } | 77 virtual void willStartMainResourceRequest(WebURLRequest& r, const WebApplica
tionCacheHost* spawningHost) { } |
| 78 virtual void willStartSubResourceRequest(WebURLRequest&) { } |
| 79 |
| 80 // FIXME: Only needed to keep clang happy until Chromium stops overriding it
. |
78 virtual void willStartMainResourceRequest(WebURLRequest& r, const WebFrame*)
{ } | 81 virtual void willStartMainResourceRequest(WebURLRequest& r, const WebFrame*)
{ } |
79 virtual void willStartSubResourceRequest(WebURLRequest&) { } | |
80 | 82 |
81 // One or the other selectCache methods is called after having parsed the <h
tml> tag. | 83 // One or the other selectCache methods is called after having parsed the <h
tml> tag. |
82 // The latter returns false if the current document has been identified as a
"foreign" | 84 // The latter returns false if the current document has been identified as a
"foreign" |
83 // entry, in which case the frame navigation will be restarted by webkit. | 85 // entry, in which case the frame navigation will be restarted by webkit. |
84 virtual void selectCacheWithoutManifest() { } | 86 virtual void selectCacheWithoutManifest() { } |
85 virtual bool selectCacheWithManifest(const WebURL& manifestURL) { return tru
e; } | 87 virtual bool selectCacheWithManifest(const WebURL& manifestURL) { return tru
e; } |
86 | 88 |
87 // Called as the main resource is retrieved. | 89 // Called as the main resource is retrieved. |
88 virtual void didReceiveResponseForMainResource(const WebURLResponse&) { } | 90 virtual void didReceiveResponseForMainResource(const WebURLResponse&) { } |
89 virtual void didReceiveDataForMainResource(const char* data, int len) { } | 91 virtual void didReceiveDataForMainResource(const char* data, int len) { } |
(...skipping 21 matching lines...) Expand all Loading... |
111 bool isExplicit; | 113 bool isExplicit; |
112 bool isForeign; | 114 bool isForeign; |
113 bool isFallback; | 115 bool isFallback; |
114 ResourceInfo() : size(0), isMaster(false), isManifest(false), isExplicit
(false), isForeign(false), isFallback(false) { } | 116 ResourceInfo() : size(0), isMaster(false), isManifest(false), isExplicit
(false), isForeign(false), isFallback(false) { } |
115 }; | 117 }; |
116 virtual void getAssociatedCacheInfo(CacheInfo*) { } | 118 virtual void getAssociatedCacheInfo(CacheInfo*) { } |
117 virtual void getResourceList(WebVector<ResourceInfo>*) { } | 119 virtual void getResourceList(WebVector<ResourceInfo>*) { } |
118 virtual void deleteAssociatedCacheGroup() { } | 120 virtual void deleteAssociatedCacheGroup() { } |
119 }; | 121 }; |
120 | 122 |
121 } // namespace blink | 123 } // namespace blink |
122 | 124 |
123 #endif // WebApplicationCacheHost_h | 125 #endif // WebApplicationCacheHost_h |
OLD | NEW |