OLD | NEW |
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 enum EntryType : PerformanceEntryType { | 58 enum EntryType : PerformanceEntryType { |
59 kInvalid = 0, | 59 kInvalid = 0, |
60 kNavigation = 1 << 0, | 60 kNavigation = 1 << 0, |
61 kComposite = 1 << 1, | 61 kComposite = 1 << 1, |
62 kMark = 1 << 2, | 62 kMark = 1 << 2, |
63 kMeasure = 1 << 3, | 63 kMeasure = 1 << 3, |
64 kRender = 1 << 4, | 64 kRender = 1 << 4, |
65 kResource = 1 << 5, | 65 kResource = 1 << 5, |
66 kLongTask = 1 << 6, | 66 kLongTask = 1 << 6, |
67 kTaskAttribution = 1 << 7, | 67 kTaskAttribution = 1 << 7, |
68 kPaint = 1 << 8, | 68 kPaint = 1 << 8 |
69 kServer = 1 << 9 | |
70 }; | 69 }; |
71 | 70 |
72 String name() const; | 71 String name() const; |
73 String entryType() const; | 72 String entryType() const; |
74 DOMHighResTimeStamp startTime() const; | 73 DOMHighResTimeStamp startTime() const; |
75 // PerformanceNavigationTiming will override this due to | 74 // PerformanceNavigationTiming will override this due to |
76 // the nature of reporting it early, which means not having a | 75 // the nature of reporting it early, which means not having a |
77 // finish time available at construction time. | 76 // finish time available at construction time. |
78 // Other classes must NOT override this. | 77 // Other classes must NOT override this. |
79 virtual DOMHighResTimeStamp duration() const; | 78 virtual DOMHighResTimeStamp duration() const; |
(...skipping 15 matching lines...) Expand all Loading... |
95 | 94 |
96 static PerformanceEntry::EntryType ToEntryTypeEnum(const String& entry_type); | 95 static PerformanceEntry::EntryType ToEntryTypeEnum(const String& entry_type); |
97 | 96 |
98 DEFINE_INLINE_VIRTUAL_TRACE() {} | 97 DEFINE_INLINE_VIRTUAL_TRACE() {} |
99 | 98 |
100 protected: | 99 protected: |
101 PerformanceEntry(const String& name, | 100 PerformanceEntry(const String& name, |
102 const String& entry_type, | 101 const String& entry_type, |
103 double start_time, | 102 double start_time, |
104 double finish_time); | 103 double finish_time); |
105 virtual void BuildJSONValue(V8ObjectBuilder&) const; | 104 virtual void BuildJSONValue(ScriptState*, V8ObjectBuilder&) const; |
106 | 105 |
107 private: | 106 private: |
108 const String name_; | 107 const String name_; |
109 const String entry_type_; | 108 const String entry_type_; |
110 const double start_time_; | 109 const double start_time_; |
111 const double duration_; | 110 const double duration_; |
112 const PerformanceEntryType entry_type_enum_; | 111 const PerformanceEntryType entry_type_enum_; |
113 }; | 112 }; |
114 | 113 |
115 } // namespace blink | 114 } // namespace blink |
116 | 115 |
117 #endif // PerformanceEntry_h | 116 #endif // PerformanceEntry_h |
OLD | NEW |