OLD | NEW |
1 /* | 1 /* |
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org> | 3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org> |
4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. |
6 | 6 |
7 This library is free software; you can redistribute it and/or | 7 This library is free software; you can redistribute it and/or |
8 modify it under the terms of the GNU Library General Public | 8 modify it under the terms of the GNU Library General Public |
9 License as published by the Free Software Foundation; either | 9 License as published by the Free Software Foundation; either |
10 version 2 of the License, or (at your option) any later version. | 10 version 2 of the License, or (at your option) any later version. |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 CSSStyleSheet, | 64 CSSStyleSheet, |
65 Script, | 65 Script, |
66 Font, | 66 Font, |
67 Raw, | 67 Raw, |
68 SVGDocument, | 68 SVGDocument, |
69 XSLStyleSheet, | 69 XSLStyleSheet, |
70 LinkPrefetch, | 70 LinkPrefetch, |
71 LinkSubresource, | 71 LinkSubresource, |
72 TextTrack, | 72 TextTrack, |
73 ImportResource, | 73 ImportResource, |
74 Media // Audio or video file requested by a HTML5 media element | 74 Media, // Audio or video file requested by a HTML5 media element |
| 75 Manifest |
75 }; | 76 }; |
76 | 77 |
77 enum Status { | 78 enum Status { |
78 Unknown, // let cache decide what to do with it | 79 Unknown, // let cache decide what to do with it |
79 Pending, // only partially loaded | 80 Pending, // only partially loaded |
80 Cached, // regular case | 81 Cached, // regular case |
81 LoadError, | 82 LoadError, |
82 DecodeError | 83 DecodeError |
83 }; | 84 }; |
84 | 85 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 ResourceLoader* loader() const { return m_loader.get(); } | 160 ResourceLoader* loader() const { return m_loader.get(); } |
160 | 161 |
161 virtual bool isImage() const { return false; } | 162 virtual bool isImage() const { return false; } |
162 bool ignoreForRequestCount() const | 163 bool ignoreForRequestCount() const |
163 { | 164 { |
164 return type() == MainResource | 165 return type() == MainResource |
165 || type() == LinkPrefetch | 166 || type() == LinkPrefetch |
166 || type() == LinkSubresource | 167 || type() == LinkSubresource |
167 || type() == Media | 168 || type() == Media |
168 || type() == Raw | 169 || type() == Raw |
169 || type() == TextTrack; | 170 || type() == TextTrack |
| 171 || type() == Manifest; |
170 } | 172 } |
171 | 173 |
172 // Computes the status of an object after loading. | 174 // Computes the status of an object after loading. |
173 // Updates the expire date on the cache entry file | 175 // Updates the expire date on the cache entry file |
174 void finish(double finishTime = 0.0); | 176 void finish(double finishTime = 0.0); |
175 | 177 |
176 // FIXME: Remove the stringless variant once all the callsites' error messag
es are updated. | 178 // FIXME: Remove the stringless variant once all the callsites' error messag
es are updated. |
177 bool passesAccessControlCheck(SecurityOrigin*); | 179 bool passesAccessControlCheck(SecurityOrigin*); |
178 bool passesAccessControlCheck(SecurityOrigin*, String& errorDescription); | 180 bool passesAccessControlCheck(SecurityOrigin*, String& errorDescription); |
179 | 181 |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 const char* ResourceTypeName(Resource::Type); | 413 const char* ResourceTypeName(Resource::Type); |
412 #endif | 414 #endif |
413 | 415 |
414 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ | 416 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ |
415 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->type() =
= Resource::typeName, resource.type() == Resource::typeName); \ | 417 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->type() =
= Resource::typeName, resource.type() == Resource::typeName); \ |
416 inline typeName##Resource* to##typeName##Resource(const ResourcePtr<Resource
>& ptr) { return to##typeName##Resource(ptr.get()); } | 418 inline typeName##Resource* to##typeName##Resource(const ResourcePtr<Resource
>& ptr) { return to##typeName##Resource(ptr.get()); } |
417 | 419 |
418 } | 420 } |
419 | 421 |
420 #endif | 422 #endif |
OLD | NEW |