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

Side by Side Diff: examples/trace_me/trace_me_app.cc

Issue 2004493002: Add a mojo::RunApplication() for running implementations of ApplicationImplBase. (Closed) Base URL: https://github.com/domokit/mojo.git@work790_environment_no_instantiate
Patch Set: rebased Created 4 years, 7 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 | « examples/spinning_cube/spinning_cube_app.cc ('k') | mojo/public/cpp/application/BUILD.gn » ('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 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/threading/thread.h" 8 #include "base/threading/thread.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
11 #include "mojo/application/application_runner_chromium.h" 11 #include "mojo/application/application_runner_chromium.h"
12 #include "mojo/common/tracing_impl.h" 12 #include "mojo/common/tracing_impl.h"
13 #include "mojo/public/c/system/main.h" 13 #include "mojo/public/c/system/main.h"
14 #include "mojo/public/cpp/application/application_delegate.h" 14 #include "mojo/public/cpp/application/application_delegate.h"
15 #include "mojo/public/cpp/application/application_impl.h" 15 #include "mojo/public/cpp/application/application_impl.h"
16 #include "mojo/public/cpp/application/application_runner.h"
17 #include "mojo/public/cpp/application/service_provider_impl.h" 16 #include "mojo/public/cpp/application/service_provider_impl.h"
18 17
19 // This is an example app that uses implementation of tracing from mojo/common 18 // This is an example app that uses implementation of tracing from mojo/common
20 // to participate in the tracing ecosystem. 19 // to participate in the tracing ecosystem.
21 // 20 //
22 // To collect a startup trace, run: 21 // To collect a startup trace, run:
23 // `mojo_run mojo:trace_me --trace-startup [--android] 22 // `mojo_run mojo:trace_me --trace-startup [--android]
24 // 23 //
25 // You can also use `mojo_debug` to start and stop tracing interactively. 24 // You can also use `mojo_debug` to start and stop tracing interactively.
26 25
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 mojo::TracingImpl tracing_; 72 mojo::TracingImpl tracing_;
74 DISALLOW_COPY_AND_ASSIGN(TraceMeApp); 73 DISALLOW_COPY_AND_ASSIGN(TraceMeApp);
75 }; 74 };
76 75
77 } // namespace examples 76 } // namespace examples
78 77
79 MojoResult MojoMain(MojoHandle application_request) { 78 MojoResult MojoMain(MojoHandle application_request) {
80 mojo::ApplicationRunnerChromium runner(new examples::TraceMeApp); 79 mojo::ApplicationRunnerChromium runner(new examples::TraceMeApp);
81 return runner.Run(application_request); 80 return runner.Run(application_request);
82 } 81 }
OLDNEW
« no previous file with comments | « examples/spinning_cube/spinning_cube_app.cc ('k') | mojo/public/cpp/application/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698