| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * Copyright (C) 2004, 2009 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2009 Apple Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 class FetchRequest; | 37 class FetchRequest; |
| 38 class Document; | 38 class Document; |
| 39 | 39 |
| 40 class ImageLoaderClient { | 40 class ImageLoaderClient { |
| 41 public: | 41 public: |
| 42 virtual void notifyImageSourceChanged() = 0; | 42 virtual void notifyImageSourceChanged() = 0; |
| 43 | 43 |
| 44 // Determines whether the observed ImageResource should have higher priority
in the decoded resources cache. | 44 // Determines whether the observed ImageResource should have higher priority
in the decoded resources cache. |
| 45 virtual bool requestsHighLiveResourceCachePriority() { return false; } | 45 virtual bool requestsHighLiveResourceCachePriority() { return false; } |
| 46 | 46 |
| 47 virtual void trace(Visitor*) { } | |
| 48 | |
| 49 protected: | 47 protected: |
| 50 ImageLoaderClient() { } | 48 ImageLoaderClient() { } |
| 51 }; | 49 }; |
| 52 | 50 |
| 53 class Element; | 51 class Element; |
| 54 class ImageLoader; | 52 class ImageLoader; |
| 55 class RenderImageResource; | 53 class RenderImageResource; |
| 56 | 54 |
| 57 template<typename T> class EventSender; | 55 template<typename T> class EventSender; |
| 58 typedef EventSender<ImageLoader> ImageEventSender; | 56 typedef EventSender<ImageLoader> ImageEventSender; |
| 59 | 57 |
| 60 class ImageLoader : public ImageResourceClient { | 58 class ImageLoader : public ImageResourceClient { |
| 61 public: | 59 public: |
| 62 explicit ImageLoader(Element*); | 60 explicit ImageLoader(Element*); |
| 63 virtual ~ImageLoader(); | 61 virtual ~ImageLoader(); |
| 64 void trace(Visitor*); | |
| 65 | 62 |
| 66 enum LoadType { | 63 enum LoadType { |
| 67 LoadNormally, | 64 LoadNormally, |
| 68 ForceLoadImmediately | 65 ForceLoadImmediately |
| 69 }; | 66 }; |
| 70 | 67 |
| 71 enum UpdateFromElementBehavior { | 68 enum UpdateFromElementBehavior { |
| 72 // This should be the update behavior when the element is attached to a
document, or when DOM mutations trigger a new load. | 69 // This should be the update behavior when the element is attached to a
document, or when DOM mutations trigger a new load. |
| 73 // Starts loading if a load hasn't already been started. | 70 // Starts loading if a load hasn't already been started. |
| 74 UpdateNormal, | 71 UpdateNormal, |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 bool m_hasPendingLoadEvent : 1; | 150 bool m_hasPendingLoadEvent : 1; |
| 154 bool m_hasPendingErrorEvent : 1; | 151 bool m_hasPendingErrorEvent : 1; |
| 155 bool m_imageComplete : 1; | 152 bool m_imageComplete : 1; |
| 156 bool m_elementIsProtected : 1; | 153 bool m_elementIsProtected : 1; |
| 157 unsigned m_highPriorityClientCount; | 154 unsigned m_highPriorityClientCount; |
| 158 }; | 155 }; |
| 159 | 156 |
| 160 } | 157 } |
| 161 | 158 |
| 162 #endif | 159 #endif |
| OLD | NEW |