Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(347)

Side by Side Diff: third_party/WebKit/Source/core/loader/LinkLoader.h

Issue 2165653004: Don't wait for AppCache for link rel preloads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove empty check Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 String& media, const KURL&, Document&, const N etworkHintsInterface&); 76 bool loadLink(const LinkRelAttribute&, CrossOriginAttributeValue, const Stri ng& type, const String& as, const String& media, const KURL&, Document&, const N etworkHintsInterface&);
77 enum CanLoadResources { OnlyLoadResources, DoNotLoadResources, LoadResources AndPreconnect }; 77 enum CanLoadResources { OnlyLoadResources, DoNotLoadResources, LoadResources AndPreconnect };
78 static void loadLinksFromHeader(const String& headerValue, const KURL& baseU RL, Document*, const NetworkHintsInterface&, CanLoadResources, ViewportDescripti onWrapper*); 78 // Media links cannot be preloaded until the first chunk is parsed. The rest
79 // can be preloaded at commit time.
80 enum MediaPreloadPolicy { LoadAll, OnlyLoadNonMedia, OnlyLoadMedia };
81 static void loadLinksFromHeader(const String& headerValue, const KURL& baseU RL, Document*, const NetworkHintsInterface&, CanLoadResources, MediaPreloadPolic y, ViewportDescriptionWrapper*);
79 static bool getResourceTypeFromAsAttribute(const String& as, Resource::Type& ); 82 static bool getResourceTypeFromAsAttribute(const String& as, Resource::Type& );
80 83
81 DECLARE_TRACE(); 84 DECLARE_TRACE();
82 85
83 private: 86 private:
84 explicit LinkLoader(LinkLoaderClient*); 87 explicit LinkLoader(LinkLoaderClient*);
85 88
86 void linkLoadTimerFired(Timer<LinkLoader>*); 89 void linkLoadTimerFired(Timer<LinkLoader>*);
87 void linkLoadingErrorTimerFired(Timer<LinkLoader>*); 90 void linkLoadingErrorTimerFired(Timer<LinkLoader>*);
88 void createLinkPreloadResourceClient(Resource*); 91 void createLinkPreloadResourceClient(Resource*);
89 92
90 Member<LinkLoaderClient> m_client; 93 Member<LinkLoaderClient> m_client;
91 94
92 Timer<LinkLoader> m_linkLoadTimer; 95 Timer<LinkLoader> m_linkLoadTimer;
93 Timer<LinkLoader> m_linkLoadingErrorTimer; 96 Timer<LinkLoader> m_linkLoadingErrorTimer;
94 97
95 Member<PrerenderHandle> m_prerender; 98 Member<PrerenderHandle> m_prerender;
96 Member<LinkPreloadResourceClient> m_linkPreloadResourceClient; 99 Member<LinkPreloadResourceClient> m_linkPreloadResourceClient;
97 }; 100 };
98 101
99 } // namespace blink 102 } // namespace blink
100 103
101 #endif 104 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameLoader.cpp ('k') | third_party/WebKit/Source/core/loader/LinkLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698