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 10 matching lines...) Expand all Loading... |
21 | 21 |
22 // Delegate class of ImageResource that encapsulates the interface and data | 22 // Delegate class of ImageResource that encapsulates the interface and data |
23 // visible to ImageResourceContent. | 23 // visible to ImageResourceContent. |
24 // Do not add new members or new call sites unless really needed. | 24 // Do not add new members or new call sites unless really needed. |
25 // TODO(hiroshige): reduce the members of this class to further decouple | 25 // TODO(hiroshige): reduce the members of this class to further decouple |
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; | |
32 virtual bool hasDevicePixelRatioHeaderValue() const = 0; | 31 virtual bool hasDevicePixelRatioHeaderValue() const = 0; |
33 virtual float devicePixelRatioHeaderValue() const = 0; | 32 virtual float devicePixelRatioHeaderValue() const = 0; |
34 virtual const ResourceResponse& response() const = 0; | 33 virtual const ResourceResponse& response() const = 0; |
35 virtual ResourceStatus getStatus() const = 0; | 34 virtual ResourceStatus getStatus() const = 0; |
36 virtual bool shouldShowPlaceholder() const = 0; | 35 virtual bool shouldShowPlaceholder() const = 0; |
37 virtual bool isCacheValidator() const = 0; | 36 virtual bool isCacheValidator() const = 0; |
38 virtual bool schedulingReloadOrShouldReloadBrokenPlaceholder() const = 0; | |
39 enum DoesCurrentFrameHaveSingleSecurityOrigin { | 37 enum DoesCurrentFrameHaveSingleSecurityOrigin { |
40 HasMultipleSecurityOrigin, | 38 HasMultipleSecurityOrigin, |
41 HasSingleSecurityOrigin | 39 HasSingleSecurityOrigin |
42 }; | 40 }; |
43 virtual bool isAccessAllowed( | 41 virtual bool isAccessAllowed( |
44 SecurityOrigin*, | 42 SecurityOrigin*, |
45 DoesCurrentFrameHaveSingleSecurityOrigin) const = 0; | 43 DoesCurrentFrameHaveSingleSecurityOrigin) const = 0; |
46 virtual bool hasCacheControlNoStoreHeader() const = 0; | 44 virtual bool hasCacheControlNoStoreHeader() const = 0; |
47 virtual const ResourceError& resourceError() const = 0; | 45 virtual const ResourceError& resourceError() const = 0; |
48 | 46 |
49 // TODO(hiroshige): Remove this once MemoryCache becomes further weaker. | 47 // TODO(hiroshige): Remove this once MemoryCache becomes further weaker. |
50 virtual void setDecodedSize(size_t) = 0; | 48 virtual void setDecodedSize(size_t) = 0; |
51 | 49 |
52 // TODO(hiroshige): Remove these. | 50 // TODO(hiroshige): Remove these. |
53 virtual void willAddClientOrObserver() = 0; | 51 virtual void willAddClientOrObserver() = 0; |
54 virtual void didRemoveClientOrObserver() = 0; | 52 virtual void didRemoveClientOrObserver() = 0; |
55 | 53 |
56 // TODO(hiroshige): Remove this. crbug.com/666214 | 54 // TODO(hiroshige): Remove this. crbug.com/666214 |
57 virtual void emulateLoadStartedForInspector( | 55 virtual void emulateLoadStartedForInspector( |
58 ResourceFetcher*, | 56 ResourceFetcher*, |
59 const KURL&, | 57 const KURL&, |
60 const AtomicString& initiatorName) = 0; | 58 const AtomicString& initiatorName) = 0; |
61 | 59 |
62 DEFINE_INLINE_VIRTUAL_TRACE() {} | 60 DEFINE_INLINE_VIRTUAL_TRACE() {} |
63 }; | 61 }; |
64 | 62 |
65 } // namespace blink | 63 } // namespace blink |
66 | 64 |
67 #endif | 65 #endif |
OLD | NEW |