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/heap/Heap.h" | |
| 11 #include "platform/weborigin/KURL.h" | |
|
yhirano
2016/12/05 09:02:04
+wtf/Forward.h
hiroshige
2016/12/06 09:32:51
Done.
| |
| 12 | |
| 13 namespace blink { | |
| 14 | |
| 15 class ResourceError; | |
| 16 class ResourceFetcher; | |
| 17 class ResourceResponse; | |
| 18 class SecurityOrigin; | |
| 19 | |
| 20 // Delegate class of ImageResource that encapsulates the interface and data | |
| 21 // visible to ImageResourceContent. | |
| 22 // TODO(hiroshige): reduce the members of this class to further decouple | |
| 23 // ImageResource and ImageResourceContent. | |
| 24 class CORE_EXPORT ImageResourceInfo : public GarbageCollectedMixin { | |
| 25 public: | |
| 26 ~ImageResourceInfo() {} | |
| 27 virtual const KURL& url() const = 0; | |
| 28 virtual bool isSchedulingReload() const = 0; | |
| 29 virtual bool hasDevicePixelRatioHeaderValue() const = 0; | |
| 30 virtual float devicePixelRatioHeaderValue() const = 0; | |
| 31 virtual const ResourceResponse& response() const = 0; | |
| 32 virtual ResourceStatus getStatus() const = 0; | |
| 33 virtual bool isPlaceholder() const = 0; | |
| 34 virtual bool isCacheValidator() const = 0; | |
| 35 virtual bool schedulingReloadOrShouldReloadBrokenPlaceholder() const = 0; | |
| 36 virtual bool isAccessAllowed( | |
|
yhirano
2016/12/05 09:02:03
Please use enum rather than boolean for a public m
hiroshige
2016/12/06 09:32:51
Done.
| |
| 37 SecurityOrigin*, | |
| 38 bool doesCurrentFrameHasSingleSecurityOrigin) const = 0; | |
| 39 virtual bool hasCacheControlNoStoreHeader() const = 0; | |
| 40 virtual const ResourceError& resourceError() const = 0; | |
| 41 | |
| 42 DEFINE_INLINE_VIRTUAL_TRACE() {} | |
|
yhirano
2016/12/05 09:02:03
[optional] can you place this function at the bott
hiroshige
2016/12/06 09:32:51
Done.
| |
| 43 | |
| 44 virtual void decodeError(bool allDataReceived) {} | |
|
yhirano
2016/12/05 09:02:03
It might be good to have comments for non-trivial
yhirano
2016/12/05 09:02:03
Can you tell me why these functions have the defau
hiroshige
2016/12/06 09:32:51
The most thing I want to say for these methods is:
hiroshige
2016/12/06 09:32:51
I made e.g. url() abstract because we need a dummy
| |
| 45 virtual void setDecodedSize(size_t) {} | |
| 46 virtual void willAddClientOrObserver() {} | |
| 47 virtual void didRemoveClientOrObserver() {} | |
| 48 virtual void emulateLoadStartedForInspector( | |
| 49 ResourceFetcher*, | |
| 50 const KURL&, | |
| 51 const AtomicString& initiatorName) {} | |
| 52 }; | |
| 53 | |
| 54 } // namespace blink | |
| 55 | |
| 56 #endif | |
| OLD | NEW |