OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 MOJO_SERVICES_TRACING_TRACING_APP_H_ | 5 #ifndef MOJO_SERVICES_TRACING_TRACING_APP_H_ |
6 #define MOJO_SERVICES_TRACING_TRACING_APP_H_ | 6 #define MOJO_SERVICES_TRACING_TRACING_APP_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
10 #include "base/memory/scoped_vector.h" | 12 #include "base/memory/scoped_vector.h" |
11 #include "mojo/application/public/cpp/application_delegate.h" | 13 #include "mojo/application/public/cpp/application_delegate.h" |
12 #include "mojo/application/public/cpp/interface_factory.h" | 14 #include "mojo/application/public/cpp/interface_factory.h" |
13 #include "mojo/common/weak_binding_set.h" | 15 #include "mojo/common/weak_binding_set.h" |
14 #include "mojo/common/weak_interface_ptr_set.h" | 16 #include "mojo/common/weak_interface_ptr_set.h" |
15 #include "mojo/public/cpp/bindings/strong_binding.h" | 17 #include "mojo/public/cpp/bindings/strong_binding.h" |
16 #include "mojo/services/tracing/public/interfaces/tracing.mojom.h" | 18 #include "mojo/services/tracing/public/interfaces/tracing.mojom.h" |
17 #include "mojo/services/tracing/trace_data_sink.h" | 19 #include "mojo/services/tracing/trace_data_sink.h" |
(...skipping 24 matching lines...) Expand all Loading... |
42 void Create( | 44 void Create( |
43 mojo::ApplicationConnection* connection, | 45 mojo::ApplicationConnection* connection, |
44 mojo::InterfaceRequest<StartupPerformanceDataCollector> request) override; | 46 mojo::InterfaceRequest<StartupPerformanceDataCollector> request) override; |
45 | 47 |
46 // tracing::TraceCollector implementation. | 48 // tracing::TraceCollector implementation. |
47 void Start(mojo::ScopedDataPipeProducerHandle stream, | 49 void Start(mojo::ScopedDataPipeProducerHandle stream, |
48 const mojo::String& categories) override; | 50 const mojo::String& categories) override; |
49 void StopAndFlush() override; | 51 void StopAndFlush() override; |
50 | 52 |
51 // StartupPerformanceDataCollector implementation. | 53 // StartupPerformanceDataCollector implementation. |
52 void SetShellProcessCreationTime(int64 time) override; | 54 void SetShellProcessCreationTime(int64_t time) override; |
53 void SetShellMainEntryPointTime(int64 time) override; | 55 void SetShellMainEntryPointTime(int64_t time) override; |
54 void SetBrowserMessageLoopStartTicks(int64 ticks) override; | 56 void SetBrowserMessageLoopStartTicks(int64_t ticks) override; |
55 void SetBrowserWindowDisplayTicks(int64 ticks) override; | 57 void SetBrowserWindowDisplayTicks(int64_t ticks) override; |
56 void SetBrowserOpenTabsTimeDelta(int64 delta) override; | 58 void SetBrowserOpenTabsTimeDelta(int64_t delta) override; |
57 void SetFirstWebContentsMainFrameLoadTicks(int64 ticks) override; | 59 void SetFirstWebContentsMainFrameLoadTicks(int64_t ticks) override; |
58 void SetFirstVisuallyNonEmptyLayoutTicks(int64 ticks) override; | 60 void SetFirstVisuallyNonEmptyLayoutTicks(int64_t ticks) override; |
59 void GetStartupPerformanceTimes( | 61 void GetStartupPerformanceTimes( |
60 const GetStartupPerformanceTimesCallback& callback) override; | 62 const GetStartupPerformanceTimesCallback& callback) override; |
61 | 63 |
62 void AllDataCollected(); | 64 void AllDataCollected(); |
63 | 65 |
64 scoped_ptr<TraceDataSink> sink_; | 66 scoped_ptr<TraceDataSink> sink_; |
65 ScopedVector<TraceRecorderImpl> recorder_impls_; | 67 ScopedVector<TraceRecorderImpl> recorder_impls_; |
66 mojo::WeakInterfacePtrSet<TraceProvider> provider_ptrs_; | 68 mojo::WeakInterfacePtrSet<TraceProvider> provider_ptrs_; |
67 mojo::Binding<TraceCollector> collector_binding_; | 69 mojo::Binding<TraceCollector> collector_binding_; |
68 mojo::WeakBindingSet<StartupPerformanceDataCollector> | 70 mojo::WeakBindingSet<StartupPerformanceDataCollector> |
69 startup_performance_data_collector_bindings_; | 71 startup_performance_data_collector_bindings_; |
70 StartupPerformanceTimes startup_performance_times_; | 72 StartupPerformanceTimes startup_performance_times_; |
71 bool tracing_active_; | 73 bool tracing_active_; |
72 mojo::String tracing_categories_; | 74 mojo::String tracing_categories_; |
73 | 75 |
74 DISALLOW_COPY_AND_ASSIGN(TracingApp); | 76 DISALLOW_COPY_AND_ASSIGN(TracingApp); |
75 }; | 77 }; |
76 | 78 |
77 } // namespace tracing | 79 } // namespace tracing |
78 | 80 |
79 #endif // MOJO_SERVICES_TRACING_TRACING_APP_H_ | 81 #endif // MOJO_SERVICES_TRACING_TRACING_APP_H_ |
OLD | NEW |