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

Side by Side Diff: third_party/WebKit/Source/core/loader/ImageLoader.h

Issue 1853743005: Oilpan: Remove WillBe types (part 13) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months 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 26 matching lines...) Expand all
37 class IncrementLoadEventDelayCount; 37 class IncrementLoadEventDelayCount;
38 class FetchRequest; 38 class FetchRequest;
39 class Document; 39 class Document;
40 class Element; 40 class Element;
41 class ImageLoader; 41 class ImageLoader;
42 class LayoutImageResource; 42 class LayoutImageResource;
43 43
44 template<typename T> class EventSender; 44 template<typename T> class EventSender;
45 using ImageEventSender = EventSender<ImageLoader>; 45 using ImageEventSender = EventSender<ImageLoader>;
46 46
47 class CORE_EXPORT ImageLoader : public NoBaseWillBeGarbageCollectedFinalized<Ima geLoader>, public ResourceClient, public ImageResourceObserver { 47 class CORE_EXPORT ImageLoader : public GarbageCollectedFinalized<ImageLoader>, p ublic ResourceClient, public ImageResourceObserver {
48 WILL_BE_USING_PRE_FINALIZER(ImageLoader, dispose); 48 USING_PRE_FINALIZER(ImageLoader, dispose);
49 USING_FAST_MALLOC_WILL_BE_REMOVED(ImageLoader);
50 public: 49 public:
51 explicit ImageLoader(Element*); 50 explicit ImageLoader(Element*);
52 ~ImageLoader() override; 51 ~ImageLoader() override;
53 52
54 DECLARE_TRACE(); 53 DECLARE_TRACE();
55 54
56 enum UpdateFromElementBehavior { 55 enum UpdateFromElementBehavior {
57 // This should be the update behavior when the element is attached to a document, or when DOM mutations trigger a new load. 56 // This should be the update behavior when the element is attached to a document, or when DOM mutations trigger a new load.
58 // Starts loading if a load hasn't already been started. 57 // Starts loading if a load hasn't already been started.
59 UpdateNormal, 58 UpdateNormal,
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 // or to schedule a microtask. 136 // or to schedule a microtask.
138 bool shouldLoadImmediately(const KURL&) const; 137 bool shouldLoadImmediately(const KURL&) const;
139 138
140 // For Oilpan, we must run dispose() as a prefinalizer and call 139 // For Oilpan, we must run dispose() as a prefinalizer and call
141 // m_image->removeClient(this) (and more.) Otherwise, the ImageResource can invoke 140 // m_image->removeClient(this) (and more.) Otherwise, the ImageResource can invoke
142 // didAddClient() for the ImageLoader that is about to die in the current 141 // didAddClient() for the ImageLoader that is about to die in the current
143 // lazy sweeping, and the didAddClient() can access on-heap objects that 142 // lazy sweeping, and the didAddClient() can access on-heap objects that
144 // have already been finalized in the current lazy sweeping. 143 // have already been finalized in the current lazy sweeping.
145 void dispose(); 144 void dispose();
146 145
147 RawPtrWillBeMember<Element> m_element; 146 Member<Element> m_element;
148 RefPtrWillBeMember<ImageResource> m_image; 147 Member<ImageResource> m_image;
149 // FIXME: Oilpan: We might be able to remove this Persistent hack when 148 // FIXME: Oilpan: We might be able to remove this Persistent hack when
150 // ImageResourceClient is traceable. 149 // ImageResourceClient is traceable.
151 GC_PLUGIN_IGNORE("http://crbug.com/383741") 150 GC_PLUGIN_IGNORE("http://crbug.com/383741")
152 RefPtrWillBePersistent<Element> m_keepAlive; 151 Persistent<Element> m_keepAlive;
153 152
154 Timer<ImageLoader> m_derefElementTimer; 153 Timer<ImageLoader> m_derefElementTimer;
155 AtomicString m_failedLoadURL; 154 AtomicString m_failedLoadURL;
156 WeakPtr<Task> m_pendingTask; // owned by Microtask 155 WeakPtr<Task> m_pendingTask; // owned by Microtask
157 OwnPtr<IncrementLoadEventDelayCount> m_loadDelayCounter; 156 OwnPtr<IncrementLoadEventDelayCount> m_loadDelayCounter;
158 bool m_hasPendingLoadEvent : 1; 157 bool m_hasPendingLoadEvent : 1;
159 bool m_hasPendingErrorEvent : 1; 158 bool m_hasPendingErrorEvent : 1;
160 bool m_imageComplete : 1; 159 bool m_imageComplete : 1;
161 bool m_loadingImageDocument : 1; 160 bool m_loadingImageDocument : 1;
162 bool m_elementIsProtected : 1; 161 bool m_elementIsProtected : 1;
163 bool m_suppressErrorEvents : 1; 162 bool m_suppressErrorEvents : 1;
164 }; 163 };
165 164
166 } // namespace blink 165 } // namespace blink
167 166
168 #endif 167 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698