| 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 "core/fetch/ResourceStatus.h" | 9 #include "core/fetch/ResourceStatus.h" |
| 10 #include "platform/geometry/IntRect.h" | 10 #include "platform/geometry/IntRect.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 LayoutSize imageSize( | 78 LayoutSize imageSize( |
| 79 RespectImageOrientationEnum shouldRespectImageOrientation, | 79 RespectImageOrientationEnum shouldRespectImageOrientation, |
| 80 float multiplier, | 80 float multiplier, |
| 81 SizeType = IntrinsicSize); | 81 SizeType = IntrinsicSize); |
| 82 | 82 |
| 83 void updateImageAnimationPolicy(); | 83 void updateImageAnimationPolicy(); |
| 84 | 84 |
| 85 void addObserver(ImageResourceObserver*); | 85 void addObserver(ImageResourceObserver*); |
| 86 void removeObserver(ImageResourceObserver*); | 86 void removeObserver(ImageResourceObserver*); |
| 87 | 87 |
| 88 bool isSizeAvailable() const { |
| 89 return m_sizeAvailable == Image::SizeAvailable; |
| 90 } |
| 91 |
| 88 DECLARE_TRACE(); | 92 DECLARE_TRACE(); |
| 89 | 93 |
| 90 // Redirecting methods to Resource. | 94 // Redirecting methods to Resource. |
| 91 const KURL& url() const; | 95 const KURL& url() const; |
| 92 bool isAccessAllowed(SecurityOrigin*); | 96 bool isAccessAllowed(SecurityOrigin*); |
| 93 const ResourceResponse& response() const; | 97 const ResourceResponse& response() const; |
| 94 bool isLoaded() const; | 98 bool isLoaded() const; |
| 95 bool isLoading() const; | 99 bool isLoading() const; |
| 96 bool errorOccurred() const; | 100 bool errorOccurred() const; |
| 97 bool loadFailedOrCanceled() const; | 101 bool loadFailedOrCanceled() const; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 Image::SizeAvailability m_sizeAvailable = Image::SizeUnavailable; | 159 Image::SizeAvailability m_sizeAvailable = Image::SizeUnavailable; |
| 156 | 160 |
| 157 // Indicates if this resource's encoded image data can be purged and refetched | 161 // Indicates if this resource's encoded image data can be purged and refetched |
| 158 // from disk cache to save memory usage. See crbug/664437. | 162 // from disk cache to save memory usage. See crbug/664437. |
| 159 bool m_isRefetchableDataFromDiskCache; | 163 bool m_isRefetchableDataFromDiskCache; |
| 160 }; | 164 }; |
| 161 | 165 |
| 162 } // namespace blink | 166 } // namespace blink |
| 163 | 167 |
| 164 #endif | 168 #endif |
| OLD | NEW |