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

Side by Side Diff: examples/echo/echo_benchmark.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, 6 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 | « no previous file | examples/spinning_cube/spinning_cube_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 #include <stdio.h> 5 #include <stdio.h>
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "examples/echo/echo.mojom.h" 10 #include "examples/echo/echo.mojom.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/connect.h" 16 #include "mojo/public/cpp/application/connect.h"
18 #include "mojo/public/cpp/utility/run_loop.h" 17 #include "mojo/public/cpp/utility/run_loop.h"
19 18
20 namespace mojo { 19 namespace mojo {
21 namespace examples { 20 namespace examples {
22 21
23 static const base::TimeDelta kWarmupTime = 22 static const base::TimeDelta kWarmupTime =
24 base::TimeDelta::FromMilliseconds(1000); 23 base::TimeDelta::FromMilliseconds(1000);
25 24
26 static const base::TimeDelta kDelayTime = base::TimeDelta::FromMicroseconds(50); 25 static const base::TimeDelta kDelayTime = base::TimeDelta::FromMicroseconds(50);
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 } 172 }
174 173
175 } // namespace examples 174 } // namespace examples
176 } // namespace mojo 175 } // namespace mojo
177 176
178 MojoResult MojoMain(MojoHandle application_request) { 177 MojoResult MojoMain(MojoHandle application_request) {
179 mojo::ApplicationRunnerChromium runner( 178 mojo::ApplicationRunnerChromium runner(
180 new mojo::examples::EchoClientDelegate); 179 new mojo::examples::EchoClientDelegate);
181 return runner.Run(application_request); 180 return runner.Run(application_request);
182 } 181 }
OLDNEW
« no previous file with comments | « no previous file | examples/spinning_cube/spinning_cube_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698