| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 94 |
| 95 virtual bool usesContainerSize() const { return false; } | 95 virtual bool usesContainerSize() const { return false; } |
| 96 virtual bool hasRelativeSize() const { return false; } | 96 virtual bool hasRelativeSize() const { return false; } |
| 97 | 97 |
| 98 virtual IntSize size() const = 0; | 98 virtual IntSize size() const = 0; |
| 99 IntRect rect() const { return IntRect(IntPoint(), size()); } | 99 IntRect rect() const { return IntRect(IntPoint(), size()); } |
| 100 int width() const { return size().width(); } | 100 int width() const { return size().width(); } |
| 101 int height() const { return size().height(); } | 101 int height() const { return size().height(); } |
| 102 virtual bool getHotSpot(IntPoint&) const { return false; } | 102 virtual bool getHotSpot(IntPoint&) const { return false; } |
| 103 | 103 |
| 104 enum SizeAvailability { | 104 virtual bool setData(PassRefPtr<SharedBuffer> data, bool allDataReceived); |
| 105 SizeAvailable, | 105 virtual bool dataChanged(bool /*allDataReceived*/) { return false; } |
| 106 SizeUnavailable | |
| 107 }; | |
| 108 virtual SizeAvailability setData(PassRefPtr<SharedBuffer> data, bool allData
Received); | |
| 109 virtual SizeAvailability dataChanged(bool /*allDataReceived*/) { return Size
Unavailable; } | |
| 110 | 106 |
| 111 virtual String filenameExtension() const { return String(); } // null string
if unknown | 107 virtual String filenameExtension() const { return String(); } // null string
if unknown |
| 112 | 108 |
| 113 virtual void destroyDecodedData() = 0; | 109 virtual void destroyDecodedData() = 0; |
| 114 | 110 |
| 115 virtual PassRefPtr<SharedBuffer> data() { return m_encodedImageData; } | 111 virtual PassRefPtr<SharedBuffer> data() { return m_encodedImageData; } |
| 116 | 112 |
| 117 // Animation begins whenever someone draws the image, so startAnimation() is
not normally called. | 113 // Animation begins whenever someone draws the image, so startAnimation() is
not normally called. |
| 118 // It will automatically pause once all observers no longer want to render t
he image anywhere. | 114 // It will automatically pause once all observers no longer want to render t
he image anywhere. |
| 119 enum CatchUpAnimation { DoNotCatchUp, CatchUp }; | 115 enum CatchUpAnimation { DoNotCatchUp, CatchUp }; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 UntracedMember<ImageObserver> m_imageObserver; | 181 UntracedMember<ImageObserver> m_imageObserver; |
| 186 bool m_imageObserverDisabled; | 182 bool m_imageObserverDisabled; |
| 187 }; | 183 }; |
| 188 | 184 |
| 189 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \ | 185 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \ |
| 190 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), image.is##t
ypeName()) | 186 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), image.is##t
ypeName()) |
| 191 | 187 |
| 192 } // namespace blink | 188 } // namespace blink |
| 193 | 189 |
| 194 #endif | 190 #endif |
| OLD | NEW |