| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 | 115 |
| 116 bool isImage() const override { return true; } | 116 bool isImage() const override { return true; } |
| 117 | 117 |
| 118 // ImageObserver | 118 // ImageObserver |
| 119 void decodedSizeChangedTo(const blink::Image*, size_t newSize) override; | 119 void decodedSizeChangedTo(const blink::Image*, size_t newSize) override; |
| 120 void didDraw(const blink::Image*) override; | 120 void didDraw(const blink::Image*) override; |
| 121 | 121 |
| 122 bool shouldPauseAnimation(const blink::Image*) override; | 122 bool shouldPauseAnimation(const blink::Image*) override; |
| 123 void animationAdvanced(const blink::Image*) override; | 123 void animationAdvanced(const blink::Image*) override; |
| 124 void changedInRect(const blink::Image*, const IntRect&) override; | 124 void changedInRect(const blink::Image*, const IntRect&) override; |
| 125 void requireReloading(const blink::Image*) override; |
| 125 | 126 |
| 126 // MultipartImageResourceParser::Client | 127 // MultipartImageResourceParser::Client |
| 127 void onePartInMultipartReceived(const ResourceResponse&) final; | 128 void onePartInMultipartReceived(const ResourceResponse&) final; |
| 128 void multipartDataReceived(const char*, size_t) final; | 129 void multipartDataReceived(const char*, size_t) final; |
| 129 | 130 |
| 130 DECLARE_VIRTUAL_TRACE(); | 131 DECLARE_VIRTUAL_TRACE(); |
| 131 | 132 |
| 132 private: | 133 private: |
| 133 explicit ImageResource(blink::Image*, const ResourceLoaderOptions&); | 134 explicit ImageResource(blink::Image*, const ResourceLoaderOptions&); |
| 134 | 135 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 163 void ensureImage(); | 164 void ensureImage(); |
| 164 | 165 |
| 165 void checkNotify() override; | 166 void checkNotify() override; |
| 166 void notifyObserversInternal(MarkFinishedOption); | 167 void notifyObserversInternal(MarkFinishedOption); |
| 167 void markObserverFinished(ImageResourceObserver*); | 168 void markObserverFinished(ImageResourceObserver*); |
| 168 | 169 |
| 169 void doResetAnimation(); | 170 void doResetAnimation(); |
| 170 | 171 |
| 171 void destroyDecodedDataIfPossible() override; | 172 void destroyDecodedDataIfPossible() override; |
| 172 void destroyDecodedDataForFailedRevalidation() override; | 173 void destroyDecodedDataForFailedRevalidation() override; |
| 174 void myPrune() override; |
| 173 | 175 |
| 174 float m_devicePixelRatioHeaderValue; | 176 float m_devicePixelRatioHeaderValue; |
| 175 | 177 |
| 176 Member<MultipartImageResourceParser> m_multipartParser; | 178 Member<MultipartImageResourceParser> m_multipartParser; |
| 177 RefPtr<blink::Image> m_image; | 179 RefPtr<blink::Image> m_image; |
| 178 MultipartParsingState m_multipartParsingState = MultipartParsingState::Waiti
ngForFirstPart; | 180 MultipartParsingState m_multipartParsingState = MultipartParsingState::Waiti
ngForFirstPart; |
| 179 bool m_hasDevicePixelRatioHeaderValue; | 181 bool m_hasDevicePixelRatioHeaderValue; |
| 180 HashCountedSet<ImageResourceObserver*> m_observers; | 182 HashCountedSet<ImageResourceObserver*> m_observers; |
| 181 HashCountedSet<ImageResourceObserver*> m_finishedObservers; | 183 HashCountedSet<ImageResourceObserver*> m_finishedObservers; |
| 182 }; | 184 }; |
| 183 | 185 |
| 184 DEFINE_RESOURCE_TYPE_CASTS(Image); | 186 DEFINE_RESOURCE_TYPE_CASTS(Image); |
| 185 | 187 |
| 186 } // namespace blink | 188 } // namespace blink |
| 187 | 189 |
| 188 #endif | 190 #endif |
| OLD | NEW |