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

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

Issue 2528513003: first-paint and first-contentful paint (Closed)
Patch Set: idl format Created 4 years 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 }
28
29 void PerformancePaintTiming::buildJSONValue(V8ObjectBuilder& builder) const {
panicker 2016/11/29 22:21:15 no need to override this ?
sunjian 2016/12/02 21:39:57 Done.
30 PerformanceEntry::buildJSONValue(builder);
31 }
32 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698