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 return ""; |
| 28 } |
| 29 } // namespace blink |
OLD | NEW |