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

Side by Side Diff: third_party/WebKit/Source/core/timing/PerformanceEntry.h

Issue 2528513003: first-paint and first-contentful paint (Closed)
Patch Set: updated PerformanceEntryType size 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
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Intel Inc. All rights reserved. 3 * Copyright (C) 2012 Intel Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 25 matching lines...) Expand all
36 #include "core/CoreExport.h" 36 #include "core/CoreExport.h"
37 #include "platform/heap/Handle.h" 37 #include "platform/heap/Handle.h"
38 #include "wtf/text/WTFString.h" 38 #include "wtf/text/WTFString.h"
39 39
40 namespace blink { 40 namespace blink {
41 41
42 class ScriptState; 42 class ScriptState;
43 class ScriptValue; 43 class ScriptValue;
44 class V8ObjectBuilder; 44 class V8ObjectBuilder;
45 45
46 using PerformanceEntryType = unsigned char; 46 using PerformanceEntryType = unsigned short;
panicker 2017/01/06 23:55:31 prefer unsigned long so we don't have to worry abo
sunjian 2017/01/07 00:19:34 Done.
47 using PerformanceEntryTypeMask = unsigned char; 47 using PerformanceEntryTypeMask = unsigned short;
48 48
49 class CORE_EXPORT PerformanceEntry 49 class CORE_EXPORT PerformanceEntry
50 : public GarbageCollectedFinalized<PerformanceEntry>, 50 : public GarbageCollectedFinalized<PerformanceEntry>,
51 public ScriptWrappable { 51 public ScriptWrappable {
52 DEFINE_WRAPPERTYPEINFO(); 52 DEFINE_WRAPPERTYPEINFO();
53 53
54 public: 54 public:
55 virtual ~PerformanceEntry(); 55 virtual ~PerformanceEntry();
56 56
57 enum EntryType { 57 enum EntryType {
58 Invalid = 0, 58 Invalid = 0,
59 Navigation = 1 << 0, 59 Navigation = 1 << 0,
60 Composite = 1 << 1, 60 Composite = 1 << 1,
61 Mark = 1 << 2, 61 Mark = 1 << 2,
62 Measure = 1 << 3, 62 Measure = 1 << 3,
63 Render = 1 << 4, 63 Render = 1 << 4,
64 Resource = 1 << 5, 64 Resource = 1 << 5,
65 LongTask = 1 << 6, 65 LongTask = 1 << 6,
66 TaskAttribution = 1 << 7, 66 TaskAttribution = 1 << 7,
67 Paint = 1 << 8
67 }; 68 };
68 69
69 String name() const; 70 String name() const;
70 String entryType() const; 71 String entryType() const;
71 double startTime() const; 72 double startTime() const;
72 double duration() const; 73 double duration() const;
73 74
74 ScriptValue toJSONForBinding(ScriptState*) const; 75 ScriptValue toJSONForBinding(ScriptState*) const;
75 76
76 PerformanceEntryType entryTypeEnum() const { return m_entryTypeEnum; } 77 PerformanceEntryType entryTypeEnum() const { return m_entryTypeEnum; }
(...skipping 24 matching lines...) Expand all
101 const String m_name; 102 const String m_name;
102 const String m_entryType; 103 const String m_entryType;
103 const double m_startTime; 104 const double m_startTime;
104 const double m_duration; 105 const double m_duration;
105 const PerformanceEntryType m_entryTypeEnum; 106 const PerformanceEntryType m_entryTypeEnum;
106 }; 107 };
107 108
108 } // namespace blink 109 } // namespace blink
109 110
110 #endif // PerformanceEntry_h 111 #endif // PerformanceEntry_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/timing/PerformanceBase.cpp ('k') | third_party/WebKit/Source/core/timing/PerformanceEntry.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698