| 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 Apple Inc. All rights reserved. | 5 Copyright (C) 2004, 2005, 2006, 2007 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 22 matching lines...) Expand all Loading... |
| 33 public: | 33 public: |
| 34 typedef RawResourceClient ClientType; | 34 typedef RawResourceClient ClientType; |
| 35 | 35 |
| 36 RawResource(const ResourceRequest&, Type); | 36 RawResource(const ResourceRequest&, Type); |
| 37 | 37 |
| 38 // FIXME: AssociatedURLLoader shouldn't be a DocumentThreadableLoader and th
erefore shouldn't | 38 // FIXME: AssociatedURLLoader shouldn't be a DocumentThreadableLoader and th
erefore shouldn't |
| 39 // use RawResource. However, it is, and it needs to be able to defer loading
. | 39 // use RawResource. However, it is, and it needs to be able to defer loading
. |
| 40 // This can be fixed by splitting CORS preflighting out of DocumentThreacabl
eLoader. | 40 // This can be fixed by splitting CORS preflighting out of DocumentThreacabl
eLoader. |
| 41 void setDefersLoading(bool); | 41 void setDefersLoading(bool); |
| 42 | 42 |
| 43 virtual bool canReuse(const ResourceRequest&) const override; | 43 bool canReuse(const ResourceRequest&) const override; |
| 44 | 44 |
| 45 private: | 45 private: |
| 46 virtual void didAddClient(ResourceClient*) override; | 46 void didAddClient(ResourceClient*) override; |
| 47 virtual void appendData(const char*, unsigned) override; | 47 void appendData(const char*, unsigned) override; |
| 48 | 48 |
| 49 virtual bool shouldIgnoreHTTPStatusCodeErrors() const override { return true
; } | 49 bool shouldIgnoreHTTPStatusCodeErrors() const override { return true; } |
| 50 | 50 |
| 51 virtual void willSendRequest(ResourceRequest&, const ResourceResponse&) over
ride; | 51 void willFollowRedirect(ResourceRequest&, const ResourceResponse&) override; |
| 52 virtual void updateRequest(const ResourceRequest&) override; | 52 void updateRequest(const ResourceRequest&) override; |
| 53 virtual void responseReceived(const ResourceResponse&) override; | 53 void responseReceived(const ResourceResponse&) override; |
| 54 virtual void didSendData(unsigned long long bytesSent, unsigned long long to
talBytesToBeSent) override; | 54 void didSendData(unsigned long long bytesSent, unsigned long long totalBytes
ToBeSent) override; |
| 55 virtual void didDownloadData(int) override; | 55 void didDownloadData(int) override; |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 #if ENABLE(SECURITY_ASSERT) | 58 #if ENABLE(SECURITY_ASSERT) |
| 59 inline bool isRawResource(const Resource& resource) | 59 inline bool isRawResource(const Resource& resource) |
| 60 { | 60 { |
| 61 Resource::Type type = resource.type(); | 61 Resource::Type type = resource.type(); |
| 62 return type == Resource::MainResource || type == Resource::Raw || type == Re
source::TextTrack || type == Resource::Media || type == Resource::ImportResource
; | 62 return type == Resource::MainResource || type == Resource::Raw || type == Re
source::TextTrack || type == Resource::Media || type == Resource::ImportResource
; |
| 63 } | 63 } |
| 64 #endif | 64 #endif |
| 65 inline RawResource* toRawResource(const ResourcePtr<Resource>& resource) | 65 inline RawResource* toRawResource(const ResourcePtr<Resource>& resource) |
| (...skipping 12 matching lines...) Expand all Loading... |
| 78 virtual void responseReceived(Resource*, const ResourceResponse&) { } | 78 virtual void responseReceived(Resource*, const ResourceResponse&) { } |
| 79 virtual void dataReceived(Resource*, const char* /* data */, unsigned /* len
gth */) { } | 79 virtual void dataReceived(Resource*, const char* /* data */, unsigned /* len
gth */) { } |
| 80 virtual void redirectReceived(Resource*, ResourceRequest&, const ResourceRes
ponse&) { } | 80 virtual void redirectReceived(Resource*, ResourceRequest&, const ResourceRes
ponse&) { } |
| 81 virtual void updateRequest(Resource*, const ResourceRequest&) { } | 81 virtual void updateRequest(Resource*, const ResourceRequest&) { } |
| 82 virtual void dataDownloaded(Resource*, int) { } | 82 virtual void dataDownloaded(Resource*, int) { } |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 } | 85 } |
| 86 | 86 |
| 87 #endif // RawResource_h | 87 #endif // RawResource_h |
| OLD | NEW |