OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ImageResourceInfo_h | 5 #ifndef ImageResourceInfo_h |
6 #define ImageResourceInfo_h | 6 #define ImageResourceInfo_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
10 #include "platform/heap/Heap.h" | 10 #include "platform/heap/Heap.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 // ImageResource and ImageResourceContent. | 26 // ImageResource and ImageResourceContent. |
27 class CORE_EXPORT ImageResourceInfo : public GarbageCollectedMixin { | 27 class CORE_EXPORT ImageResourceInfo : public GarbageCollectedMixin { |
28 public: | 28 public: |
29 ~ImageResourceInfo() {} | 29 ~ImageResourceInfo() {} |
30 virtual const KURL& url() const = 0; | 30 virtual const KURL& url() const = 0; |
31 virtual bool isSchedulingReload() const = 0; | 31 virtual bool isSchedulingReload() const = 0; |
32 virtual bool hasDevicePixelRatioHeaderValue() const = 0; | 32 virtual bool hasDevicePixelRatioHeaderValue() const = 0; |
33 virtual float devicePixelRatioHeaderValue() const = 0; | 33 virtual float devicePixelRatioHeaderValue() const = 0; |
34 virtual const ResourceResponse& response() const = 0; | 34 virtual const ResourceResponse& response() const = 0; |
35 virtual ResourceStatus getStatus() const = 0; | 35 virtual ResourceStatus getStatus() const = 0; |
36 virtual bool isPlaceholder() const = 0; | 36 virtual bool shouldShowPlaceholder() const = 0; |
37 virtual bool isCacheValidator() const = 0; | 37 virtual bool isCacheValidator() const = 0; |
38 virtual bool schedulingReloadOrShouldReloadBrokenPlaceholder() const = 0; | 38 virtual bool schedulingReloadOrShouldReloadBrokenPlaceholder() const = 0; |
39 enum DoesCurrentFrameHaveSingleSecurityOrigin { | 39 enum DoesCurrentFrameHaveSingleSecurityOrigin { |
40 HasMultipleSecurityOrigin, | 40 HasMultipleSecurityOrigin, |
41 HasSingleSecurityOrigin | 41 HasSingleSecurityOrigin |
42 }; | 42 }; |
43 virtual bool isAccessAllowed( | 43 virtual bool isAccessAllowed( |
44 SecurityOrigin*, | 44 SecurityOrigin*, |
45 DoesCurrentFrameHaveSingleSecurityOrigin) const = 0; | 45 DoesCurrentFrameHaveSingleSecurityOrigin) const = 0; |
46 virtual bool hasCacheControlNoStoreHeader() const = 0; | 46 virtual bool hasCacheControlNoStoreHeader() const = 0; |
47 virtual const ResourceError& resourceError() const = 0; | 47 virtual const ResourceError& resourceError() const = 0; |
48 | 48 |
49 // TODO(hiroshige): Remove this. | |
50 virtual void setIsPlaceholder(bool) = 0; | |
51 | |
52 // TODO(hiroshige): Remove this once MemoryCache becomes further weaker. | 49 // TODO(hiroshige): Remove this once MemoryCache becomes further weaker. |
53 virtual void setDecodedSize(size_t) = 0; | 50 virtual void setDecodedSize(size_t) = 0; |
54 | 51 |
55 // TODO(hiroshige): Remove these. | 52 // TODO(hiroshige): Remove these. |
56 virtual void willAddClientOrObserver() = 0; | 53 virtual void willAddClientOrObserver() = 0; |
57 virtual void didRemoveClientOrObserver() = 0; | 54 virtual void didRemoveClientOrObserver() = 0; |
58 | 55 |
59 // TODO(hiroshige): Remove this. crbug.com/666214 | 56 // TODO(hiroshige): Remove this. crbug.com/666214 |
60 virtual void emulateLoadStartedForInspector( | 57 virtual void emulateLoadStartedForInspector( |
61 ResourceFetcher*, | 58 ResourceFetcher*, |
62 const KURL&, | 59 const KURL&, |
63 const AtomicString& initiatorName) = 0; | 60 const AtomicString& initiatorName) = 0; |
64 | 61 |
65 DEFINE_INLINE_VIRTUAL_TRACE() {} | 62 DEFINE_INLINE_VIRTUAL_TRACE() {} |
66 }; | 63 }; |
67 | 64 |
68 } // namespace blink | 65 } // namespace blink |
69 | 66 |
70 #endif | 67 #endif |
OLD | NEW |