| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 // The ResourceFetcher provides a per-context interface to the MemoryCache | 56 // The ResourceFetcher provides a per-context interface to the MemoryCache |
| 57 // and enforces a bunch of security checks and rules for resource revalidation. | 57 // 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 | 58 // Its lifetime is roughly per-DocumentLoader, in that it is generally created |
| 59 // in the DocumentLoader constructor and loses its ability to generate network | 59 // in the DocumentLoader constructor and loses its ability to generate network |
| 60 // requests when the DocumentLoader is destroyed. Documents also hold a | 60 // requests when the DocumentLoader is destroyed. Documents also hold a |
| 61 // RefPtr<ResourceFetcher> for their lifetime (and will create one if they | 61 // 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 | 62 // are initialized without a LocalFrame), so a Document can keep a ResourceFetch
er |
| 63 // alive past detach if scripts still reference the Document. | 63 // alive past detach if scripts still reference the Document. |
| 64 class ResourceFetcher final : public RefCounted<ResourceFetcher>, public Resourc
eLoaderHost { | 64 class ResourceFetcher final : public RefCounted<ResourceFetcher>, public Resourc
eLoaderHost { |
| 65 WTF_MAKE_NONCOPYABLE(ResourceFetcher); WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOV
ED; | 65 WTF_MAKE_NONCOPYABLE(ResourceFetcher); WTF_MAKE_FAST_ALLOCATED; |
| 66 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(ResourceFetcher); | |
| 67 friend class ImageLoader; | 66 friend class ImageLoader; |
| 68 friend class ResourceCacheValidationSuppressor; | 67 friend class ResourceCacheValidationSuppressor; |
| 69 | 68 |
| 70 public: | 69 public: |
| 71 static PassRefPtr<ResourceFetcher> create(Document* document) { return adopt
Ref(new ResourceFetcher(document)); } | 70 static PassRefPtr<ResourceFetcher> create(Document* document) { return adopt
Ref(new ResourceFetcher(document)); } |
| 72 virtual ~ResourceFetcher(); | 71 virtual ~ResourceFetcher(); |
| 73 | 72 |
| 74 #if !ENABLE(OILPAN) | 73 #if !ENABLE(OILPAN) |
| 75 using RefCounted<ResourceFetcher>::ref; | 74 using RefCounted<ResourceFetcher>::ref; |
| 76 using RefCounted<ResourceFetcher>::deref; | 75 using RefCounted<ResourceFetcher>::deref; |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 m_loader->m_allowStaleResources = m_previousState; | 220 m_loader->m_allowStaleResources = m_previousState; |
| 222 } | 221 } |
| 223 private: | 222 private: |
| 224 ResourceFetcher* m_loader; | 223 ResourceFetcher* m_loader; |
| 225 bool m_previousState; | 224 bool m_previousState; |
| 226 }; | 225 }; |
| 227 | 226 |
| 228 } // namespace blink | 227 } // namespace blink |
| 229 | 228 |
| 230 #endif | 229 #endif |
| OLD | NEW |