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

Side by Side 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: Rewind Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org> 3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org>
4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
6 rights reserved. 6 rights reserved.
7 7
8 This library is free software; you can redistribute it and/or 8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public 9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either 10 License as published by the Free Software Foundation; either
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 // off and optionally bypassing the cache. 333 // off and optionally bypassing the cache.
334 // If reloading is started, this method returns a new Resource that is used 334 // If reloading is started, this method returns a new Resource that is used
335 // for reloading, and |this| should be no longer used. 335 // for reloading, and |this| should be no longer used.
336 // Otherwise, this method returns nullptr. 336 // Otherwise, this method returns nullptr.
337 virtual Resource* reloadIfLoFiOrPlaceholderImage( 337 virtual Resource* reloadIfLoFiOrPlaceholderImage(
338 ResourceFetcher*, 338 ResourceFetcher*,
339 ReloadLoFiOrPlaceholderPolicy) { 339 ReloadLoFiOrPlaceholderPolicy) {
340 return nullptr; 340 return nullptr;
341 } 341 }
342 342
343 // Do not cause any JavaScript calls or client/observer notifications.
kouhei (in TOK) 2017/03/15 11:18:53 Would you also document what the hook is for? Also
hiroshige 2017/05/04 20:21:57 Done.
344 virtual void notifyStartLoad() {}
345
343 static const char* resourceTypeToString( 346 static const char* resourceTypeToString(
344 Type, 347 Type,
345 const AtomicString& fetchInitiatorName); 348 const AtomicString& fetchInitiatorName);
346 349
347 protected: 350 protected:
348 Resource(const ResourceRequest&, Type, const ResourceLoaderOptions&); 351 Resource(const ResourceRequest&, Type, const ResourceLoaderOptions&);
349 352
350 virtual void checkNotify(); 353 virtual void checkNotify();
351 354
352 void markClientFinished(ResourceClient*); 355 void markClientFinished(ResourceClient*);
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 }; 506 };
504 507
505 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ 508 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \
506 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, \ 509 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, \
507 resource->getType() == Resource::typeName, \ 510 resource->getType() == Resource::typeName, \
508 resource.getType() == Resource::typeName); 511 resource.getType() == Resource::typeName);
509 512
510 } // namespace blink 513 } // namespace blink
511 514
512 #endif 515 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698