| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 // from PrerenderClient | 67 // from PrerenderClient |
| 68 void didStartPrerender() override; | 68 void didStartPrerender() override; |
| 69 void didStopPrerender() override; | 69 void didStopPrerender() override; |
| 70 void didSendLoadForPrerender() override; | 70 void didSendLoadForPrerender() override; |
| 71 void didSendDOMContentLoadedForPrerender() override; | 71 void didSendDOMContentLoadedForPrerender() override; |
| 72 | 72 |
| 73 void triggerEvents(const Resource*); | 73 void triggerEvents(const Resource*); |
| 74 | 74 |
| 75 void released(); | 75 void released(); |
| 76 bool loadLink(const LinkRelAttribute&, CrossOriginAttributeValue, const Stri
ng& type, const String& as, const KURL&, Document&, const NetworkHintsInterface&
); | 76 bool loadLink(const LinkRelAttribute&, CrossOriginAttributeValue, const Stri
ng& type, const String& as, const KURL&, Document&, const NetworkHintsInterface&
); |
| 77 enum CanLoadResources { LoadResources, DoNotLoadResources }; | 77 enum CanLoadResources { OnlyLoadResources, DoNotLoadResources, LoadResources
AndPreconnect }; |
| 78 static bool loadLinkFromHeader(const String& headerValue, Document*, const N
etworkHintsInterface&, CanLoadResources); | 78 static bool loadLinkFromHeader(const String& headerValue, Document*, const N
etworkHintsInterface&, CanLoadResources); |
| 79 static Resource::Type getTypeFromAsAttribute(const String& as, Document*); | 79 static Resource::Type getTypeFromAsAttribute(const String& as, Document*); |
| 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(ResourcePtr<Resource>); | 88 void createLinkPreloadResourceClient(ResourcePtr<Resource>); |
| 89 | 89 |
| 90 RawPtrWillBeMember<LinkLoaderClient> m_client; | 90 RawPtrWillBeMember<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 OwnPtrWillBeMember<PrerenderHandle> m_prerender; |
| 96 OwnPtrWillBeMember<LinkPreloadResourceClient> m_linkPreloadResourceClient; | 96 OwnPtrWillBeMember<LinkPreloadResourceClient> m_linkPreloadResourceClient; |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 } | 99 } |
| 100 | 100 |
| 101 #endif | 101 #endif |
| OLD | NEW |