OLD | NEW |
---|---|
(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 | |
OLD | NEW |