OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef ImageResourceInfo_h |
| 6 #define ImageResourceInfo_h |
| 7 |
| 8 #include "core/CoreExport.h" |
| 9 #include "core/fetch/ResourceStatus.h" |
| 10 #include "platform/weborigin/KURL.h" |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 class ResourceFetcher; |
| 15 class ResourceResponse; |
| 16 class SecurityOrigin; |
| 17 |
| 18 // Delegate class of ImageResource that encapsulates the interface and data |
| 19 // visible to ImageResourceContent. |
| 20 // TODO(hiroshige): reduce the members of this class to further decouple |
| 21 // ImageResource and ImageResourceContent. |
| 22 class CORE_EXPORT ImageResourceInfo : public GarbageCollectedMixin { |
| 23 public: |
| 24 ~ImageResourceInfo() {} |
| 25 virtual const KURL& url() const = 0; |
| 26 virtual bool isSchedulingReload() const = 0; |
| 27 virtual bool hasDevicePixelRatioHeaderValue() const = 0; |
| 28 virtual float devicePixelRatioHeaderValue() const = 0; |
| 29 virtual const ResourceResponse& response() const = 0; |
| 30 virtual ResourceStatus getStatus() const = 0; |
| 31 virtual bool isPlaceholder() const = 0; |
| 32 virtual bool isCacheValidator() const = 0; |
| 33 virtual bool schedulingReloadOrShouldReloadBrokenPlaceholder() const = 0; |
| 34 virtual bool isAccessAllowed( |
| 35 SecurityOrigin*, |
| 36 bool doesCurrentFrameHasSingleSecurityOrigin) const = 0; |
| 37 virtual bool hasCacheControlNoStoreHeader() const = 0; |
| 38 |
| 39 DEFINE_INLINE_VIRTUAL_TRACE() {} |
| 40 |
| 41 virtual void decodeError(bool allDataReceived) {} |
| 42 virtual void setDecodedSize(size_t) {} |
| 43 virtual void willAddClientOrObserver() {} |
| 44 virtual void didRemoveClientOrObserver() {} |
| 45 virtual void emulateLoadStartedForInspector( |
| 46 ResourceFetcher*, |
| 47 const KURL&, |
| 48 const AtomicString& initiatorName) {} |
| 49 }; |
| 50 |
| 51 } // namespace blink |
| 52 |
| 53 #endif |
OLD | NEW |