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 28 matching lines...) Expand all Loading... |
39 #include "platform/Timer.h" | 39 #include "platform/Timer.h" |
40 #include "wtf/OwnPtr.h" | 40 #include "wtf/OwnPtr.h" |
41 | 41 |
42 namespace blink { | 42 namespace blink { |
43 | 43 |
44 class Document; | 44 class Document; |
45 class LinkRelAttribute; | 45 class LinkRelAttribute; |
46 class PrerenderHandle; | 46 class PrerenderHandle; |
47 | 47 |
48 // The LinkLoader can load link rel types icon, dns-prefetch, subresource, prefe
tch and prerender. | 48 // The LinkLoader can load link rel types icon, dns-prefetch, subresource, prefe
tch and prerender. |
49 class LinkLoader FINAL : public ResourceOwner<Resource, ResourceClient>, public
PrerenderClient { | 49 class LinkLoader final : public ResourceOwner<Resource, ResourceClient>, public
PrerenderClient { |
50 | 50 |
51 public: | 51 public: |
52 explicit LinkLoader(LinkLoaderClient*); | 52 explicit LinkLoader(LinkLoaderClient*); |
53 virtual ~LinkLoader(); | 53 virtual ~LinkLoader(); |
54 | 54 |
55 // from ResourceClient | 55 // from ResourceClient |
56 virtual void notifyFinished(Resource*) OVERRIDE; | 56 virtual void notifyFinished(Resource*) override; |
57 | 57 |
58 // from PrerenderClient | 58 // from PrerenderClient |
59 virtual void didStartPrerender() OVERRIDE; | 59 virtual void didStartPrerender() override; |
60 virtual void didStopPrerender() OVERRIDE; | 60 virtual void didStopPrerender() override; |
61 virtual void didSendLoadForPrerender() OVERRIDE; | 61 virtual void didSendLoadForPrerender() override; |
62 virtual void didSendDOMContentLoadedForPrerender() OVERRIDE; | 62 virtual void didSendDOMContentLoadedForPrerender() override; |
63 | 63 |
64 void released(); | 64 void released(); |
65 bool loadLink(const LinkRelAttribute&, const AtomicString& crossOriginMode,
const String& type, const KURL&, Document&); | 65 bool loadLink(const LinkRelAttribute&, const AtomicString& crossOriginMode,
const String& type, const KURL&, Document&); |
66 | 66 |
67 private: | 67 private: |
68 void linkLoadTimerFired(Timer<LinkLoader>*); | 68 void linkLoadTimerFired(Timer<LinkLoader>*); |
69 void linkLoadingErrorTimerFired(Timer<LinkLoader>*); | 69 void linkLoadingErrorTimerFired(Timer<LinkLoader>*); |
70 | 70 |
71 LinkLoaderClient* m_client; | 71 LinkLoaderClient* m_client; |
72 | 72 |
73 Timer<LinkLoader> m_linkLoadTimer; | 73 Timer<LinkLoader> m_linkLoadTimer; |
74 Timer<LinkLoader> m_linkLoadingErrorTimer; | 74 Timer<LinkLoader> m_linkLoadingErrorTimer; |
75 | 75 |
76 OwnPtr<PrerenderHandle> m_prerender; | 76 OwnPtr<PrerenderHandle> m_prerender; |
77 }; | 77 }; |
78 | 78 |
79 } | 79 } |
80 | 80 |
81 #endif | 81 #endif |
OLD | NEW |