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

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

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 14 matching lines...) Expand all
25 25
26 #include "core/CoreExport.h" 26 #include "core/CoreExport.h"
27 #include "core/fetch/MultipartImageResourceParser.h" 27 #include "core/fetch/MultipartImageResourceParser.h"
28 #include "core/fetch/Resource.h" 28 #include "core/fetch/Resource.h"
29 #include "platform/geometry/IntRect.h" 29 #include "platform/geometry/IntRect.h"
30 #include "platform/geometry/IntSizeHash.h" 30 #include "platform/geometry/IntSizeHash.h"
31 #include "platform/geometry/LayoutSize.h" 31 #include "platform/geometry/LayoutSize.h"
32 #include "platform/graphics/ImageObserver.h" 32 #include "platform/graphics/ImageObserver.h"
33 #include "platform/graphics/ImageOrientation.h" 33 #include "platform/graphics/ImageOrientation.h"
34 #include "wtf/HashMap.h" 34 #include "wtf/HashMap.h"
35 #include <memory>
36 35
37 namespace blink { 36 namespace blink {
38 37
39 class FetchRequest; 38 class FetchRequest;
40 class FloatSize; 39 class FloatSize;
41 class ImageResourceObserver; 40 class ImageResourceObserver;
42 class MemoryCache; 41 class MemoryCache;
43 class ResourceClient; 42 class ResourceClient;
44 class ResourceFetcher; 43 class ResourceFetcher;
45 class SecurityOrigin; 44 class SecurityOrigin;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 void addObserver(ImageResourceObserver*); 93 void addObserver(ImageResourceObserver*);
95 void removeObserver(ImageResourceObserver*); 94 void removeObserver(ImageResourceObserver*);
96 bool hasClientsOrObservers() const override { return Resource::hasClientsOrO bservers() || !m_observers.isEmpty() || !m_finishedObservers.isEmpty(); } 95 bool hasClientsOrObservers() const override { return Resource::hasClientsOrO bservers() || !m_observers.isEmpty() || !m_finishedObservers.isEmpty(); }
97 96
98 ResourcePriority priorityFromObservers() override; 97 ResourcePriority priorityFromObservers() override;
99 98
100 void allClientsAndObserversRemoved() override; 99 void allClientsAndObserversRemoved() override;
101 100
102 void appendData(const char*, size_t) override; 101 void appendData(const char*, size_t) override;
103 void error(const ResourceError&) override; 102 void error(const ResourceError&) override;
104 void responseReceived(const ResourceResponse&, std::unique_ptr<WebDataConsum erHandle>) override; 103 void responseReceived(const ResourceResponse&, PassOwnPtr<WebDataConsumerHan dle>) override;
105 void finish(double finishTime = 0.0) override; 104 void finish(double finishTime = 0.0) override;
106 105
107 // For compatibility, images keep loading even if there are HTTP errors. 106 // For compatibility, images keep loading even if there are HTTP errors.
108 bool shouldIgnoreHTTPStatusCodeErrors() const override { return true; } 107 bool shouldIgnoreHTTPStatusCodeErrors() const override { return true; }
109 108
110 bool isImage() const override { return true; } 109 bool isImage() const override { return true; }
111 110
112 // ImageObserver 111 // ImageObserver
113 void decodedSizeChangedTo(const blink::Image*, size_t newSize) override; 112 void decodedSizeChangedTo(const blink::Image*, size_t newSize) override;
114 void didDraw(const blink::Image*) override; 113 void didDraw(const blink::Image*) override;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 bool m_hasDevicePixelRatioHeaderValue; 168 bool m_hasDevicePixelRatioHeaderValue;
170 HashCountedSet<ImageResourceObserver*> m_observers; 169 HashCountedSet<ImageResourceObserver*> m_observers;
171 HashCountedSet<ImageResourceObserver*> m_finishedObservers; 170 HashCountedSet<ImageResourceObserver*> m_finishedObservers;
172 }; 171 };
173 172
174 DEFINE_RESOURCE_TYPE_CASTS(Image); 173 DEFINE_RESOURCE_TYPE_CASTS(Image);
175 174
176 } // namespace blink 175 } // namespace blink
177 176
178 #endif 177 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/FontResource.h ('k') | third_party/WebKit/Source/core/fetch/ImageResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698