| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 CacheLiveResourcePriorityHigh | 90 CacheLiveResourcePriorityHigh |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 virtual void load(ResourceFetcher*, const ResourceLoaderOptions&); | 93 virtual void load(ResourceFetcher*, const ResourceLoaderOptions&); |
| 94 | 94 |
| 95 virtual void setEncoding(const String&) { } | 95 virtual void setEncoding(const String&) { } |
| 96 virtual String encoding() const { return String(); } | 96 virtual String encoding() const { return String(); } |
| 97 virtual void appendData(const char*, int); | 97 virtual void appendData(const char*, int); |
| 98 virtual void error(Resource::Status); | 98 virtual void error(Resource::Status); |
| 99 | 99 |
| 100 void setNeedsSynchronousCacheHit(bool needsSynchronousCacheHit) { m_needsSyn
chronousCacheHit = needsSynchronousCacheHit; } |
| 101 |
| 100 void setResourceError(const ResourceError& error) { m_error = error; } | 102 void setResourceError(const ResourceError& error) { m_error = error; } |
| 101 const ResourceError& resourceError() const { return m_error; } | 103 const ResourceError& resourceError() const { return m_error; } |
| 102 | 104 |
| 103 void setIdentifier(unsigned long identifier) { m_identifier = identifier; } | 105 void setIdentifier(unsigned long identifier) { m_identifier = identifier; } |
| 104 unsigned long identifier() const { return m_identifier; } | 106 unsigned long identifier() const { return m_identifier; } |
| 105 | 107 |
| 106 virtual bool shouldIgnoreHTTPStatusCodeErrors() const { return false; } | 108 virtual bool shouldIgnoreHTTPStatusCodeErrors() const { return false; } |
| 107 | 109 |
| 108 ResourceRequest& resourceRequest() { return m_resourceRequest; } | 110 ResourceRequest& resourceRequest() { return m_resourceRequest; } |
| 109 const KURL& url() const { return m_resourceRequest.url();} | 111 const KURL& url() const { return m_resourceRequest.url();} |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 unsigned m_requestedFromNetworkingLayer : 1; | 356 unsigned m_requestedFromNetworkingLayer : 1; |
| 355 | 357 |
| 356 unsigned m_inCache : 1; | 358 unsigned m_inCache : 1; |
| 357 unsigned m_loading : 1; | 359 unsigned m_loading : 1; |
| 358 | 360 |
| 359 unsigned m_switchingClientsToRevalidatedResource : 1; | 361 unsigned m_switchingClientsToRevalidatedResource : 1; |
| 360 | 362 |
| 361 unsigned m_type : 4; // Type | 363 unsigned m_type : 4; // Type |
| 362 unsigned m_status : 3; // Status | 364 unsigned m_status : 3; // Status |
| 363 | 365 |
| 366 bool m_needsSynchronousCacheHit : 1; |
| 367 |
| 364 #ifndef NDEBUG | 368 #ifndef NDEBUG |
| 365 bool m_deleted; | 369 bool m_deleted; |
| 366 unsigned m_lruIndex; | 370 unsigned m_lruIndex; |
| 367 #endif | 371 #endif |
| 368 | 372 |
| 369 Resource* m_nextInAllResourcesList; | 373 Resource* m_nextInAllResourcesList; |
| 370 Resource* m_prevInAllResourcesList; | 374 Resource* m_prevInAllResourcesList; |
| 371 | 375 |
| 372 Resource* m_nextInLiveResourcesList; | 376 Resource* m_nextInLiveResourcesList; |
| 373 Resource* m_prevInLiveResourcesList; | 377 Resource* m_prevInLiveResourcesList; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 390 const char* ResourceTypeName(Resource::Type); | 394 const char* ResourceTypeName(Resource::Type); |
| 391 #endif | 395 #endif |
| 392 | 396 |
| 393 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ | 397 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ |
| 394 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->type() =
= Resource::typeName, resource.type() == Resource::typeName); \ | 398 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->type() =
= Resource::typeName, resource.type() == Resource::typeName); \ |
| 395 inline typeName##Resource* to##typeName##Resource(const ResourcePtr<Resource
>& ptr) { return to##typeName##Resource(ptr.get()); } | 399 inline typeName##Resource* to##typeName##Resource(const ResourcePtr<Resource
>& ptr) { return to##typeName##Resource(ptr.get()); } |
| 396 | 400 |
| 397 } | 401 } |
| 398 | 402 |
| 399 #endif | 403 #endif |
| OLD | NEW |