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

Unified Diff: third_party/WebKit/Source/core/frame/UseCounter.h

Issue 2678143003: Move CSS animations use counters to UseCounter (Closed)
Patch Set: Rebase incl FrameHost->Page change, tweak test Created 3 years, 9 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/frame/UseCounter.h
diff --git a/third_party/WebKit/Source/core/frame/UseCounter.h b/third_party/WebKit/Source/core/frame/UseCounter.h
index d00df541ccee139e183207df8d4acfa0457ee422..dca1bd0bb7ef70b89458f9e27d3d493b8e66f5ae 100644
--- a/third_party/WebKit/Source/core/frame/UseCounter.h
+++ b/third_party/WebKit/Source/core/frame/UseCounter.h
@@ -1505,6 +1505,9 @@ class CORE_EXPORT UseCounter {
void count(CSSParserMode, CSSPropertyID);
void count(Feature);
+ static void countAnimatedCSS(const Document&, CSSPropertyID);
+ void countAnimatedCSS(CSSPropertyID);
+
// Count only features if they're being used in an iframe which does not
// have script access into the top level document.
static void countCrossOriginIframe(const Document&, Feature);
@@ -1517,6 +1520,11 @@ class CORE_EXPORT UseCounter {
static bool isCounted(Document&, const String&);
bool isCounted(CSSPropertyID unresolvedProperty);
+ // Return whether the CSSPropertyID was previously counted for this document.
+ // NOTE: only for use in testing.
+ static bool isCountedAnimatedCSS(Document&, const String&);
+ bool isCountedAnimatedCSS(CSSPropertyID unresolvedProperty);
+
// Retains a reference to the observer to notify of UseCounter changes.
void addObserver(Observer*);
@@ -1546,6 +1554,7 @@ class CORE_EXPORT UseCounter {
EnumerationHistogram& featuresHistogram() const;
EnumerationHistogram& cssHistogram() const;
+ EnumerationHistogram& animatedCSSHistogram() const;
// If non-zero, ignore all 'count' calls completely.
unsigned m_muteCount;
@@ -1560,6 +1569,7 @@ class CORE_EXPORT UseCounter {
// histograms.
BitVector m_featuresRecorded;
BitVector m_CSSRecorded;
+ BitVector m_animatedCSSRecorded;
HeapHashSet<Member<Observer>> m_observers;
« no previous file with comments | « third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp ('k') | third_party/WebKit/Source/core/frame/UseCounter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698