Chromium Code Reviews| 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 ResourceError; | |
| 15 class ResourceFetcher; | |
| 16 class ResourceResponse; | |
| 17 class SecurityOrigin; | |
| 18 | |
| 19 // Delegate class of ImageResource that encapsulates the interface and data | |
| 20 // visible to ImageResourceContent. | |
| 21 // TODO(hiroshige): reduce the members of this class to further decouple | |
| 22 // ImageResource and ImageResourceContent. | |
| 23 class CORE_EXPORT ImageResourceInfo : public GarbageCollectedMixin { | |
|
kinuko
2016/12/01 16:40:56
ImageResourceView... or ImageResourceAccessor or s
| |
| 24 public: | |
| 25 ~ImageResourceInfo() {} | |
| 26 virtual const KURL& url() const = 0; | |
| 27 virtual bool isSchedulingReload() const = 0; | |
| 28 virtual bool hasDevicePixelRatioHeaderValue() const = 0; | |
| 29 virtual float devicePixelRatioHeaderValue() const = 0; | |
| 30 virtual const ResourceResponse& response() const = 0; | |
| 31 virtual ResourceStatus getStatus() const = 0; | |
| 32 virtual bool isPlaceholder() const = 0; | |
| 33 virtual bool isCacheValidator() const = 0; | |
| 34 virtual bool schedulingReloadOrShouldReloadBrokenPlaceholder() const = 0; | |
| 35 virtual bool isAccessAllowed( | |
| 36 SecurityOrigin*, | |
| 37 bool doesCurrentFrameHasSingleSecurityOrigin) const = 0; | |
| 38 virtual bool hasCacheControlNoStoreHeader() const = 0; | |
| 39 virtual const ResourceError& resourceError() const = 0; | |
| 40 | |
| 41 DEFINE_INLINE_VIRTUAL_TRACE() {} | |
| 42 | |
| 43 virtual void decodeError(bool allDataReceived) {} | |
| 44 virtual void setDecodedSize(size_t) {} | |
| 45 virtual void willAddClientOrObserver() {} | |
| 46 virtual void didRemoveClientOrObserver() {} | |
| 47 virtual void emulateLoadStartedForInspector( | |
| 48 ResourceFetcher*, | |
| 49 const KURL&, | |
| 50 const AtomicString& initiatorName) {} | |
| 51 }; | |
| 52 | |
| 53 } // namespace blink | |
| 54 | |
| 55 #endif | |
| OLD | NEW |