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

Side by Side Diff: Source/core/fetch/Resource.h

Issue 153983004: Schedule image resource downloads by decreasing visual impact - Blink Side (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changes from review. Created 6 years, 10 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 rights reserved. 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 6
7 This library is free software; you can redistribute it and/or 7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public 8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either 9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version. 10 version 2 of the License, or (at your option) any later version.
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 unsigned long identifier() const { return m_identifier; } 107 unsigned long identifier() const { return m_identifier; }
108 108
109 virtual bool shouldIgnoreHTTPStatusCodeErrors() const { return false; } 109 virtual bool shouldIgnoreHTTPStatusCodeErrors() const { return false; }
110 110
111 ResourceRequest& resourceRequest() { return m_resourceRequest; } 111 ResourceRequest& resourceRequest() { return m_resourceRequest; }
112 const KURL& url() const { return m_resourceRequest.url();} 112 const KURL& url() const { return m_resourceRequest.url();}
113 Type type() const { return static_cast<Type>(m_type); } 113 Type type() const { return static_cast<Type>(m_type); }
114 const ResourceLoaderOptions& options() const { return m_options; } 114 const ResourceLoaderOptions& options() const { return m_options; }
115 void setOptions(const ResourceLoaderOptions& options) { m_options = options; } 115 void setOptions(const ResourceLoaderOptions& options) { m_options = options; }
116 116
117 void didChangePriority(ResourceLoadPriority); 117 void didChangePriority(ResourceLoadPriority, int intraPriorityValue);
118 118
119 void addClient(ResourceClient*); 119 void addClient(ResourceClient*);
120 void removeClient(ResourceClient*); 120 void removeClient(ResourceClient*);
121 bool hasClients() const { return !m_clients.isEmpty() || !m_clientsAwaitingC allback.isEmpty(); } 121 bool hasClients() const { return !m_clients.isEmpty() || !m_clientsAwaitingC allback.isEmpty(); }
122 bool deleteIfPossible(); 122 bool deleteIfPossible();
123 123
124 enum PreloadResult { 124 enum PreloadResult {
125 PreloadNotReferenced, 125 PreloadNotReferenced,
126 PreloadReferenced, 126 PreloadReferenced,
127 PreloadReferencedWhileLoading, 127 PreloadReferencedWhileLoading,
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 const char* ResourceTypeName(Resource::Type); 413 const char* ResourceTypeName(Resource::Type);
414 #endif 414 #endif
415 415
416 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ 416 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \
417 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->type() = = Resource::typeName, resource.type() == Resource::typeName); \ 417 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->type() = = Resource::typeName, resource.type() == Resource::typeName); \
418 inline typeName##Resource* to##typeName##Resource(const ResourcePtr<Resource >& ptr) { return to##typeName##Resource(ptr.get()); } 418 inline typeName##Resource* to##typeName##Resource(const ResourcePtr<Resource >& ptr) { return to##typeName##Resource(ptr.get()); }
419 419
420 } 420 }
421 421
422 #endif 422 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698