Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(423)

Side by Side Diff: mojo/services/tracing/tracing_app.h

Issue 1675083002: Rename ApplicationDelegate to ShellClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@delegate
Patch Set: . Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mojo/services/tracing/public/cpp/tracing_impl.cc ('k') | mojo/services/tracing/tracing_app.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/scoped_vector.h" 12 #include "base/memory/scoped_vector.h"
13 #include "mojo/common/weak_binding_set.h" 13 #include "mojo/common/weak_binding_set.h"
14 #include "mojo/common/weak_interface_ptr_set.h" 14 #include "mojo/common/weak_interface_ptr_set.h"
15 #include "mojo/public/cpp/bindings/strong_binding.h" 15 #include "mojo/public/cpp/bindings/strong_binding.h"
16 #include "mojo/services/tracing/public/interfaces/tracing.mojom.h" 16 #include "mojo/services/tracing/public/interfaces/tracing.mojom.h"
17 #include "mojo/services/tracing/trace_data_sink.h" 17 #include "mojo/services/tracing/trace_data_sink.h"
18 #include "mojo/services/tracing/trace_recorder_impl.h" 18 #include "mojo/services/tracing/trace_recorder_impl.h"
19 #include "mojo/shell/public/cpp/application_delegate.h"
20 #include "mojo/shell/public/cpp/interface_factory.h" 19 #include "mojo/shell/public/cpp/interface_factory.h"
20 #include "mojo/shell/public/cpp/shell_client.h"
21 21
22 namespace tracing { 22 namespace tracing {
23 23
24 class TracingApp 24 class TracingApp
25 : public mojo::ApplicationDelegate, 25 : public mojo::ShellClient,
26 public mojo::InterfaceFactory<TraceCollector>, 26 public mojo::InterfaceFactory<TraceCollector>,
27 public TraceCollector, 27 public TraceCollector,
28 public mojo::InterfaceFactory<StartupPerformanceDataCollector>, 28 public mojo::InterfaceFactory<StartupPerformanceDataCollector>,
29 public StartupPerformanceDataCollector { 29 public StartupPerformanceDataCollector {
30 public: 30 public:
31 TracingApp(); 31 TracingApp();
32 ~TracingApp() override; 32 ~TracingApp() override;
33 33
34 private: 34 private:
35 // mojo::ApplicationDelegate implementation. 35 // mojo::ShellClient implementation.
36 bool AcceptConnection( 36 bool AcceptConnection(mojo::Connection* connection) override;
37 mojo::ApplicationConnection* connection) override;
38 37
39 // mojo::InterfaceFactory<TraceCollector> implementation. 38 // mojo::InterfaceFactory<TraceCollector> implementation.
40 void Create(mojo::ApplicationConnection* connection, 39 void Create(mojo::Connection* connection,
41 mojo::InterfaceRequest<TraceCollector> request) override; 40 mojo::InterfaceRequest<TraceCollector> request) override;
42 41
43 // mojo::InterfaceFactory<StartupPerformanceDataCollector> implementation. 42 // mojo::InterfaceFactory<StartupPerformanceDataCollector> implementation.
44 void Create( 43 void Create(
45 mojo::ApplicationConnection* connection, 44 mojo::Connection* connection,
46 mojo::InterfaceRequest<StartupPerformanceDataCollector> request) override; 45 mojo::InterfaceRequest<StartupPerformanceDataCollector> request) override;
47 46
48 // tracing::TraceCollector implementation. 47 // tracing::TraceCollector implementation.
49 void Start(mojo::ScopedDataPipeProducerHandle stream, 48 void Start(mojo::ScopedDataPipeProducerHandle stream,
50 const mojo::String& categories) override; 49 const mojo::String& categories) override;
51 void StopAndFlush() override; 50 void StopAndFlush() override;
52 51
53 // StartupPerformanceDataCollector implementation. 52 // StartupPerformanceDataCollector implementation.
54 void SetShellProcessCreationTime(int64_t time) override; 53 void SetShellProcessCreationTime(int64_t time) override;
55 void SetShellMainEntryPointTime(int64_t time) override; 54 void SetShellMainEntryPointTime(int64_t time) override;
(...skipping 16 matching lines...) Expand all
72 StartupPerformanceTimes startup_performance_times_; 71 StartupPerformanceTimes startup_performance_times_;
73 bool tracing_active_; 72 bool tracing_active_;
74 mojo::String tracing_categories_; 73 mojo::String tracing_categories_;
75 74
76 DISALLOW_COPY_AND_ASSIGN(TracingApp); 75 DISALLOW_COPY_AND_ASSIGN(TracingApp);
77 }; 76 };
78 77
79 } // namespace tracing 78 } // namespace tracing
80 79
81 #endif // MOJO_SERVICES_TRACING_TRACING_APP_H_ 80 #endif // MOJO_SERVICES_TRACING_TRACING_APP_H_
OLDNEW
« no previous file with comments | « mojo/services/tracing/public/cpp/tracing_impl.cc ('k') | mojo/services/tracing/tracing_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698