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

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

Issue 1756953002: Stop dispatching notifyFinished for each part in a multipart response (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@multipart-cleanup-2
Patch Set: Created 4 years, 9 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 // ImageObserver 112 // ImageObserver
113 void decodedSizeChanged(const blink::Image*, int delta) override; 113 void decodedSizeChanged(const blink::Image*, int delta) override;
114 void didDraw(const blink::Image*) override; 114 void didDraw(const blink::Image*) override;
115 115
116 bool shouldPauseAnimation(const blink::Image*) override; 116 bool shouldPauseAnimation(const blink::Image*) override;
117 void animationAdvanced(const blink::Image*) override; 117 void animationAdvanced(const blink::Image*) override;
118 void changedInRect(const blink::Image*, const IntRect&) override; 118 void changedInRect(const blink::Image*, const IntRect&) override;
119 119
120 // MultipartImageResourceParser::Client 120 // MultipartImageResourceParser::Client
121 void onePartInMultipartReceived(const ResourceResponse&, bool isFirstPart) f inal; 121 void onePartInMultipartReceived(const ResourceResponse&) final;
122 void multipartDataReceived(const char*, size_t) final; 122 void multipartDataReceived(const char*, size_t) final;
123 123
124 DECLARE_VIRTUAL_TRACE(); 124 DECLARE_VIRTUAL_TRACE();
125 125
126 protected: 126 protected:
127 bool isSafeToUnlock() const override; 127 bool isSafeToUnlock() const override;
128 void destroyDecodedDataIfPossible() override; 128 void destroyDecodedDataIfPossible() override;
129 void destroyDecodedDataForFailedRevalidation() override; 129 void destroyDecodedDataForFailedRevalidation() override;
130 130
131 private: 131 private:
(...skipping 18 matching lines...) Expand all
150 void createImage(); 150 void createImage();
151 void updateImage(bool allDataReceived); 151 void updateImage(bool allDataReceived);
152 void clearImage(); 152 void clearImage();
153 // If not null, changeRect is the changed part of the image. 153 // If not null, changeRect is the changed part of the image.
154 void notifyObservers(const IntRect* changeRect = nullptr); 154 void notifyObservers(const IntRect* changeRect = nullptr);
155 155
156 float m_devicePixelRatioHeaderValue; 156 float m_devicePixelRatioHeaderValue;
157 157
158 PersistentWillBeMember<MultipartImageResourceParser> m_multipartParser; 158 PersistentWillBeMember<MultipartImageResourceParser> m_multipartParser;
159 RefPtr<blink::Image> m_image; 159 RefPtr<blink::Image> m_image;
160 int m_numParsedPartsInMultipart = 0;
Nate Chapin 2016/03/15 21:31:12 Maybe this should be a state machine enum, since w
160 bool m_hasDevicePixelRatioHeaderValue; 161 bool m_hasDevicePixelRatioHeaderValue;
161 }; 162 };
162 163
163 DEFINE_RESOURCE_TYPE_CASTS(Image); 164 DEFINE_RESOURCE_TYPE_CASTS(Image);
164 165
165 } // namespace blink 166 } // namespace blink
166 167
167 #endif 168 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698