| 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 | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
| 6 rights reserved. | 6 rights reserved. |
| 7 | 7 |
| 8 This library is free software; you can redistribute it and/or | 8 This library is free software; you can redistribute it and/or |
| 9 modify it under the terms of the GNU Library General Public | 9 modify it under the terms of the GNU Library General Public |
| 10 License as published by the Free Software Foundation; either | 10 License as published by the Free Software Foundation; either |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 DecodeError | 91 DecodeError |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 // Whether a resource client for a preload should mark the preload as | 94 // Whether a resource client for a preload should mark the preload as |
| 95 // referenced. | 95 // referenced. |
| 96 enum PreloadReferencePolicy { | 96 enum PreloadReferencePolicy { |
| 97 MarkAsReferenced, | 97 MarkAsReferenced, |
| 98 DontMarkAsReferenced, | 98 DontMarkAsReferenced, |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 // Exposed for testing. | |
| 102 static Resource* create( | |
| 103 const ResourceRequest& request, | |
| 104 Type type, | |
| 105 const ResourceLoaderOptions& options = ResourceLoaderOptions()) { | |
| 106 return new Resource(request, type, options); | |
| 107 } | |
| 108 virtual ~Resource(); | 101 virtual ~Resource(); |
| 109 | 102 |
| 110 DECLARE_VIRTUAL_TRACE(); | 103 DECLARE_VIRTUAL_TRACE(); |
| 111 | 104 |
| 112 virtual void setEncoding(const String&) {} | 105 virtual void setEncoding(const String&) {} |
| 113 virtual String encoding() const { return String(); } | 106 virtual String encoding() const { return String(); } |
| 114 virtual void appendData(const char*, size_t); | 107 virtual void appendData(const char*, size_t); |
| 115 virtual void error(const ResourceError&); | 108 virtual void error(const ResourceError&); |
| 116 virtual void setCORSFailed() {} | 109 virtual void setCORSFailed() {} |
| 117 | 110 |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 }; | 443 }; |
| 451 | 444 |
| 452 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ | 445 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ |
| 453 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, \ | 446 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, \ |
| 454 resource->getType() == Resource::typeName, \ | 447 resource->getType() == Resource::typeName, \ |
| 455 resource.getType() == Resource::typeName); | 448 resource.getType() == Resource::typeName); |
| 456 | 449 |
| 457 } // namespace blink | 450 } // namespace blink |
| 458 | 451 |
| 459 #endif | 452 #endif |
| OLD | NEW |