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) 2002 Waldo Bastian (bastian@kde.org) | 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) |
5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 6 Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 | 127 |
128 class ImageResource::ImageResourceFactory : public ResourceFactory { | 128 class ImageResource::ImageResourceFactory : public ResourceFactory { |
129 STACK_ALLOCATED(); | 129 STACK_ALLOCATED(); |
130 | 130 |
131 public: | 131 public: |
132 ImageResourceFactory(const FetchParameters& fetch_params) | 132 ImageResourceFactory(const FetchParameters& fetch_params) |
133 : ResourceFactory(Resource::kImage), fetch_params_(&fetch_params) {} | 133 : ResourceFactory(Resource::kImage), fetch_params_(&fetch_params) {} |
134 | 134 |
135 Resource* Create(const ResourceRequest& request, | 135 Resource* Create(const ResourceRequest& request, |
136 const ResourceLoaderOptions& options, | 136 const ResourceLoaderOptions& options, |
137 const String&) const override { | 137 const String&, |
| 138 FetchContext*) const override { |
138 return new ImageResource(request, options, ImageResourceContent::Create(), | 139 return new ImageResource(request, options, ImageResourceContent::Create(), |
139 fetch_params_->GetPlaceholderImageRequestType() == | 140 fetch_params_->GetPlaceholderImageRequestType() == |
140 FetchParameters::kAllowPlaceholder); | 141 FetchParameters::kAllowPlaceholder); |
141 } | 142 } |
142 | 143 |
143 private: | 144 private: |
144 // Weak, unowned pointer. Must outlive |this|. | 145 // Weak, unowned pointer. Must outlive |this|. |
145 const FetchParameters* fetch_params_; | 146 const FetchParameters* fetch_params_; |
146 }; | 147 }; |
147 | 148 |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 // reloading in Step 3 due to notifyObservers()'s | 595 // reloading in Step 3 due to notifyObservers()'s |
595 // schedulingReloadOrShouldReloadBrokenPlaceholder() check. | 596 // schedulingReloadOrShouldReloadBrokenPlaceholder() check. |
596 // 3. reloadIfLoFiOrPlaceholderImage() is called via ResourceFetcher | 597 // 3. reloadIfLoFiOrPlaceholderImage() is called via ResourceFetcher |
597 // (a) via didFinishLoading() called in decodeError(), or | 598 // (a) via didFinishLoading() called in decodeError(), or |
598 // (b) after returning ImageResource::updateImage(). | 599 // (b) after returning ImageResource::updateImage(). |
599 DecodeError(all_data_received); | 600 DecodeError(all_data_received); |
600 } | 601 } |
601 } | 602 } |
602 | 603 |
603 } // namespace blink | 604 } // namespace blink |
OLD | NEW |