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

Unified Diff: third_party/WebKit/Source/core/css/CSSTiming.h

Issue 2468913002: Add CSSTiming to collect aggregate PLT-level stats about CSS. (Closed)
Patch Set: fix browser test Created 4 years, 1 month 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
« no previous file with comments | « third_party/WebKit/Source/core/css/BUILD.gn ('k') | third_party/WebKit/Source/core/css/CSSTiming.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/CSSTiming.h
diff --git a/third_party/WebKit/Source/core/css/CSSTiming.h b/third_party/WebKit/Source/core/css/CSSTiming.h
new file mode 100644
index 0000000000000000000000000000000000000000..3e9873e4f3e31fa10a8067ef878a1df0efdd4a20
--- /dev/null
+++ b/third_party/WebKit/Source/core/css/CSSTiming.h
@@ -0,0 +1,46 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CSSTiming_h
+#define CSSTiming_h
+
+#include "core/dom/Document.h"
+#include "platform/Supplementable.h"
+#include "platform/heap/Handle.h"
+#include "wtf/Noncopyable.h"
+
+namespace blink {
+
+class PaintTiming;
+
+class CSSTiming : public GarbageCollectedFinalized<CSSTiming>,
+ public Supplement<Document> {
+ WTF_MAKE_NONCOPYABLE(CSSTiming);
+ USING_GARBAGE_COLLECTED_MIXIN(CSSTiming);
+
+ public:
+ virtual ~CSSTiming() {}
+
+ // TODO(csharrison): Also record update style time before first paint.
+ void recordAuthorStyleSheetParseTime(double seconds);
+
+ double authorStyleSheetParseDurationBeforeFCP() const {
+ return m_parseTimeBeforeFCP;
+ }
+
+ static CSSTiming& from(Document&);
+ DECLARE_VIRTUAL_TRACE();
+
+ private:
+ explicit CSSTiming(Document&);
+
+ double m_parseTimeBeforeFCP = 0;
+
+ Member<Document> m_document;
+ Member<PaintTiming> m_paintTiming;
+};
+
+} // namespace blink
+
+#endif // CSSTiming_h
« no previous file with comments | « third_party/WebKit/Source/core/css/BUILD.gn ('k') | third_party/WebKit/Source/core/css/CSSTiming.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698