Chromium Code Reviews| 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 |