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

Side by Side Diff: third_party/WebKit/Source/core/fetch/ImageResource.h

Issue 1610883002: Oilpan: ImageObserver needs to be a GC mixin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl try Created 4 years, 10 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) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org> 3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org>
4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
5 Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 5 Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
6 6
7 This library is free software; you can redistribute it and/or 7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public 8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either 9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version. 10 version 2 of the License, or (at your option) any later version.
(...skipping 26 matching lines...) Expand all
37 class ImageResourceClient; 37 class ImageResourceClient;
38 class FetchRequest; 38 class FetchRequest;
39 class ResourceFetcher; 39 class ResourceFetcher;
40 class FloatSize; 40 class FloatSize;
41 class Length; 41 class Length;
42 class MemoryCache; 42 class MemoryCache;
43 class SecurityOrigin; 43 class SecurityOrigin;
44 44
45 class CORE_EXPORT ImageResource final : public Resource, public ImageObserver { 45 class CORE_EXPORT ImageResource final : public Resource, public ImageObserver {
46 friend class MemoryCache; 46 friend class MemoryCache;
47 47 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(ImageResource);
48 public: 48 public:
49 using ClientType = ImageResourceClient; 49 using ClientType = ImageResourceClient;
50 50
51 static PassRefPtrWillBeRawPtr<ImageResource> fetch(FetchRequest&, ResourceFe tcher*); 51 static PassRefPtrWillBeRawPtr<ImageResource> fetch(FetchRequest&, ResourceFe tcher*);
52 52
53 static PassRefPtrWillBeRawPtr<ImageResource> create(blink::Image* image) 53 static PassRefPtrWillBeRawPtr<ImageResource> create(blink::Image* image)
54 { 54 {
55 return adoptRefWillBeNoop(new ImageResource(image)); 55 return adoptRefWillBeNoop(new ImageResource(image));
56 } 56 }
57 57
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 bool stillNeedsLoad() const override { return !errorOccurred() && status() = = Unknown && !isLoading(); } 114 bool stillNeedsLoad() const override { return !errorOccurred() && status() = = Unknown && !isLoading(); }
115 115
116 // ImageObserver 116 // ImageObserver
117 void decodedSizeChanged(const blink::Image*, int delta) override; 117 void decodedSizeChanged(const blink::Image*, int delta) override;
118 void didDraw(const blink::Image*) override; 118 void didDraw(const blink::Image*) override;
119 119
120 bool shouldPauseAnimation(const blink::Image*) override; 120 bool shouldPauseAnimation(const blink::Image*) override;
121 void animationAdvanced(const blink::Image*) override; 121 void animationAdvanced(const blink::Image*) override;
122 void changedInRect(const blink::Image*, const IntRect&) override; 122 void changedInRect(const blink::Image*, const IntRect&) override;
123 123
124 DECLARE_VIRTUAL_TRACE();
125
124 protected: 126 protected:
125 bool isSafeToUnlock() const override; 127 bool isSafeToUnlock() const override;
126 void destroyDecodedDataIfPossible() override; 128 void destroyDecodedDataIfPossible() override;
127 void destroyDecodedDataForFailedRevalidation() override; 129 void destroyDecodedDataForFailedRevalidation() override;
128 130
129 private: 131 private:
130 explicit ImageResource(blink::Image*); 132 explicit ImageResource(blink::Image*);
131 ImageResource(const ResourceRequest&, blink::Image*); 133 ImageResource(const ResourceRequest&, blink::Image*);
132 134
133 friend class PaintLayerTest; 135 friend class PaintLayerTest;
(...skipping 24 matching lines...) Expand all
158 160
159 RefPtr<blink::Image> m_image; 161 RefPtr<blink::Image> m_image;
160 bool m_hasDevicePixelRatioHeaderValue; 162 bool m_hasDevicePixelRatioHeaderValue;
161 }; 163 };
162 164
163 DEFINE_RESOURCE_TYPE_CASTS(Image); 165 DEFINE_RESOURCE_TYPE_CASTS(Image);
164 166
165 } // namespace blink 167 } // namespace blink
166 168
167 #endif 169 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698