OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ImageResourceContent_h | 5 #ifndef ImageResourceContent_h |
6 #define ImageResourceContent_h | 6 #define ImageResourceContent_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "platform/geometry/IntRect.h" | 9 #include "platform/geometry/IntRect.h" |
10 #include "platform/geometry/IntSizeHash.h" | 10 #include "platform/geometry/IntSizeHash.h" |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 } | 165 } |
166 | 166 |
167 private: | 167 private: |
168 explicit ImageResourceContent(PassRefPtr<blink::Image> = nullptr); | 168 explicit ImageResourceContent(PassRefPtr<blink::Image> = nullptr); |
169 | 169 |
170 // ImageObserver | 170 // ImageObserver |
171 void decodedSizeChangedTo(const blink::Image*, size_t newSize) override; | 171 void decodedSizeChangedTo(const blink::Image*, size_t newSize) override; |
172 bool shouldPauseAnimation(const blink::Image*) override; | 172 bool shouldPauseAnimation(const blink::Image*) override; |
173 void animationAdvanced(const blink::Image*) override; | 173 void animationAdvanced(const blink::Image*) override; |
174 void changedInRect(const blink::Image*, const IntRect&) override; | 174 void changedInRect(const blink::Image*, const IntRect&) override; |
| 175 void loadCompleted(const blink::Image*) override; |
175 | 176 |
176 PassRefPtr<Image> createImage(); | 177 PassRefPtr<Image> createImage(); |
177 void clearImage(); | 178 void clearImage(); |
178 | 179 |
179 enum NotifyFinishOption { ShouldNotifyFinish, DoNotNotifyFinish }; | 180 enum NotifyFinishOption { ShouldNotifyFinish, DoNotNotifyFinish }; |
180 | 181 |
181 // If not null, changeRect is the changed part of the image. | 182 // If not null, changeRect is the changed part of the image. |
182 void notifyObservers(NotifyFinishOption, const IntRect* changeRect = nullptr); | 183 void notifyObservers(NotifyFinishOption, const IntRect* changeRect = nullptr); |
183 void markObserverFinished(ImageResourceObserver*); | 184 void markObserverFinished(ImageResourceObserver*); |
184 void updateStatus(ResourceStatus, NotifyFinishOption); | 185 void updateStatus(ResourceStatus, NotifyFinishOption); |
(...skipping 13 matching lines...) Expand all Loading... |
198 bool m_isRefetchableDataFromDiskCache; | 199 bool m_isRefetchableDataFromDiskCache; |
199 | 200 |
200 #if DCHECK_IS_ON() | 201 #if DCHECK_IS_ON() |
201 bool m_isUpdateImageBeingCalled = false; | 202 bool m_isUpdateImageBeingCalled = false; |
202 #endif | 203 #endif |
203 }; | 204 }; |
204 | 205 |
205 } // namespace blink | 206 } // namespace blink |
206 | 207 |
207 #endif | 208 #endif |
OLD | NEW |