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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSImageSetValue.h

Issue 1658923004: PurgeMemory. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSImageSetValue.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); 55 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
56 String imageURL; 56 String imageURL;
57 Referrer referrer; 57 Referrer referrer;
58 float scaleFactor; 58 float scaleFactor;
59 }; 59 };
60 60
61 PassRefPtrWillBeRawPtr<CSSImageSetValue> valueWithURLsMadeAbsolute(); 61 PassRefPtrWillBeRawPtr<CSSImageSetValue> valueWithURLsMadeAbsolute();
62 62
63 bool hasFailedOrCanceledSubresources() const; 63 bool hasFailedOrCanceledSubresources() const;
64 64
65 void purgeMemory();
66
65 DECLARE_TRACE_AFTER_DISPATCH(); 67 DECLARE_TRACE_AFTER_DISPATCH();
66 68
67 protected: 69 protected:
68 ImageWithScale bestImageForScaleFactor(float scaleFactor); 70 ImageWithScale bestImageForScaleFactor(float scaleFactor);
69 71
70 private: 72 private:
71 CSSImageSetValue(); 73 CSSImageSetValue();
72 74
73 void fillImageSet(); 75 void fillImageSet();
74 static inline bool compareByScaleFactor(ImageWithScale first, ImageWithScale second) { return first.scaleFactor < second.scaleFactor; } 76 static inline bool compareByScaleFactor(ImageWithScale first, ImageWithScale second) { return first.scaleFactor < second.scaleFactor; }
75 77
76 float m_cachedScaleFactor; 78 float m_cachedScaleFactor;
77 RefPtrWillBeMember<StyleImage> m_cachedImage; 79 RefPtrWillBeMember<StyleImage> m_cachedImage;
78 80
79 Vector<ImageWithScale> m_imagesInSet; 81 Vector<ImageWithScale> m_imagesInSet;
80 }; 82 };
81 83
82 DEFINE_CSS_VALUE_TYPE_CASTS(CSSImageSetValue, isImageSetValue()); 84 DEFINE_CSS_VALUE_TYPE_CASTS(CSSImageSetValue, isImageSetValue());
83 85
84 } // namespace blink 86 } // namespace blink
85 87
86 #endif // CSSImageSetValue_h 88 #endif // CSSImageSetValue_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSImageSetValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698