| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 #include "wtf/OwnPtr.h" | 44 #include "wtf/OwnPtr.h" |
| 45 | 45 |
| 46 namespace blink { | 46 namespace blink { |
| 47 | 47 |
| 48 class Document; | 48 class Document; |
| 49 class LinkRelAttribute; | 49 class LinkRelAttribute; |
| 50 class NetworkHintsInterface; | 50 class NetworkHintsInterface; |
| 51 class PrerenderHandle; | 51 class PrerenderHandle; |
| 52 | 52 |
| 53 // The LinkLoader can load link rel types icon, dns-prefetch, subresource, prefe
tch and prerender. | 53 // The LinkLoader can load link rel types icon, dns-prefetch, subresource, prefe
tch and prerender. |
| 54 class CORE_EXPORT LinkLoader final : public NoBaseWillBeGarbageCollectedFinalize
d<LinkLoader>, public ResourceOwner<Resource, ResourceClient>, public PrerenderC
lient { | 54 class CORE_EXPORT LinkLoader final : public GarbageCollectedFinalized<LinkLoader
>, public ResourceOwner<Resource, ResourceClient>, public PrerenderClient { |
| 55 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(LinkLoader); | 55 USING_GARBAGE_COLLECTED_MIXIN(LinkLoader); |
| 56 public: | 56 public: |
| 57 static PassOwnPtrWillBeRawPtr<LinkLoader> create(LinkLoaderClient* client) | 57 static RawPtr<LinkLoader> create(LinkLoaderClient* client) |
| 58 { | 58 { |
| 59 return adoptPtrWillBeNoop(new LinkLoader(client)); | 59 return (new LinkLoader(client)); |
| 60 } | 60 } |
| 61 ~LinkLoader() override; | 61 ~LinkLoader() override; |
| 62 | 62 |
| 63 // from ResourceClient | 63 // from ResourceClient |
| 64 void notifyFinished(Resource*) override; | 64 void notifyFinished(Resource*) override; |
| 65 String debugName() const override { return "LinkLoader"; } | 65 String debugName() const override { return "LinkLoader"; } |
| 66 | 66 |
| 67 // from PrerenderClient | 67 // from PrerenderClient |
| 68 void didStartPrerender() override; | 68 void didStartPrerender() override; |
| 69 void didStopPrerender() override; | 69 void didStopPrerender() override; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 80 | 80 |
| 81 DECLARE_TRACE(); | 81 DECLARE_TRACE(); |
| 82 | 82 |
| 83 private: | 83 private: |
| 84 explicit LinkLoader(LinkLoaderClient*); | 84 explicit LinkLoader(LinkLoaderClient*); |
| 85 | 85 |
| 86 void linkLoadTimerFired(Timer<LinkLoader>*); | 86 void linkLoadTimerFired(Timer<LinkLoader>*); |
| 87 void linkLoadingErrorTimerFired(Timer<LinkLoader>*); | 87 void linkLoadingErrorTimerFired(Timer<LinkLoader>*); |
| 88 void createLinkPreloadResourceClient(Resource*); | 88 void createLinkPreloadResourceClient(Resource*); |
| 89 | 89 |
| 90 RawPtrWillBeMember<LinkLoaderClient> m_client; | 90 Member<LinkLoaderClient> m_client; |
| 91 | 91 |
| 92 Timer<LinkLoader> m_linkLoadTimer; | 92 Timer<LinkLoader> m_linkLoadTimer; |
| 93 Timer<LinkLoader> m_linkLoadingErrorTimer; | 93 Timer<LinkLoader> m_linkLoadingErrorTimer; |
| 94 | 94 |
| 95 OwnPtrWillBeMember<PrerenderHandle> m_prerender; | 95 Member<PrerenderHandle> m_prerender; |
| 96 OwnPtrWillBeMember<LinkPreloadResourceClient> m_linkPreloadResourceClient; | 96 Member<LinkPreloadResourceClient> m_linkPreloadResourceClient; |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 } // namespace blink | 99 } // namespace blink |
| 100 | 100 |
| 101 #endif | 101 #endif |
| OLD | NEW |