| OLD | NEW |
| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 namespace blink { | 43 namespace blink { |
| 44 | 44 |
| 45 class FetchContext; | 45 class FetchContext; |
| 46 class FontResource; | 46 class FontResource; |
| 47 class ImageResource; | 47 class ImageResource; |
| 48 class RawResource; | 48 class RawResource; |
| 49 class Document; | 49 class Document; |
| 50 class LocalFrame; | 50 class LocalFrame; |
| 51 class FrameLoader; | 51 class FrameLoader; |
| 52 class ImageLoader; | |
| 53 class KURL; | 52 class KURL; |
| 54 class ResourceLoaderSet; | 53 class ResourceLoaderSet; |
| 55 | 54 |
| 56 // The ResourceFetcher provides a per-context interface to the MemoryCache | 55 // The ResourceFetcher provides a per-context interface to the MemoryCache |
| 57 // and enforces a bunch of security checks and rules for resource revalidation. | 56 // and enforces a bunch of security checks and rules for resource revalidation. |
| 58 // Its lifetime is roughly per-DocumentLoader, in that it is generally created | 57 // Its lifetime is roughly per-DocumentLoader, in that it is generally created |
| 59 // in the DocumentLoader constructor and loses its ability to generate network | 58 // in the DocumentLoader constructor and loses its ability to generate network |
| 60 // requests when the DocumentLoader is destroyed. Documents also hold a | 59 // requests when the DocumentLoader is destroyed. Documents also hold a |
| 61 // RefPtr<ResourceFetcher> for their lifetime (and will create one if they | 60 // RefPtr<ResourceFetcher> for their lifetime (and will create one if they |
| 62 // are initialized without a LocalFrame), so a Document can keep a ResourceFetch
er | 61 // are initialized without a LocalFrame), so a Document can keep a ResourceFetch
er |
| 63 // alive past detach if scripts still reference the Document. | 62 // alive past detach if scripts still reference the Document. |
| 64 class ResourceFetcher final : public RefCounted<ResourceFetcher>, public Resourc
eLoaderHost { | 63 class ResourceFetcher final : public RefCounted<ResourceFetcher>, public Resourc
eLoaderHost { |
| 65 WTF_MAKE_NONCOPYABLE(ResourceFetcher); WTF_MAKE_FAST_ALLOCATED; | 64 WTF_MAKE_NONCOPYABLE(ResourceFetcher); WTF_MAKE_FAST_ALLOCATED; |
| 66 friend class ImageLoader; | |
| 67 friend class ResourceCacheValidationSuppressor; | 65 friend class ResourceCacheValidationSuppressor; |
| 68 | 66 |
| 69 public: | 67 public: |
| 70 static PassRefPtr<ResourceFetcher> create(Document* document) { return adopt
Ref(new ResourceFetcher(document)); } | 68 static PassRefPtr<ResourceFetcher> create(Document* document) { return adopt
Ref(new ResourceFetcher(document)); } |
| 71 virtual ~ResourceFetcher(); | 69 virtual ~ResourceFetcher(); |
| 72 | 70 |
| 73 #if !ENABLE(OILPAN) | 71 #if !ENABLE(OILPAN) |
| 74 using RefCounted<ResourceFetcher>::ref; | 72 using RefCounted<ResourceFetcher>::ref; |
| 75 using RefCounted<ResourceFetcher>::deref; | 73 using RefCounted<ResourceFetcher>::deref; |
| 76 #endif | 74 #endif |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 m_loader->m_allowStaleResources = m_previousState; | 210 m_loader->m_allowStaleResources = m_previousState; |
| 213 } | 211 } |
| 214 private: | 212 private: |
| 215 ResourceFetcher* m_loader; | 213 ResourceFetcher* m_loader; |
| 216 bool m_previousState; | 214 bool m_previousState; |
| 217 }; | 215 }; |
| 218 | 216 |
| 219 } // namespace blink | 217 } // namespace blink |
| 220 | 218 |
| 221 #endif // SKY_ENGINE_CORE_FETCH_RESOURCEFETCHER_H_ | 219 #endif // SKY_ENGINE_CORE_FETCH_RESOURCEFETCHER_H_ |
| OLD | NEW |