Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1102)

Unified Diff: third_party/WebKit/Source/platform/loader/fetch/Resource.h

Issue 2746343002: Phase III Step 1: Make ImageResourceContent manage its own ResourceStatus (Closed)
Patch Set: Reflect comments Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/loader/fetch/Resource.h
diff --git a/third_party/WebKit/Source/platform/loader/fetch/Resource.h b/third_party/WebKit/Source/platform/loader/fetch/Resource.h
index eff9c9ab797ced36b39be8da44c07734be29e660..c4ae381bf14708e4c6e4175bb6c6af472e81454b 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/Resource.h
+++ b/third_party/WebKit/Source/platform/loader/fetch/Resource.h
@@ -332,10 +332,27 @@ class PLATFORM_EXPORT Resource : public GarbageCollectedFinalized<Resource>,
virtual void ReloadIfLoFiOrPlaceholderImage(ResourceFetcher*,
ReloadLoFiOrPlaceholderPolicy) {}
+ // Used to notify ImageResourceContent of the start of actual loading.
+ // JavaScript calls or client/observer notifications are disallowed inside
+ // notifyStartLoad().
+ virtual void NotifyStartLoad() {}
+
static const char* ResourceTypeToString(
Type,
const AtomicString& fetch_initiator_name);
+ class ProhibitAddRemoveClientInScope : public AutoReset<bool> {
+ public:
+ ProhibitAddRemoveClientInScope(Resource* resource)
+ : AutoReset(&resource->is_add_remove_client_prohibited_, true) {}
+ };
+
+ class RevalidationStartForbiddenScope : public AutoReset<bool> {
+ public:
+ RevalidationStartForbiddenScope(Resource* resource)
+ : AutoReset(&resource->is_revalidation_start_forbidden_, true) {}
+ };
+
protected:
Resource(const ResourceRequest&, Type, const ResourceLoaderOptions&);
@@ -395,18 +412,6 @@ class PLATFORM_EXPORT Resource : public GarbageCollectedFinalized<Resource>,
SharedBuffer* Data() const { return data_.Get(); }
void ClearData();
- class ProhibitAddRemoveClientInScope : public AutoReset<bool> {
- public:
- ProhibitAddRemoveClientInScope(Resource* resource)
- : AutoReset(&resource->is_add_remove_client_prohibited_, true) {}
- };
-
- class RevalidationStartForbiddenScope : public AutoReset<bool> {
- public:
- RevalidationStartForbiddenScope(Resource* resource)
- : AutoReset(&resource->is_revalidation_start_forbidden_, true) {}
- };
-
private:
class ResourceCallback;
class CachedMetadataHandlerImpl;

Powered by Google App Engine
This is Rietveld 408576698