OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 26 matching lines...) Expand all Loading... |
37 #include "core/timing/ResourceTimingInfo.h" | 37 #include "core/timing/ResourceTimingInfo.h" |
38 #include "core/timing/PerformanceResourceTiming.h" | 38 #include "core/timing/PerformanceResourceTiming.h" |
39 #include "core/timing/PerformanceUserTiming.h" | 39 #include "core/timing/PerformanceUserTiming.h" |
40 #include "platform/weborigin/SecurityOrigin.h" | 40 #include "platform/weborigin/SecurityOrigin.h" |
41 #include "wtf/CurrentTime.h" | 41 #include "wtf/CurrentTime.h" |
42 | 42 |
43 #include "core/frame/Frame.h" | 43 #include "core/frame/Frame.h" |
44 | 44 |
45 namespace WebCore { | 45 namespace WebCore { |
46 | 46 |
47 DEFINE_GC_INFO(Performance); | |
48 | |
49 static const size_t defaultResourceTimingBufferSize = 150; | 47 static const size_t defaultResourceTimingBufferSize = 150; |
50 | 48 |
51 Performance::Performance(Frame* frame) | 49 Performance::Performance(Frame* frame) |
52 : DOMWindowProperty(frame) | 50 : DOMWindowProperty(frame) |
53 , m_resourceTimingBufferSize(defaultResourceTimingBufferSize) | 51 , m_resourceTimingBufferSize(defaultResourceTimingBufferSize) |
54 , m_referenceTime(frame->document()->loader()->timing()->referenceMonotonicT
ime()) | 52 , m_referenceTime(frame->document()->loader()->timing()->referenceMonotonicT
ime()) |
55 , m_userTiming(nullptr) | 53 , m_userTiming(nullptr) |
56 { | 54 { |
57 ASSERT(m_referenceTime); | 55 ASSERT(m_referenceTime); |
58 ScriptWrappable::init(this); | 56 ScriptWrappable::init(this); |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 | 279 |
282 void Performance::trace(Visitor* visitor) | 280 void Performance::trace(Visitor* visitor) |
283 { | 281 { |
284 visitor->trace(m_navigation); | 282 visitor->trace(m_navigation); |
285 visitor->trace(m_timing); | 283 visitor->trace(m_timing); |
286 visitor->trace(m_resourceTimingBuffer); | 284 visitor->trace(m_resourceTimingBuffer); |
287 visitor->trace(m_userTiming); | 285 visitor->trace(m_userTiming); |
288 } | 286 } |
289 | 287 |
290 } // namespace WebCore | 288 } // namespace WebCore |
OLD | NEW |