| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 class ResourceTimingInfo; | 54 class ResourceTimingInfo; |
| 55 class InspectorResource; | 55 class InspectorResource; |
| 56 class ResourceLoader; | 56 class ResourceLoader; |
| 57 class SecurityOrigin; | 57 class SecurityOrigin; |
| 58 class SharedBuffer; | 58 class SharedBuffer; |
| 59 | 59 |
| 60 // A resource that is held in the cache. Classes who want to use this object sho
uld derive | 60 // A resource that is held in the cache. Classes who want to use this object sho
uld derive |
| 61 // from ResourceClient, to get the function calls in case the requested data has
arrived. | 61 // from ResourceClient, to get the function calls in case the requested data has
arrived. |
| 62 // This class also does the actual communication with the loader to obtain the r
esource from the network. | 62 // This class also does the actual communication with the loader to obtain the r
esource from the network. |
| 63 class CORE_EXPORT Resource : public NoBaseWillBeGarbageCollectedFinalized<Resour
ce> { | 63 class CORE_EXPORT Resource : public NoBaseWillBeGarbageCollectedFinalized<Resour
ce> { |
| 64 WTF_MAKE_NONCOPYABLE(Resource); USING_FAST_MALLOC_WILL_BE_REMOVED(Resource); | 64 WTF_MAKE_NONCOPYABLE(Resource); |
| 65 USING_FAST_MALLOC_WITH_TYPE_NAME_WILL_BE_REMOVED(blink::Resource); |
| 65 friend class InspectorResource; | 66 friend class InspectorResource; |
| 66 | 67 |
| 67 public: | 68 public: |
| 68 enum Type { | 69 enum Type { |
| 69 MainResource, | 70 MainResource, |
| 70 Image, | 71 Image, |
| 71 CSSStyleSheet, | 72 CSSStyleSheet, |
| 72 Script, | 73 Script, |
| 73 Font, | 74 Font, |
| 74 Raw, | 75 Raw, |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 const char* ResourceTypeName(Resource::Type); | 440 const char* ResourceTypeName(Resource::Type); |
| 440 #endif | 441 #endif |
| 441 | 442 |
| 442 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ | 443 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ |
| 443 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->type() =
= Resource::typeName, resource.type() == Resource::typeName); \ | 444 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->type() =
= Resource::typeName, resource.type() == Resource::typeName); \ |
| 444 inline typeName##Resource* to##typeName##Resource(const ResourcePtr<Resource
>& ptr) { return to##typeName##Resource(ptr.get()); } | 445 inline typeName##Resource* to##typeName##Resource(const ResourcePtr<Resource
>& ptr) { return to##typeName##Resource(ptr.get()); } |
| 445 | 446 |
| 446 } | 447 } |
| 447 | 448 |
| 448 #endif | 449 #endif |
| OLD | NEW |