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

Side by Side Diff: third_party/WebKit/Source/core/timing/PerformanceBase.cpp

Issue 2646933002: Move PerformanceBase to TaskRunnerTimer. (Closed)
Patch Set: unneeded includes Created 3 years, 11 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Intel Inc. All rights reserved. 3 * Copyright (C) 2012 Intel 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 are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 return nullptr; 59 return nullptr;
60 } 60 }
61 61
62 } // namespace 62 } // namespace
63 63
64 using PerformanceObserverVector = HeapVector<Member<PerformanceObserver>>; 64 using PerformanceObserverVector = HeapVector<Member<PerformanceObserver>>;
65 65
66 static const size_t defaultResourceTimingBufferSize = 150; 66 static const size_t defaultResourceTimingBufferSize = 150;
67 static const size_t defaultFrameTimingBufferSize = 150; 67 static const size_t defaultFrameTimingBufferSize = 150;
68 68
69 PerformanceBase::PerformanceBase(double timeOrigin) 69 PerformanceBase::PerformanceBase(double timeOrigin,
70 RefPtr<WebTaskRunner> taskRunner)
70 : m_frameTimingBufferSize(defaultFrameTimingBufferSize), 71 : m_frameTimingBufferSize(defaultFrameTimingBufferSize),
71 m_resourceTimingBufferSize(defaultResourceTimingBufferSize), 72 m_resourceTimingBufferSize(defaultResourceTimingBufferSize),
72 m_userTiming(nullptr), 73 m_userTiming(nullptr),
73 m_timeOrigin(timeOrigin), 74 m_timeOrigin(timeOrigin),
74 m_observerFilterOptions(PerformanceEntry::Invalid), 75 m_observerFilterOptions(PerformanceEntry::Invalid),
75 m_deliverObservationsTimer( 76 m_deliverObservationsTimer(
77 std::move(taskRunner),
76 this, 78 this,
77 &PerformanceBase::deliverObservationsTimerFired) {} 79 &PerformanceBase::deliverObservationsTimerFired) {}
78 80
79 PerformanceBase::~PerformanceBase() {} 81 PerformanceBase::~PerformanceBase() {}
80 82
81 PerformanceNavigationTiming::NavigationType PerformanceBase::getNavigationType( 83 PerformanceNavigationTiming::NavigationType PerformanceBase::getNavigationType(
82 NavigationType type, 84 NavigationType type,
83 const Document* document) { 85 const Document* document) {
84 if (document && 86 if (document &&
85 document->pageVisibilityState() == PageVisibilityStatePrerender) { 87 document->pageVisibilityState() == PageVisibilityStatePrerender) {
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 visitor->trace(m_resourceTimingBuffer); 599 visitor->trace(m_resourceTimingBuffer);
598 visitor->trace(m_navigationTiming); 600 visitor->trace(m_navigationTiming);
599 visitor->trace(m_userTiming); 601 visitor->trace(m_userTiming);
600 visitor->trace(m_observers); 602 visitor->trace(m_observers);
601 visitor->trace(m_activeObservers); 603 visitor->trace(m_activeObservers);
602 visitor->trace(m_suspendedObservers); 604 visitor->trace(m_suspendedObservers);
603 EventTargetWithInlineData::trace(visitor); 605 EventTargetWithInlineData::trace(visitor);
604 } 606 }
605 607
606 } // namespace blink 608 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/timing/PerformanceBase.h ('k') | third_party/WebKit/Source/core/timing/PerformanceBaseTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698