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

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

Issue 2799093004: Enable ServerTiming support
Patch Set: updates for Patch Set 7 Created 3 years, 8 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 1487 matching lines...) Expand 10 before | Expand all | Expand 10 after
1498 } 1498 }
1499 1499
1500 void LocalDOMWindow::DispatchLoadEvent() { 1500 void LocalDOMWindow::DispatchLoadEvent() {
1501 Event* load_event(Event::Create(EventTypeNames::load)); 1501 Event* load_event(Event::Create(EventTypeNames::load));
1502 if (GetFrame() && GetFrame()->Loader().GetDocumentLoader() && 1502 if (GetFrame() && GetFrame()->Loader().GetDocumentLoader() &&
1503 !GetFrame()->Loader().GetDocumentLoader()->GetTiming().LoadEventStart()) { 1503 !GetFrame()->Loader().GetDocumentLoader()->GetTiming().LoadEventStart()) {
1504 DocumentLoader* document_loader = GetFrame()->Loader().GetDocumentLoader(); 1504 DocumentLoader* document_loader = GetFrame()->Loader().GetDocumentLoader();
1505 DocumentLoadTiming& timing = document_loader->GetTiming(); 1505 DocumentLoadTiming& timing = document_loader->GetTiming();
1506 timing.MarkLoadEventStart(); 1506 timing.MarkLoadEventStart();
1507 DispatchEvent(load_event, document()); 1507 DispatchEvent(load_event, document());
1508 SetHasLoadEventFired();
1508 timing.MarkLoadEventEnd(); 1509 timing.MarkLoadEventEnd();
1509 DCHECK(document_loader->Fetcher()); 1510 DCHECK(document_loader->Fetcher());
1510 // If fetcher->countPreloads() is not empty here, it's full of link 1511 // If fetcher->countPreloads() is not empty here, it's full of link
1511 // preloads, as speculatove preloads were cleared at DCL. 1512 // preloads, as speculatove preloads were cleared at DCL.
1512 if (GetFrame() && 1513 if (GetFrame() &&
1513 document_loader == GetFrame()->Loader().GetDocumentLoader() && 1514 document_loader == GetFrame()->Loader().GetDocumentLoader() &&
1514 document_loader->Fetcher()->CountPreloads()) 1515 document_loader->Fetcher()->CountPreloads())
1515 unused_preloads_timer_.StartOneShot(kUnusedPreloadTimeoutInSeconds, 1516 unused_preloads_timer_.StartOneShot(kUnusedPreloadTimeoutInSeconds,
1516 BLINK_FROM_HERE); 1517 BLINK_FROM_HERE);
1517 } else { 1518 } else {
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
1684 DOMWindow::Trace(visitor); 1685 DOMWindow::Trace(visitor);
1685 Supplementable<LocalDOMWindow>::Trace(visitor); 1686 Supplementable<LocalDOMWindow>::Trace(visitor);
1686 } 1687 }
1687 1688
1688 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) { 1689 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) {
1689 visitor->TraceWrappers(custom_elements_); 1690 visitor->TraceWrappers(custom_elements_);
1690 DOMWindow::TraceWrappers(visitor); 1691 DOMWindow::TraceWrappers(visitor);
1691 } 1692 }
1692 1693
1693 } // namespace blink 1694 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalDOMWindow.h ('k') | third_party/WebKit/Source/core/loader/DocumentLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698