OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
201 break; | 201 break; |
202 default: | 202 default: |
203 ASSERT_NOT_REACHED(); | 203 ASSERT_NOT_REACHED(); |
204 } | 204 } |
205 | 205 |
206 if (resource) | 206 if (resource) |
207 fetcher()->preloadStarted(resource); | 207 fetcher()->preloadStarted(resource); |
208 return resource; | 208 return resource; |
209 } | 209 } |
210 | 210 |
211 void DocumentLoader::dispatchLinkHeaderPreloads(ViewportDescriptionWrapper* view port, LinkLoader::MediaPreloadPolicy mediaPolicy) | |
212 { | |
213 String linkHeader = response().httpHeaderField(HTTPNames::Link); | |
214 if (!linkHeader.isEmpty()) { | |
Yoav Weiss
2016/07/22 16:03:46
Why is this wrapper needed? There's already an emp
Charlie Harrison
2016/07/22 16:54:24
Ah good catch. Removed. I still kept this helper f
| |
215 LinkLoader::loadLinksFromHeader(linkHeader, response().url(), | |
216 m_frame->document(), NetworkHintsInterfaceImpl(), LinkLoader::OnlyLo adResources, mediaPolicy, viewport); | |
217 } | |
218 } | |
219 | |
211 void DocumentLoader::didChangePerformanceTiming() | 220 void DocumentLoader::didChangePerformanceTiming() |
212 { | 221 { |
213 if (frame() && frame()->isMainFrame() && m_state >= Committed) { | 222 if (frame() && frame()->isMainFrame() && m_state >= Committed) { |
214 frameLoader()->client()->didChangePerformanceTiming(); | 223 frameLoader()->client()->didChangePerformanceTiming(); |
215 } | 224 } |
216 } | 225 } |
217 | 226 |
218 void DocumentLoader::didObserveLoadingBehavior(WebLoadingBehaviorFlag behavior) | 227 void DocumentLoader::didObserveLoadingBehavior(WebLoadingBehaviorFlag behavior) |
219 { | 228 { |
220 if (frame() && frame()->isMainFrame()) { | 229 if (frame() && frame()->isMainFrame()) { |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
705 { | 714 { |
706 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding() : emptyAtom, true, ForceSynchronousParsing); | 715 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding() : emptyAtom, true, ForceSynchronousParsing); |
707 if (!source.isNull()) | 716 if (!source.isNull()) |
708 m_writer->appendReplacingData(source); | 717 m_writer->appendReplacingData(source); |
709 endWriting(m_writer.get()); | 718 endWriting(m_writer.get()); |
710 } | 719 } |
711 | 720 |
712 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 721 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
713 | 722 |
714 } // namespace blink | 723 } // namespace blink |
OLD | NEW |