| 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 27 matching lines...) Expand all Loading... |
| 38 #include "core/frame/LocalFrame.h" | 38 #include "core/frame/LocalFrame.h" |
| 39 #include "core/frame/UseCounter.h" | 39 #include "core/frame/UseCounter.h" |
| 40 #include "core/loader/DocumentLoadTiming.h" | 40 #include "core/loader/DocumentLoadTiming.h" |
| 41 #include "core/loader/DocumentLoader.h" | 41 #include "core/loader/DocumentLoader.h" |
| 42 #include "core/timing/PerformanceLongTaskTiming.h" | 42 #include "core/timing/PerformanceLongTaskTiming.h" |
| 43 #include "core/timing/PerformanceObserver.h" | 43 #include "core/timing/PerformanceObserver.h" |
| 44 #include "core/timing/PerformanceResourceTiming.h" | 44 #include "core/timing/PerformanceResourceTiming.h" |
| 45 #include "core/timing/PerformanceServerTiming.h" | 45 #include "core/timing/PerformanceServerTiming.h" |
| 46 #include "core/timing/PerformanceUserTiming.h" | 46 #include "core/timing/PerformanceUserTiming.h" |
| 47 #include "platform/RuntimeEnabledFeatures.h" | 47 #include "platform/RuntimeEnabledFeatures.h" |
| 48 #include "platform/instrumentation/tracing/TraceEvent.h" |
| 48 #include "platform/loader/fetch/ResourceResponse.h" | 49 #include "platform/loader/fetch/ResourceResponse.h" |
| 49 #include "platform/loader/fetch/ResourceTimingInfo.h" | 50 #include "platform/loader/fetch/ResourceTimingInfo.h" |
| 50 #include "platform/weborigin/SecurityOrigin.h" | 51 #include "platform/weborigin/SecurityOrigin.h" |
| 51 #include "platform/wtf/CurrentTime.h" | 52 #include "platform/wtf/CurrentTime.h" |
| 52 | 53 |
| 53 namespace blink { | 54 namespace blink { |
| 54 | 55 |
| 55 namespace { | 56 namespace { |
| 56 | 57 |
| 57 SecurityOrigin* GetSecurityOrigin(ExecutionContext* context) { | 58 SecurityOrigin* GetSecurityOrigin(ExecutionContext* context) { |
| (...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 ClampTimeResolution(time_in_seconds)); | 598 ClampTimeResolution(time_in_seconds)); |
| 598 } | 599 } |
| 599 | 600 |
| 600 DOMHighResTimeStamp PerformanceBase::MonotonicTimeToDOMHighResTimeStamp( | 601 DOMHighResTimeStamp PerformanceBase::MonotonicTimeToDOMHighResTimeStamp( |
| 601 double monotonic_time) const { | 602 double monotonic_time) const { |
| 602 return MonotonicTimeToDOMHighResTimeStamp(time_origin_, monotonic_time, | 603 return MonotonicTimeToDOMHighResTimeStamp(time_origin_, monotonic_time, |
| 603 false /* allow_negative_value */); | 604 false /* allow_negative_value */); |
| 604 } | 605 } |
| 605 | 606 |
| 606 DOMHighResTimeStamp PerformanceBase::now() const { | 607 DOMHighResTimeStamp PerformanceBase::now() const { |
| 608 TRACE_EVENT0("ServiceWorker", "PerformanceBase::now"); |
| 607 return MonotonicTimeToDOMHighResTimeStamp(MonotonicallyIncreasingTime()); | 609 return MonotonicTimeToDOMHighResTimeStamp(MonotonicallyIncreasingTime()); |
| 608 } | 610 } |
| 609 | 611 |
| 610 DEFINE_TRACE(PerformanceBase) { | 612 DEFINE_TRACE(PerformanceBase) { |
| 611 visitor->Trace(frame_timing_buffer_); | 613 visitor->Trace(frame_timing_buffer_); |
| 612 visitor->Trace(resource_timing_buffer_); | 614 visitor->Trace(resource_timing_buffer_); |
| 613 visitor->Trace(navigation_timing_); | 615 visitor->Trace(navigation_timing_); |
| 614 visitor->Trace(user_timing_); | 616 visitor->Trace(user_timing_); |
| 615 visitor->Trace(server_timing_buffer_); | 617 visitor->Trace(server_timing_buffer_); |
| 616 visitor->Trace(first_paint_timing_); | 618 visitor->Trace(first_paint_timing_); |
| 617 visitor->Trace(first_contentful_paint_timing_); | 619 visitor->Trace(first_contentful_paint_timing_); |
| 618 visitor->Trace(observers_); | 620 visitor->Trace(observers_); |
| 619 visitor->Trace(active_observers_); | 621 visitor->Trace(active_observers_); |
| 620 visitor->Trace(suspended_observers_); | 622 visitor->Trace(suspended_observers_); |
| 621 EventTargetWithInlineData::Trace(visitor); | 623 EventTargetWithInlineData::Trace(visitor); |
| 622 } | 624 } |
| 623 | 625 |
| 624 } // namespace blink | 626 } // namespace blink |
| OLD | NEW |