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

Unified Diff: third_party/WebKit/Source/core/fetch/ImageResourceContentInterface.h

Issue 2469873002: [ImageResource 4] Split ImageResource into Resource and Image parts (Closed)
Patch Set: comments 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/fetch/ImageResourceContentInterface.h
diff --git a/third_party/WebKit/Source/core/fetch/ImageResourceContentInterface.h b/third_party/WebKit/Source/core/fetch/ImageResourceContentInterface.h
new file mode 100644
index 0000000000000000000000000000000000000000..69f85bb05a6a64ffecf07a6af2f73fdc5ca39f31
--- /dev/null
+++ b/third_party/WebKit/Source/core/fetch/ImageResourceContentInterface.h
@@ -0,0 +1,39 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ImageResourceContentInterface_h
+#define ImageResourceContentInterface_h
+
+#include "core/CoreExport.h"
+#include "platform/graphics/Image.h"
+#include "platform/network/ResourceLoadPriority.h"
+
+namespace blink {
+
+class ImageResourceInfo;
+
+// Interface of ImageResourceContent visible to ImageResource.
+class CORE_EXPORT ImageResourceContentInterface : public GarbageCollectedMixin {
hiroshige 2016/11/30 06:46:24 I introduced ImageResourceContentInterface in the
+ public:
+ enum ClearImageOption { ClearExistingImage, KeepExistingImage };
+
+ virtual void setImageResourceInfo(ImageResourceInfo*) = 0;
+ virtual void updateImage(PassRefPtr<SharedBuffer>,
+ ClearImageOption,
+ bool allDataReceived) = 0;
+ virtual void destroyDecodedData() = 0;
+ virtual void doResetAnimation() = 0;
+
+ virtual ResourcePriority priorityFromObservers() const = 0;
+ virtual bool hasObservers() const = 0;
+ virtual bool isSizeAvailable() const = 0;
+ virtual bool isRefetchableDataFromDiskCache() const = 0;
+ virtual blink::Image* getImage() const = 0;
+ virtual bool hasImage() const = 0;
+ DEFINE_INLINE_VIRTUAL_TRACE() {}
+};
+
+} // namespace blink
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698