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

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

Issue 1624583003: Reload Lo-Fi images inline instead of reloading the whole page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added comment 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 IntrinsicCorrectedToDPR, // Report the intrinsic size corrected to accou nt for image density. 77 IntrinsicCorrectedToDPR, // Report the intrinsic size corrected to accou nt for image density.
78 }; 78 };
79 // This method takes a zoom multiplier that can be used to increase the natu ral size of the image by the zoom. 79 // This method takes a zoom multiplier that can be used to increase the natu ral size of the image by the zoom.
80 LayoutSize imageSize(RespectImageOrientationEnum shouldRespectImageOrientati on, float multiplier, SizeType = IntrinsicSize); 80 LayoutSize imageSize(RespectImageOrientationEnum shouldRespectImageOrientati on, float multiplier, SizeType = IntrinsicSize);
81 void computeIntrinsicDimensions(Length& intrinsicWidth, Length& intrinsicHei ght, FloatSize& intrinsicRatio); 81 void computeIntrinsicDimensions(Length& intrinsicWidth, Length& intrinsicHei ght, FloatSize& intrinsicRatio);
82 82
83 bool isAccessAllowed(SecurityOrigin*); 83 bool isAccessAllowed(SecurityOrigin*);
84 84
85 void updateImageAnimationPolicy(); 85 void updateImageAnimationPolicy();
86 86
87 // If this ImageResource has the Lo-Fi response headers, reload it with
88 // the Lo-Fi state set to off and bypassing the cache.
89 void reloadIfLoFi(ResourceFetcher*);
90
87 void didAddClient(ResourceClient*) override; 91 void didAddClient(ResourceClient*) override;
88 void didRemoveClient(ResourceClient*) override; 92 void didRemoveClient(ResourceClient*) override;
89 93
90 void allClientsRemoved() override; 94 void allClientsRemoved() override;
91 95
92 void appendData(const char*, size_t) override; 96 void appendData(const char*, size_t) override;
93 void error(Resource::Status) override; 97 void error(Resource::Status) override;
94 void responseReceived(const ResourceResponse&, PassOwnPtr<WebDataConsumerHan dle>) override; 98 void responseReceived(const ResourceResponse&, PassOwnPtr<WebDataConsumerHan dle>) override;
95 void finishOnePart() override; 99 void finishOnePart() override;
96 100
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 146
143 RefPtr<blink::Image> m_image; 147 RefPtr<blink::Image> m_image;
144 bool m_hasDevicePixelRatioHeaderValue; 148 bool m_hasDevicePixelRatioHeaderValue;
145 }; 149 };
146 150
147 DEFINE_RESOURCE_TYPE_CASTS(Image); 151 DEFINE_RESOURCE_TYPE_CASTS(Image);
148 152
149 } // namespace blink 153 } // namespace blink
150 154
151 #endif 155 #endif
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl_browsertest.cc ('k') | third_party/WebKit/Source/core/fetch/ImageResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698