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

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

Issue 2528513003: first-paint and first-contentful paint (Closed)
Patch Set: Got rid of DCHECK cause it breaks unit tests 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "core/timing/PerformancePaintTiming.h"
6
7 #include "bindings/core/v8/V8ObjectBuilder.h"
8
9 namespace blink {
10
11 PerformancePaintTiming::PerformancePaintTiming(PaintType type, double startTime)
12 : PerformanceEntry(fromPaintTypeToString(type),
13 "paint",
14 startTime,
15 startTime) {}
16
17 PerformancePaintTiming::~PerformancePaintTiming() {}
18
19 String PerformancePaintTiming::fromPaintTypeToString(PaintType type) {
20 switch (type) {
21 case PaintType::FirstPaint:
22 return "first-paint";
23 case PaintType::FirstContentfulPaint:
24 return "first-contentful-paint";
25 }
26 NOTREACHED();
27 return "";
28 }
29 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698