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

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: unit test compile fix Created 4 years, 11 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 ResourcePtr<ImageResource> fetch(FetchRequest&, ResourceFetcher*); 51 static ResourcePtr<ImageResource> fetch(FetchRequest&, ResourceFetcher*);
52 52
53 ImageResource(blink::Image*); 53 ImageResource(blink::Image*);
54 // Exposed for testing 54 // Exposed for testing
55 ImageResource(const ResourceRequest&, blink::Image*); 55 ImageResource(const ResourceRequest&, blink::Image*);
56 ~ImageResource() override; 56 ~ImageResource() override;
57 57
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 bool stillNeedsLoad() const override { return !errorOccurred() && status() = = Unknown && !isLoading(); } 102 bool stillNeedsLoad() const override { return !errorOccurred() && status() = = Unknown && !isLoading(); }
103 103
104 // ImageObserver 104 // ImageObserver
105 void decodedSizeChanged(const blink::Image*, int delta) override; 105 void decodedSizeChanged(const blink::Image*, int delta) override;
106 void didDraw(const blink::Image*) override; 106 void didDraw(const blink::Image*) override;
107 107
108 bool shouldPauseAnimation(const blink::Image*) override; 108 bool shouldPauseAnimation(const blink::Image*) override;
109 void animationAdvanced(const blink::Image*) override; 109 void animationAdvanced(const blink::Image*) override;
110 void changedInRect(const blink::Image*, const IntRect&) override; 110 void changedInRect(const blink::Image*, const IntRect&) override;
111 111
112 DECLARE_VIRTUAL_TRACE();
113
112 protected: 114 protected:
113 bool isSafeToUnlock() const override; 115 bool isSafeToUnlock() const override;
114 void destroyDecodedDataIfPossible() override; 116 void destroyDecodedDataIfPossible() override;
115 void destroyDecodedDataForFailedRevalidation() override; 117 void destroyDecodedDataForFailedRevalidation() override;
116 118
117 private: 119 private:
118 class ImageResourceFactory : public ResourceFactory { 120 class ImageResourceFactory : public ResourceFactory {
119 public: 121 public:
120 ImageResourceFactory() 122 ImageResourceFactory()
121 : ResourceFactory(Resource::Image) { } 123 : ResourceFactory(Resource::Image) { }
(...skipping 19 matching lines...) Expand all
141 143
142 RefPtr<blink::Image> m_image; 144 RefPtr<blink::Image> m_image;
143 bool m_hasDevicePixelRatioHeaderValue; 145 bool m_hasDevicePixelRatioHeaderValue;
144 }; 146 };
145 147
146 DEFINE_RESOURCE_TYPE_CASTS(Image); 148 DEFINE_RESOURCE_TYPE_CASTS(Image);
147 149
148 } 150 }
149 151
150 #endif 152 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698