Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Side by Side Diff: sky/engine/core/loader/ImageLoader.h

Issue 681963002: Remove heap/*.cpp files (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 KURL imageSourceToKURL(AtomicString) const; 137 KURL imageSourceToKURL(AtomicString) const;
138 138
139 // Used to determine whether to immediately initiate the load 139 // Used to determine whether to immediately initiate the load
140 // or to schedule a microtask. 140 // or to schedule a microtask.
141 bool shouldLoadImmediately(const KURL&, LoadType) const; 141 bool shouldLoadImmediately(const KURL&, LoadType) const;
142 142
143 void willRemoveClient(ImageLoaderClient&); 143 void willRemoveClient(ImageLoaderClient&);
144 144
145 RawPtr<Element> m_element; 145 RawPtr<Element> m_element;
146 ResourcePtr<ImageResource> m_image; 146 ResourcePtr<ImageResource> m_image;
147 // FIXME: Oilpan: We might be able to remove this Persistent hack when
148 // ImageResourceClient is traceable.
149 GC_PLUGIN_IGNORE("http://crbug.com/383741")
150 RefPtr<Element> m_keepAlive; 147 RefPtr<Element> m_keepAlive;
151 #if ENABLE(OILPAN)
152 class ImageLoaderClientRemover {
153 public:
154 ImageLoaderClientRemover(ImageLoader& loader, ImageLoaderClient& client) : m_loader(loader), m_client(client) { }
155 ~ImageLoaderClientRemover();
156
157 private:
158 ImageLoader& m_loader;
159 ImageLoaderClient& m_client;
160 };
161 friend class ImageLoaderClientRemover;
162 // Oilpan: This ImageLoader object must outlive its clients because they
163 // need to call ImageLoader::willRemoveClient before they
164 // die. Non-Persistent HeapHashMap doesn't work well because weak processing
165 // for HeapHashMap is not triggered when both of ImageLoader and
166 // ImageLoaderClient are unreachable.
167 GC_PLUGIN_IGNORE("http://crbug.com/383742")
168 PersistentHeapHashMap<WeakMember<ImageLoaderClient>, OwnPtr<ImageLoaderClien tRemover> > m_clients;
169 #else
170 HashSet<ImageLoaderClient*> m_clients; 148 HashSet<ImageLoaderClient*> m_clients;
171 #endif
172 Timer<ImageLoader> m_derefElementTimer; 149 Timer<ImageLoader> m_derefElementTimer;
173 AtomicString m_failedLoadURL; 150 AtomicString m_failedLoadURL;
174 WeakPtr<Task> m_pendingTask; // owned by Microtask 151 WeakPtr<Task> m_pendingTask; // owned by Microtask
175 OwnPtr<IncrementLoadEventDelayCount> m_loadDelayCounter; 152 OwnPtr<IncrementLoadEventDelayCount> m_loadDelayCounter;
176 bool m_hasPendingLoadEvent : 1; 153 bool m_hasPendingLoadEvent : 1;
177 bool m_hasPendingErrorEvent : 1; 154 bool m_hasPendingErrorEvent : 1;
178 bool m_imageComplete : 1; 155 bool m_imageComplete : 1;
179 bool m_elementIsProtected : 1; 156 bool m_elementIsProtected : 1;
180 unsigned m_highPriorityClientCount; 157 unsigned m_highPriorityClientCount;
181 }; 158 };
182 159
183 } 160 }
184 161
185 #endif 162 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/css/resolver/MatchedPropertiesCache.cpp ('k') | sky/engine/core/loader/ImageLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698