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

Side by Side Diff: Source/core/loader/FrameFetchContext.cpp

Issue 1186303002: Make ResourceTimingInfo non-refcounted (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « Source/core/loader/FrameFetchContext.h ('k') | Source/core/timing/ResourceTimingInfo.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 { 302 {
303 if (m_documentLoader) 303 if (m_documentLoader)
304 m_documentLoader->applicationCacheHost()->willStartLoadingResource(reque st); 304 m_documentLoader->applicationCacheHost()->willStartLoadingResource(reque st);
305 } 305 }
306 306
307 void FrameFetchContext::didLoadResource() 307 void FrameFetchContext::didLoadResource()
308 { 308 {
309 frame()->loader().checkCompleted(); 309 frame()->loader().checkCompleted();
310 } 310 }
311 311
312 void FrameFetchContext::addResourceTiming(ResourceTimingInfo* info, bool isMainR esource) 312 void FrameFetchContext::addResourceTiming(const ResourceTimingInfo& info)
313 { 313 {
314 Document* initiatorDocument = m_document && isMainResource ? m_document->par entDocument() : m_document.get(); 314 Document* initiatorDocument = m_document && info.isMainResource() ? m_docume nt->parentDocument() : m_document.get();
315 if (!initiatorDocument || !initiatorDocument->domWindow()) 315 if (!initiatorDocument || !initiatorDocument->domWindow())
316 return; 316 return;
317 DOMWindowPerformance::performance(*initiatorDocument->domWindow())->addResou rceTiming(*info); 317 DOMWindowPerformance::performance(*initiatorDocument->domWindow())->addResou rceTiming(info);
318 } 318 }
319 319
320 bool FrameFetchContext::allowImage(bool imagesEnabled, const KURL& url) const 320 bool FrameFetchContext::allowImage(bool imagesEnabled, const KURL& url) const
321 { 321 {
322 return frame()->loader().client()->allowImage(imagesEnabled, url); 322 return frame()->loader().client()->allowImage(imagesEnabled, url);
323 } 323 }
324 324
325 void FrameFetchContext::printAccessDeniedMessage(const KURL& url) const 325 void FrameFetchContext::printAccessDeniedMessage(const KURL& url) const
326 { 326 {
327 if (url.isNull()) 327 if (url.isNull())
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 UseCounter::count(frame(), UseCounter::ClientHintsViewportWidth); 656 UseCounter::count(frame(), UseCounter::ClientHintsViewportWidth);
657 } 657 }
658 658
659 DEFINE_TRACE(FrameFetchContext) 659 DEFINE_TRACE(FrameFetchContext)
660 { 660 {
661 visitor->trace(m_document); 661 visitor->trace(m_document);
662 FetchContext::trace(visitor); 662 FetchContext::trace(visitor);
663 } 663 }
664 664
665 } // namespace blink 665 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/loader/FrameFetchContext.h ('k') | Source/core/timing/ResourceTimingInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698