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

Side by Side Diff: Source/core/fetch/ResourceLoader.cpp

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: Rebase + variable name change. Created 6 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
« no previous file with comments | « Source/core/fetch/ResourceLoader.h ('k') | Source/core/fetch/ResourceLoaderHost.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2010, 2011 Apple Inc. All rights reserved.
3 * (C) 2007 Graham Dennis (graham.dennis@gmail.com) 3 * (C) 2007 Graham Dennis (graham.dennis@gmail.com)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 // JavaScript that changes the window location), do nothing. 193 // JavaScript that changes the window location), do nothing.
194 if (m_state == Terminated) 194 if (m_state == Terminated)
195 return; 195 return;
196 196
197 if (m_notifiedLoadComplete) 197 if (m_notifiedLoadComplete)
198 return; 198 return;
199 m_notifiedLoadComplete = true; 199 m_notifiedLoadComplete = true;
200 m_host->didFinishLoading(m_resource, finishTime, encodedDataLength); 200 m_host->didFinishLoading(m_resource, finishTime, encodedDataLength);
201 } 201 }
202 202
203 void ResourceLoader::didChangePriority(ResourceLoadPriority loadPriority) 203 void ResourceLoader::didChangePriority(ResourceLoadPriority loadPriority, int in traPriorityValue)
204 { 204 {
205 if (m_loader) { 205 if (m_loader) {
206 m_host->didChangeLoadingPriority(m_resource, loadPriority); 206 m_host->didChangeLoadingPriority(m_resource, loadPriority, intraPriority Value);
207 m_loader->didChangePriority(static_cast<blink::WebURLRequest::Priority>( loadPriority)); 207 m_loader->didChangePriority(static_cast<blink::WebURLRequest::Priority>( loadPriority), intraPriorityValue);
208 } 208 }
209 } 209 }
210 210
211 void ResourceLoader::cancelIfNotFinishing() 211 void ResourceLoader::cancelIfNotFinishing()
212 { 212 {
213 if (m_state != Initialized) 213 if (m_state != Initialized)
214 return; 214 return;
215 cancel(); 215 cancel();
216 } 216 }
217 217
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 didFinishLoading(0, monotonicallyIncreasingTime(), encodedDataLength); 478 didFinishLoading(0, monotonicallyIncreasingTime(), encodedDataLength);
479 } 479 }
480 480
481 ResourceRequest& ResourceLoader::applyOptions(ResourceRequest& request) const 481 ResourceRequest& ResourceLoader::applyOptions(ResourceRequest& request) const
482 { 482 {
483 request.setAllowStoredCredentials(m_options.allowCredentials == AllowStoredC redentials); 483 request.setAllowStoredCredentials(m_options.allowCredentials == AllowStoredC redentials);
484 return request; 484 return request;
485 } 485 }
486 486
487 } 487 }
OLDNEW
« no previous file with comments | « Source/core/fetch/ResourceLoader.h ('k') | Source/core/fetch/ResourceLoaderHost.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698