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

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

Issue 120513004: Don't expose DocumentWriter to embedding layer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/fetch/Resource.h ('k') | Source/core/fetch/ResourceFetcher.cpp » ('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) 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) 2002 Waldo Bastian (bastian@kde.org) 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 , m_preloadResult(PreloadNotReferenced) 109 , m_preloadResult(PreloadNotReferenced)
110 , m_cacheLiveResourcePriority(CacheLiveResourcePriorityLow) 110 , m_cacheLiveResourcePriority(CacheLiveResourcePriorityLow)
111 , m_inLiveDecodedResourcesList(false) 111 , m_inLiveDecodedResourcesList(false)
112 , m_requestedFromNetworkingLayer(false) 112 , m_requestedFromNetworkingLayer(false)
113 , m_inCache(false) 113 , m_inCache(false)
114 , m_loading(false) 114 , m_loading(false)
115 , m_switchingClientsToRevalidatedResource(false) 115 , m_switchingClientsToRevalidatedResource(false)
116 , m_type(type) 116 , m_type(type)
117 , m_status(Pending) 117 , m_status(Pending)
118 , m_wasPurged(false) 118 , m_wasPurged(false)
119 , m_needsSynchronousCacheHit(false)
119 #ifndef NDEBUG 120 #ifndef NDEBUG
120 , m_deleted(false) 121 , m_deleted(false)
121 , m_lruIndex(0) 122 , m_lruIndex(0)
122 #endif 123 #endif
123 , m_nextInAllResourcesList(0) 124 , m_nextInAllResourcesList(0)
124 , m_prevInAllResourcesList(0) 125 , m_prevInAllResourcesList(0)
125 , m_nextInLiveResourcesList(0) 126 , m_nextInLiveResourcesList(0)
126 , m_prevInLiveResourcesList(0) 127 , m_prevInLiveResourcesList(0)
127 , m_resourceToRevalidate(0) 128 , m_resourceToRevalidate(0)
128 , m_proxyResource(0) 129 , m_proxyResource(0)
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 m_preloadResult = PreloadReferencedWhileComplete; 426 m_preloadResult = PreloadReferencedWhileComplete;
426 else if (m_requestedFromNetworkingLayer) 427 else if (m_requestedFromNetworkingLayer)
427 m_preloadResult = PreloadReferencedWhileLoading; 428 m_preloadResult = PreloadReferencedWhileLoading;
428 else 429 else
429 m_preloadResult = PreloadReferenced; 430 m_preloadResult = PreloadReferenced;
430 } 431 }
431 if (!hasClients() && inCache()) 432 if (!hasClients() && inCache())
432 memoryCache()->addToLiveResourcesSize(this); 433 memoryCache()->addToLiveResourcesSize(this);
433 434
434 // If we have existing data to send to the new client and the resource type supprts it, send it asynchronously. 435 // If we have existing data to send to the new client and the resource type supprts it, send it asynchronously.
435 if (!m_response.isNull() && !m_proxyResource && !shouldSendCachedDataSynchro nouslyForType(type())) { 436 if (!m_response.isNull() && !m_proxyResource && !shouldSendCachedDataSynchro nouslyForType(type()) && !m_needsSynchronousCacheHit) {
436 m_clientsAwaitingCallback.add(client); 437 m_clientsAwaitingCallback.add(client);
437 ResourceCallback::callbackHandler()->schedule(this); 438 ResourceCallback::callbackHandler()->schedule(this);
438 return false; 439 return false;
439 } 440 }
440 441
441 m_clients.add(client); 442 m_clients.add(client);
442 return true; 443 return true;
443 } 444 }
444 445
445 void Resource::removeClient(ResourceClient* client) 446 void Resource::removeClient(ResourceClient* client)
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 return "Shader"; 919 return "Shader";
919 case Resource::ImportResource: 920 case Resource::ImportResource:
920 return "ImportResource"; 921 return "ImportResource";
921 } 922 }
922 ASSERT_NOT_REACHED(); 923 ASSERT_NOT_REACHED();
923 return "Unknown"; 924 return "Unknown";
924 } 925 }
925 #endif // !LOG_DISABLED 926 #endif // !LOG_DISABLED
926 927
927 } 928 }
OLDNEW
« no previous file with comments | « Source/core/fetch/Resource.h ('k') | Source/core/fetch/ResourceFetcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698