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

Side by Side Diff: third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp

Issue 2962113002: Updates to Server-Timing in accordance with with spec changes (Closed)
Patch Set: Created 3 years, 5 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) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
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 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after
1485 } 1485 }
1486 1486
1487 void LocalDOMWindow::DispatchLoadEvent() { 1487 void LocalDOMWindow::DispatchLoadEvent() {
1488 Event* load_event(Event::Create(EventTypeNames::load)); 1488 Event* load_event(Event::Create(EventTypeNames::load));
1489 if (GetFrame() && GetFrame()->Loader().GetDocumentLoader() && 1489 if (GetFrame() && GetFrame()->Loader().GetDocumentLoader() &&
1490 !GetFrame()->Loader().GetDocumentLoader()->GetTiming().LoadEventStart()) { 1490 !GetFrame()->Loader().GetDocumentLoader()->GetTiming().LoadEventStart()) {
1491 DocumentLoader* document_loader = GetFrame()->Loader().GetDocumentLoader(); 1491 DocumentLoader* document_loader = GetFrame()->Loader().GetDocumentLoader();
1492 DocumentLoadTiming& timing = document_loader->GetTiming(); 1492 DocumentLoadTiming& timing = document_loader->GetTiming();
1493 timing.MarkLoadEventStart(); 1493 timing.MarkLoadEventStart();
1494 DispatchEvent(load_event, document()); 1494 DispatchEvent(load_event, document());
1495 SetHasLoadEventFired();
1496 timing.MarkLoadEventEnd(); 1495 timing.MarkLoadEventEnd();
1497 DCHECK(document_loader->Fetcher()); 1496 DCHECK(document_loader->Fetcher());
1498 // If fetcher->countPreloads() is not empty here, it's full of link 1497 // If fetcher->countPreloads() is not empty here, it's full of link
1499 // preloads, as speculatove preloads were cleared at DCL. 1498 // preloads, as speculatove preloads were cleared at DCL.
1500 if (GetFrame() && 1499 if (GetFrame() &&
1501 document_loader == GetFrame()->Loader().GetDocumentLoader() && 1500 document_loader == GetFrame()->Loader().GetDocumentLoader() &&
1502 document_loader->Fetcher()->CountPreloads()) 1501 document_loader->Fetcher()->CountPreloads())
1503 unused_preloads_timer_.StartOneShot(kUnusedPreloadTimeoutInSeconds, 1502 unused_preloads_timer_.StartOneShot(kUnusedPreloadTimeoutInSeconds,
1504 BLINK_FROM_HERE); 1503 BLINK_FROM_HERE);
1505 } else { 1504 } else {
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1665 DOMWindow::Trace(visitor); 1664 DOMWindow::Trace(visitor);
1666 Supplementable<LocalDOMWindow>::Trace(visitor); 1665 Supplementable<LocalDOMWindow>::Trace(visitor);
1667 } 1666 }
1668 1667
1669 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) { 1668 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) {
1670 visitor->TraceWrappers(custom_elements_); 1669 visitor->TraceWrappers(custom_elements_);
1671 DOMWindow::TraceWrappers(visitor); 1670 DOMWindow::TraceWrappers(visitor);
1672 } 1671 }
1673 1672
1674 } // namespace blink 1673 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698