| 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 virtual void reportResourceTimingToClients(const ResourceTimingInfo&) { } | 187 virtual void reportResourceTimingToClients(const ResourceTimingInfo&) { } |
| 188 | 188 |
| 189 // Sets the serialized metadata retrieved from the platform's cache. | 189 // Sets the serialized metadata retrieved from the platform's cache. |
| 190 virtual void setSerializedCachedMetadata(const char*, size_t); | 190 virtual void setSerializedCachedMetadata(const char*, size_t); |
| 191 | 191 |
| 192 // This may return nullptr when the resource isn't cacheable. | 192 // This may return nullptr when the resource isn't cacheable. |
| 193 CachedMetadataHandler* cacheHandler(); | 193 CachedMetadataHandler* cacheHandler(); |
| 194 | 194 |
| 195 String reasonNotDeletable() const; | 195 String reasonNotDeletable() const; |
| 196 | 196 |
| 197 // List of acceptable MIME types separated by ",". | |
| 198 // A MIME type may contain a wildcard, e.g. "text/*". | |
| 199 AtomicString accept() const { return m_accept; } | |
| 200 void setAccept(const AtomicString& accept) { m_accept = accept; } | |
| 201 | |
| 202 AtomicString httpContentType() const; | 197 AtomicString httpContentType() const; |
| 203 | 198 |
| 204 bool wasCanceled() const { return m_error.isCancellation(); } | 199 bool wasCanceled() const { return m_error.isCancellation(); } |
| 205 bool errorOccurred() const { return m_status == LoadError || m_status == Dec
odeError; } | 200 bool errorOccurred() const { return m_status == LoadError || m_status == Dec
odeError; } |
| 206 bool loadFailedOrCanceled() { return !m_error.isNull(); } | 201 bool loadFailedOrCanceled() { return !m_error.isNull(); } |
| 207 | 202 |
| 208 DataBufferingPolicy getDataBufferingPolicy() const { return m_options.dataBu
fferingPolicy; } | 203 DataBufferingPolicy getDataBufferingPolicy() const { return m_options.dataBu
fferingPolicy; } |
| 209 void setDataBufferingPolicy(DataBufferingPolicy); | 204 void setDataBufferingPolicy(DataBufferingPolicy); |
| 210 | 205 |
| 211 bool isUnusedPreload() const { return isPreloaded() && getPreloadResult() ==
PreloadNotReferenced; } | 206 bool isUnusedPreload() const { return isPreloaded() && getPreloadResult() ==
PreloadNotReferenced; } |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 virtual bool isSafeToUnlock() const { return false; } | 301 virtual bool isSafeToUnlock() const { return false; } |
| 307 virtual void destroyDecodedDataIfPossible() { } | 302 virtual void destroyDecodedDataIfPossible() { } |
| 308 | 303 |
| 309 void markClientsFinished(); | 304 void markClientsFinished(); |
| 310 | 305 |
| 311 // Returns the memory dump name used for tracing. See Resource::onMemoryDump
. | 306 // Returns the memory dump name used for tracing. See Resource::onMemoryDump
. |
| 312 String getMemoryDumpName() const; | 307 String getMemoryDumpName() const; |
| 313 | 308 |
| 314 ResourceRequest m_resourceRequest; | 309 ResourceRequest m_resourceRequest; |
| 315 ResourceRequest m_revalidatingRequest; | 310 ResourceRequest m_revalidatingRequest; |
| 316 AtomicString m_accept; | |
| 317 PersistentWillBeMember<ResourceLoader> m_loader; | 311 PersistentWillBeMember<ResourceLoader> m_loader; |
| 318 ResourceLoaderOptions m_options; | 312 ResourceLoaderOptions m_options; |
| 319 | 313 |
| 320 ResourceResponse m_response; | 314 ResourceResponse m_response; |
| 321 double m_responseTimestamp; | 315 double m_responseTimestamp; |
| 322 | 316 |
| 323 RefPtr<SharedBuffer> m_data; | 317 RefPtr<SharedBuffer> m_data; |
| 324 Timer<Resource> m_cancelTimer; | 318 Timer<Resource> m_cancelTimer; |
| 325 | 319 |
| 326 private: | 320 private: |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 Resource::Type m_type; | 374 Resource::Type m_type; |
| 381 }; | 375 }; |
| 382 | 376 |
| 383 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ | 377 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ |
| 384 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->getType(
) == Resource::typeName, resource.getType() == Resource::typeName); \ | 378 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->getType(
) == Resource::typeName, resource.getType() == Resource::typeName); \ |
| 385 inline typeName##Resource* to##typeName##Resource(const RefPtrWillBeRawPtr<R
esource>& ptr) { return to##typeName##Resource(ptr.get()); } | 379 inline typeName##Resource* to##typeName##Resource(const RefPtrWillBeRawPtr<R
esource>& ptr) { return to##typeName##Resource(ptr.get()); } |
| 386 | 380 |
| 387 } // namespace blink | 381 } // namespace blink |
| 388 | 382 |
| 389 #endif | 383 #endif |
| OLD | NEW |