Chromium Code Reviews| Index: third_party/WebKit/Source/core/fetch/ImageResourceInfo.h | 
| diff --git a/third_party/WebKit/Source/core/fetch/ImageResourceInfo.h b/third_party/WebKit/Source/core/fetch/ImageResourceInfo.h | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..8e39e8b5b2534ba5b5a7af5d69c94e3b5c3306b2 | 
| --- /dev/null | 
| +++ b/third_party/WebKit/Source/core/fetch/ImageResourceInfo.h | 
| @@ -0,0 +1,55 @@ | 
| +// 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 ImageResourceInfo_h | 
| +#define ImageResourceInfo_h | 
| + | 
| +#include "core/CoreExport.h" | 
| +#include "core/fetch/ResourceStatus.h" | 
| +#include "platform/weborigin/KURL.h" | 
| + | 
| +namespace blink { | 
| + | 
| +class ResourceError; | 
| +class ResourceFetcher; | 
| +class ResourceResponse; | 
| +class SecurityOrigin; | 
| + | 
| +// Delegate class of ImageResource that encapsulates the interface and data | 
| +// visible to ImageResourceContent. | 
| +// TODO(hiroshige): reduce the members of this class to further decouple | 
| +// ImageResource and ImageResourceContent. | 
| +class CORE_EXPORT ImageResourceInfo : public GarbageCollectedMixin { | 
| 
 
kinuko
2016/12/01 16:40:56
ImageResourceView... or ImageResourceAccessor or s
 
 | 
| + public: | 
| + ~ImageResourceInfo() {} | 
| + virtual const KURL& url() const = 0; | 
| + virtual bool isSchedulingReload() const = 0; | 
| + virtual bool hasDevicePixelRatioHeaderValue() const = 0; | 
| + virtual float devicePixelRatioHeaderValue() const = 0; | 
| + virtual const ResourceResponse& response() const = 0; | 
| + virtual ResourceStatus getStatus() const = 0; | 
| + virtual bool isPlaceholder() const = 0; | 
| + virtual bool isCacheValidator() const = 0; | 
| + virtual bool schedulingReloadOrShouldReloadBrokenPlaceholder() const = 0; | 
| + virtual bool isAccessAllowed( | 
| + SecurityOrigin*, | 
| + bool doesCurrentFrameHasSingleSecurityOrigin) const = 0; | 
| + virtual bool hasCacheControlNoStoreHeader() const = 0; | 
| + virtual const ResourceError& resourceError() const = 0; | 
| + | 
| + DEFINE_INLINE_VIRTUAL_TRACE() {} | 
| + | 
| + virtual void decodeError(bool allDataReceived) {} | 
| + virtual void setDecodedSize(size_t) {} | 
| + virtual void willAddClientOrObserver() {} | 
| + virtual void didRemoveClientOrObserver() {} | 
| + virtual void emulateLoadStartedForInspector( | 
| + ResourceFetcher*, | 
| + const KURL&, | 
| + const AtomicString& initiatorName) {} | 
| +}; | 
| + | 
| +} // namespace blink | 
| + | 
| +#endif |