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

Side by Side Diff: third_party/WebKit/Source/core/style/StyleFetchedImage.h

Issue 2499263002: Add UMA to estimate deroppable memory usage of encoded data size in Resources (Closed)
Patch Set: Address on reviews Created 4 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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 void addClient(LayoutObject*) override; 61 void addClient(LayoutObject*) override;
62 void removeClient(LayoutObject*) override; 62 void removeClient(LayoutObject*) override;
63 void notifyFinished(Resource*) override; 63 void notifyFinished(Resource*) override;
64 String debugName() const override { return "StyleFetchedImage"; } 64 String debugName() const override { return "StyleFetchedImage"; }
65 PassRefPtr<Image> image(const LayoutObject&, 65 PassRefPtr<Image> image(const LayoutObject&,
66 const IntSize&, 66 const IntSize&,
67 float zoom) const override; 67 float zoom) const override;
68 bool knownToBeOpaque(const LayoutObject&) const override; 68 bool knownToBeOpaque(const LayoutObject&) const override;
69 ImageResource* cachedImage() const override; 69 ImageResource* cachedImage() const override;
70 70
71 bool isRefetchableFromDiskCache() const override {
72 // ResourceFetcher is not determined from StyleFetchedImage and it is
73 // impossible to send a request for refetching.
74 return false;
75 }
76
71 DECLARE_VIRTUAL_TRACE(); 77 DECLARE_VIRTUAL_TRACE();
72 78
73 private: 79 private:
74 StyleFetchedImage(ImageResource*, const Document&, const KURL&); 80 StyleFetchedImage(ImageResource*, const Document&, const KURL&);
75 81
76 void dispose(); 82 void dispose();
77 83
78 Member<ImageResource> m_image; 84 Member<ImageResource> m_image;
79 Member<const Document> m_document; 85 Member<const Document> m_document;
80 const KURL m_url; 86 const KURL m_url;
81 }; 87 };
82 88
83 DEFINE_STYLE_IMAGE_TYPE_CASTS(StyleFetchedImage, isImageResource()); 89 DEFINE_STYLE_IMAGE_TYPE_CASTS(StyleFetchedImage, isImageResource());
84 90
85 } // namespace blink 91 } // namespace blink
86 #endif 92 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698