OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 } | 190 } |
191 return UseProtocolCachePolicy; | 191 return UseProtocolCachePolicy; |
192 } | 192 } |
193 | 193 |
194 // FIXME(http://crbug.com/274173): | 194 // FIXME(http://crbug.com/274173): |
195 // |loader| can be null if the resource is loaded from imported document. | 195 // |loader| can be null if the resource is loaded from imported document. |
196 // This means inspector, which uses DocumentLoader as an grouping entity, | 196 // This means inspector, which uses DocumentLoader as an grouping entity, |
197 // cannot see imported documents. | 197 // cannot see imported documents. |
198 inline DocumentLoader* FrameFetchContext::ensureLoaderForNotifications() | 198 inline DocumentLoader* FrameFetchContext::ensureLoaderForNotifications() |
199 { | 199 { |
200 return m_documentLoader ? m_documentLoader : frame()->loader().documentLoade
r(); | 200 return m_documentLoader ? m_documentLoader.get() : frame()->loader().documen
tLoader(); |
201 } | 201 } |
202 | 202 |
203 void FrameFetchContext::dispatchDidChangeResourcePriority(unsigned long identifi
er, ResourceLoadPriority loadPriority, int intraPriorityValue) | 203 void FrameFetchContext::dispatchDidChangeResourcePriority(unsigned long identifi
er, ResourceLoadPriority loadPriority, int intraPriorityValue) |
204 { | 204 { |
205 frame()->loader().client()->dispatchDidChangeResourcePriority(identifier, lo
adPriority, intraPriorityValue); | 205 frame()->loader().client()->dispatchDidChangeResourcePriority(identifier, lo
adPriority, intraPriorityValue); |
206 } | 206 } |
207 | 207 |
208 void FrameFetchContext::dispatchWillSendRequest(unsigned long identifier, Resour
ceRequest& request, const ResourceResponse& redirectResponse, const FetchInitiat
orInfo& initiatorInfo) | 208 void FrameFetchContext::dispatchWillSendRequest(unsigned long identifier, Resour
ceRequest& request, const ResourceResponse& redirectResponse, const FetchInitiat
orInfo& initiatorInfo) |
209 { | 209 { |
210 frame()->loader().applyUserAgent(request); | 210 frame()->loader().applyUserAgent(request); |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 } | 657 } |
658 | 658 |
659 bool FrameFetchContext::isLowPriorityIframe() const | 659 bool FrameFetchContext::isLowPriorityIframe() const |
660 { | 660 { |
661 return !frame()->isMainFrame() && frame()->settings() && frame()->settings()
->lowPriorityIframes(); | 661 return !frame()->isMainFrame() && frame()->settings() && frame()->settings()
->lowPriorityIframes(); |
662 } | 662 } |
663 | 663 |
664 DEFINE_TRACE(FrameFetchContext) | 664 DEFINE_TRACE(FrameFetchContext) |
665 { | 665 { |
666 visitor->trace(m_document); | 666 visitor->trace(m_document); |
| 667 visitor->trace(m_documentLoader); |
667 FetchContext::trace(visitor); | 668 FetchContext::trace(visitor); |
668 } | 669 } |
669 | 670 |
670 } // namespace blink | 671 } // namespace blink |
OLD | NEW |