| 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 virtual void reportResourceTimingToClients(const ResourceTimingInfo&) { } | 186 virtual void reportResourceTimingToClients(const ResourceTimingInfo&) { } |
| 187 | 187 |
| 188 // Sets the serialized metadata retrieved from the platform's cache. | 188 // Sets the serialized metadata retrieved from the platform's cache. |
| 189 virtual void setSerializedCachedMetadata(const char*, size_t); | 189 virtual void setSerializedCachedMetadata(const char*, size_t); |
| 190 | 190 |
| 191 // This may return nullptr when the resource isn't cacheable. | 191 // This may return nullptr when the resource isn't cacheable. |
| 192 CachedMetadataHandler* cacheHandler(); | 192 CachedMetadataHandler* cacheHandler(); |
| 193 | 193 |
| 194 String reasonNotDeletable() const; | 194 String reasonNotDeletable() const; |
| 195 | 195 |
| 196 // List of acceptable MIME types separated by ",". | |
| 197 // A MIME type may contain a wildcard, e.g. "text/*". | |
| 198 AtomicString accept() const { return m_accept; } | |
| 199 void setAccept(const AtomicString& accept) { m_accept = accept; } | |
| 200 | |
| 201 AtomicString httpContentType() const; | 196 AtomicString httpContentType() const; |
| 202 | 197 |
| 203 bool wasCanceled() const { return m_error.isCancellation(); } | 198 bool wasCanceled() const { return m_error.isCancellation(); } |
| 204 bool errorOccurred() const { return m_status == LoadError || m_status == Dec
odeError; } | 199 bool errorOccurred() const { return m_status == LoadError || m_status == Dec
odeError; } |
| 205 bool loadFailedOrCanceled() { return !m_error.isNull(); } | 200 bool loadFailedOrCanceled() { return !m_error.isNull(); } |
| 206 | 201 |
| 207 DataBufferingPolicy getDataBufferingPolicy() const { return m_options.dataBu
fferingPolicy; } | 202 DataBufferingPolicy getDataBufferingPolicy() const { return m_options.dataBu
fferingPolicy; } |
| 208 void setDataBufferingPolicy(DataBufferingPolicy); | 203 void setDataBufferingPolicy(DataBufferingPolicy); |
| 209 | 204 |
| 210 bool isUnusedPreload() const { return isPreloaded() && getPreloadResult() ==
PreloadNotReferenced; } | 205 bool isUnusedPreload() const { return isPreloaded() && getPreloadResult() ==
PreloadNotReferenced; } |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 virtual bool isSafeToUnlock() const { return false; } | 286 virtual bool isSafeToUnlock() const { return false; } |
| 292 virtual void destroyDecodedDataIfPossible() { } | 287 virtual void destroyDecodedDataIfPossible() { } |
| 293 | 288 |
| 294 void markClientsFinished(); | 289 void markClientsFinished(); |
| 295 | 290 |
| 296 // Returns the memory dump name used for tracing. See Resource::onMemoryDump
. | 291 // Returns the memory dump name used for tracing. See Resource::onMemoryDump
. |
| 297 String getMemoryDumpName() const; | 292 String getMemoryDumpName() const; |
| 298 | 293 |
| 299 ResourceRequest m_resourceRequest; | 294 ResourceRequest m_resourceRequest; |
| 300 ResourceRequest m_revalidatingRequest; | 295 ResourceRequest m_revalidatingRequest; |
| 301 AtomicString m_accept; | |
| 302 Member<ResourceLoader> m_loader; | 296 Member<ResourceLoader> m_loader; |
| 303 ResourceLoaderOptions m_options; | 297 ResourceLoaderOptions m_options; |
| 304 | 298 |
| 305 ResourceResponse m_response; | 299 ResourceResponse m_response; |
| 306 double m_responseTimestamp; | 300 double m_responseTimestamp; |
| 307 | 301 |
| 308 RefPtr<SharedBuffer> m_data; | 302 RefPtr<SharedBuffer> m_data; |
| 309 Timer<Resource> m_cancelTimer; | 303 Timer<Resource> m_cancelTimer; |
| 310 | 304 |
| 311 private: | 305 private: |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 Resource::Type m_type; | 370 Resource::Type m_type; |
| 377 }; | 371 }; |
| 378 | 372 |
| 379 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ | 373 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ |
| 380 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->getType(
) == Resource::typeName, resource.getType() == Resource::typeName); \ | 374 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->getType(
) == Resource::typeName, resource.getType() == Resource::typeName); \ |
| 381 inline typeName##Resource* to##typeName##Resource(const RawPtr<Resource>& pt
r) { return to##typeName##Resource(ptr.get()); } | 375 inline typeName##Resource* to##typeName##Resource(const RawPtr<Resource>& pt
r) { return to##typeName##Resource(ptr.get()); } |
| 382 | 376 |
| 383 } // namespace blink | 377 } // namespace blink |
| 384 | 378 |
| 385 #endif | 379 #endif |
| OLD | NEW |