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

Unified Diff: third_party/WebKit/Source/core/timing/PerformanceBase.h

Issue 2238883005: POC for InspectorInstrumentation adding InspectorWebPerfAgent Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add task observer to WebPerfAgent Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/timing/PerformanceBase.h
diff --git a/third_party/WebKit/Source/core/timing/PerformanceBase.h b/third_party/WebKit/Source/core/timing/PerformanceBase.h
index a63d7b9cb9567c599607dfee4a02d54000dc082b..4d93ea601a7033a1f8e3f7a683966d450c7e4fc6 100644
--- a/third_party/WebKit/Source/core/timing/PerformanceBase.h
+++ b/third_party/WebKit/Source/core/timing/PerformanceBase.h
@@ -63,6 +63,8 @@ public:
virtual PerformanceTiming* timing() const;
+ virtual void enableInspectorInstrumentation() const;
+
// Reduce the resolution to 5µs to prevent timing attacks. See:
// http://www.w3.org/TR/hr-time-2/#privacy-security
static double clampTimeResolution(double timeSeconds);
@@ -109,6 +111,9 @@ public:
void activateObserver(PerformanceObserver&);
void resumeSuspendedObservers();
+ // Needed by PerformanceObserver. Make Friend class?
+ bool hasObserverFor(PerformanceEntry::EntryType);
+
DECLARE_VIRTUAL_TRACE();
protected:
@@ -121,7 +126,6 @@ protected:
void addFrameTimingBuffer(PerformanceEntry&);
void notifyObserversOfEntry(PerformanceEntry&);
- bool hasObserverFor(PerformanceEntry::EntryType);
void deliverObservationsTimerFired(TimerBase*);
@@ -138,6 +142,7 @@ protected:
PerformanceObservers m_activeObservers;
PerformanceObservers m_suspendedObservers;
Timer<PerformanceBase> m_deliverObservationsTimer;
+ bool m_inspectorInstrumentationEnabled;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698