| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef PlatformTraceEventsAgent_h | 5 #ifndef PlatformProbes_h |
| 6 #define PlatformTraceEventsAgent_h | 6 #define PlatformProbes_h |
| 7 | 7 |
| 8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
| 9 #include "platform/heap/Heap.h" | 9 #include "platform/loader/fetch/FetchContext.h" |
| 10 #include "platform/instrumentation/tracing/TraceEvent.h" | |
| 11 | 10 |
| 12 namespace blink { | 11 namespace blink { |
| 13 | 12 |
| 13 class FetchContext; |
| 14 class PlatformProbeSink; |
| 15 |
| 14 namespace probe { | 16 namespace probe { |
| 15 class PlatformSendRequest; | 17 |
| 18 class PLATFORM_EXPORT ProbeBase { |
| 19 STACK_ALLOCATED() |
| 20 |
| 21 public: |
| 22 double captureStartTime() const; |
| 23 double captureEndTime() const; |
| 24 double duration() const; |
| 25 |
| 26 private: |
| 27 mutable double m_startTime = 0; |
| 28 mutable double m_endTime = 0; |
| 29 }; |
| 30 |
| 31 inline PlatformProbeSink* toPlatformProbeSink(FetchContext* context) { |
| 32 return context->platformProbeSink(); |
| 16 } | 33 } |
| 17 | 34 |
| 18 class PLATFORM_EXPORT PlatformTraceEventsAgent | 35 } // namespace probe |
| 19 : public GarbageCollected<PlatformTraceEventsAgent> { | |
| 20 public: | |
| 21 DEFINE_INLINE_TRACE() {} | |
| 22 | |
| 23 void will(const probe::PlatformSendRequest&); | |
| 24 void did(const probe::PlatformSendRequest&); | |
| 25 }; | |
| 26 | |
| 27 } // namespace blink | 36 } // namespace blink |
| 28 | 37 |
| 29 #endif // !defined(PlatformTraceEventsAgent_h) | 38 #undef PROBE_EXPORT |
| 39 |
| 40 #include "platform/PlatformProbesInl.h" |
| 41 |
| 42 #endif // PlatformProbes_h |
| OLD | NEW |