OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2009, Google Inc. All rights reserved. | 2 * Copyright (c) 2009, 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 }; | 104 }; |
105 | 105 |
106 typedef Vector<ResourceInfo> ResourceInfoList; | 106 typedef Vector<ResourceInfo> ResourceInfoList; |
107 | 107 |
108 ApplicationCacheHost(DocumentLoader*); | 108 ApplicationCacheHost(DocumentLoader*); |
109 ~ApplicationCacheHost(); | 109 ~ApplicationCacheHost(); |
110 | 110 |
111 void selectCacheWithoutManifest(); | 111 void selectCacheWithoutManifest(); |
112 void selectCacheWithManifest(const KURL& manifestURL); | 112 void selectCacheWithManifest(const KURL& manifestURL); |
113 | 113 |
114 void maybeLoadMainResource(ResourceRequest&, SubstituteData&); | 114 void willStartLoadingMainResource(ResourceRequest&); |
115 void maybeLoadMainResourceForRedirect(ResourceRequest&, SubstituteData&)
; | 115 void didReceiveResponseForMainResource(const ResourceResponse&); |
116 void maybeLoadFallbackForMainResponse(const ResourceRequest&, const Reso
urceResponse&); | 116 void mainResourceDataReceived(const char* data, int length); |
117 bool maybeLoadFallbackForMainError(const ResourceRequest&, const Resourc
eError&); | |
118 void mainResourceDataReceived(const char* data, int length, long long en
codedDataLength, bool allAtOnce); | |
119 void finishedLoadingMainResource(); | 117 void finishedLoadingMainResource(); |
120 void failedLoadingMainResource(); | 118 void failedLoadingMainResource(); |
121 | 119 |
122 bool maybeLoadResource(ResourceLoader*, ResourceRequest&, const KURL& or
iginalURL); | 120 void willStartLoadingResource(ResourceRequest&); |
123 bool maybeLoadFallbackForRedirect(ResourceLoader*, ResourceRequest&, con
st ResourceResponse&); | 121 void willStartLoadingSynchronously(ResourceRequest&); |
124 bool maybeLoadFallbackForResponse(ResourceLoader*, const ResourceRespons
e&); | |
125 bool maybeLoadFallbackForError(ResourceLoader*, const ResourceError&); | |
126 | |
127 bool maybeLoadSynchronously(ResourceRequest&, ResourceError&, ResourceRe
sponse&, Vector<char>& data); | |
128 void maybeLoadFallbackSynchronously(const ResourceRequest&, ResourceErro
r&, ResourceResponse&, Vector<char>& data); | |
129 | 122 |
130 Status status() const; | 123 Status status() const; |
131 bool update(); | 124 bool update(); |
132 bool swapCache(); | 125 bool swapCache(); |
133 void abort(); | 126 void abort(); |
134 | 127 |
135 void setDOMApplicationCache(DOMApplicationCache*); | 128 void setDOMApplicationCache(DOMApplicationCache*); |
136 void notifyDOMApplicationCache(EventID, int progressTotal, int progressD
one); | 129 void notifyDOMApplicationCache(EventID, int progressTotal, int progressD
one); |
137 | 130 |
138 void stopLoadingInFrame(Frame*); | |
139 | |
140 void stopDeferringEvents(); // Also raises the events that have been que
ued up. | 131 void stopDeferringEvents(); // Also raises the events that have been que
ued up. |
141 | 132 |
142 void fillResourceList(ResourceInfoList*); | 133 void fillResourceList(ResourceInfoList*); |
143 CacheInfo applicationCacheInfo(); | 134 CacheInfo applicationCacheInfo(); |
144 | 135 |
145 private: | 136 private: |
146 bool isApplicationCacheEnabled(); | 137 bool isApplicationCacheEnabled(); |
147 DocumentLoader* documentLoader() const { return m_documentLoader; } | 138 DocumentLoader* documentLoader() const { return m_documentLoader; } |
148 | 139 |
149 struct DeferredEvent { | 140 struct DeferredEvent { |
(...skipping 10 matching lines...) Expand all Loading... |
160 | 151 |
161 void dispatchDOMEvent(EventID, int progressTotal, int progressDone); | 152 void dispatchDOMEvent(EventID, int progressTotal, int progressDone); |
162 | 153 |
163 friend class ApplicationCacheHostInternal; | 154 friend class ApplicationCacheHostInternal; |
164 OwnPtr<ApplicationCacheHostInternal> m_internal; | 155 OwnPtr<ApplicationCacheHostInternal> m_internal; |
165 }; | 156 }; |
166 | 157 |
167 } // namespace WebCore | 158 } // namespace WebCore |
168 | 159 |
169 #endif // ApplicationCacheHost_h | 160 #endif // ApplicationCacheHost_h |
OLD | NEW |