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

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

Issue 1563263002: Add HTMLPreloadScanner support for <link rel=preload> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a test as well as 2 bugs that other tests revealed Created 4 years, 11 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // from PrerenderClient 63 // from PrerenderClient
64 void didStartPrerender() override; 64 void didStartPrerender() override;
65 void didStopPrerender() override; 65 void didStopPrerender() override;
66 void didSendLoadForPrerender() override; 66 void didSendLoadForPrerender() override;
67 void didSendDOMContentLoadedForPrerender() override; 67 void didSendDOMContentLoadedForPrerender() override;
68 68
69 void released(); 69 void released();
70 bool loadLink(const LinkRelAttribute&, CrossOriginAttributeValue, const Stri ng& type, const String& as, const KURL&, Document&, const NetworkHintsInterface& ); 70 bool loadLink(const LinkRelAttribute&, CrossOriginAttributeValue, const Stri ng& type, const String& as, const KURL&, Document&, const NetworkHintsInterface& );
71 enum CanLoadResources { LoadResources, DoNotLoadResources }; 71 enum CanLoadResources { LoadResources, DoNotLoadResources };
72 static bool loadLinkFromHeader(const String& headerValue, Document*, const N etworkHintsInterface&, CanLoadResources); 72 static bool loadLinkFromHeader(const String& headerValue, Document*, const N etworkHintsInterface&, CanLoadResources);
73 static Resource::Type getTypeFromAsAttribute(const String& as, Document*);
73 74
74 DECLARE_TRACE(); 75 DECLARE_TRACE();
75 76
76 private: 77 private:
77 void linkLoadTimerFired(Timer<LinkLoader>*); 78 void linkLoadTimerFired(Timer<LinkLoader>*);
78 void linkLoadingErrorTimerFired(Timer<LinkLoader>*); 79 void linkLoadingErrorTimerFired(Timer<LinkLoader>*);
79 80
80 LinkLoaderClient* m_client; 81 LinkLoaderClient* m_client;
81 82
82 Timer<LinkLoader> m_linkLoadTimer; 83 Timer<LinkLoader> m_linkLoadTimer;
83 Timer<LinkLoader> m_linkLoadingErrorTimer; 84 Timer<LinkLoader> m_linkLoadingErrorTimer;
84 85
85 OwnPtrWillBeMember<PrerenderHandle> m_prerender; 86 OwnPtrWillBeMember<PrerenderHandle> m_prerender;
86 }; 87 };
87 88
88 } 89 }
89 90
90 #endif 91 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698