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

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

Issue 1116613003: Remove ResourceFetcher's access to a FrameFetchContext when detaching (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 unified diff | Download patch | Annotate | Revision Log
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) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 4 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
5 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ 5 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 typedef HashMap<String, ResourcePtr<Resource>> DocumentResourceMap; 98 typedef HashMap<String, ResourcePtr<Resource>> DocumentResourceMap;
99 const DocumentResourceMap& allResources() const { return m_documentResources ; } 99 const DocumentResourceMap& allResources() const { return m_documentResources ; }
100 100
101 bool autoLoadImages() const { return m_autoLoadImages; } 101 bool autoLoadImages() const { return m_autoLoadImages; }
102 void setAutoLoadImages(bool); 102 void setAutoLoadImages(bool);
103 103
104 void setImagesEnabled(bool); 104 void setImagesEnabled(bool);
105 105
106 bool shouldDeferImageLoad(const KURL&) const; 106 bool shouldDeferImageLoad(const KURL&) const;
107 107
108 FetchContext& context() const { return *m_context.get(); } 108 FetchContext& context() const { return m_context ? *m_context.get() : FetchC ontext::nullInstance(); }
109 void clearContext() { m_context.clear(); }
109 110
110 void garbageCollectDocumentResources(); 111 void garbageCollectDocumentResources();
111 112
112 int requestCount() const; 113 int requestCount() const;
113 114
114 bool isPreloaded(const KURL&) const; 115 bool isPreloaded(const KURL&) const;
115 void clearPreloads(); 116 void clearPreloads();
116 void preload(Resource::Type, FetchRequest&, const String& charset); 117 void preload(Resource::Type, FetchRequest&, const String& charset);
117 void printPreloadStats(); 118 void printPreloadStats();
118 119
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 m_loader->m_allowStaleResources = m_previousState; 255 m_loader->m_allowStaleResources = m_previousState;
255 } 256 }
256 private: 257 private:
257 RawPtrWillBeMember<ResourceFetcher> m_loader; 258 RawPtrWillBeMember<ResourceFetcher> m_loader;
258 bool m_previousState; 259 bool m_previousState;
259 }; 260 };
260 261
261 } // namespace blink 262 } // namespace blink
262 263
263 #endif // ResourceFetcher_h 264 #endif // ResourceFetcher_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698