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

Side by Side Diff: mojo/public/cpp/application/application_runner.h

Issue 814543006: Move //mojo/{public, edk} underneath //third_party (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 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
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MOJO_PUBLIC_APPLICATION_APPLICATION_RUNNER_H_
6 #define MOJO_PUBLIC_APPLICATION_APPLICATION_RUNNER_H_
7
8 #include "mojo/public/cpp/system/core.h"
9
10 namespace mojo {
11
12 class ApplicationDelegate;
13
14 // A utility for running an Application. The typical use case is to use
15 // when writing your MojoMain:
16 //
17 // MojoResult MojoMain(MojoHandle shell_handle) {
18 // mojo::ApplicationRunner runner(new MyApplicationDelegate());
19 // return runner.Run(shell_handle);
20 // }
21 //
22 // ApplicationRunner takes care of mojo environment initialization and
23 // shutdown, and starting a RunLoop from which your application can run and
24 // ultimately Quit().
25 class ApplicationRunner {
26 public:
27 // Takes ownership of |delegate|.
28 explicit ApplicationRunner(ApplicationDelegate* delegate);
29 ~ApplicationRunner();
30
31 // Once the various parameters have been set above, use Run to initialize an
32 // ApplicationImpl wired to the provided delegate, and run a RunLoop until
33 // the application exits.
34 MojoResult Run(MojoHandle shell_handle);
35
36 private:
37 ApplicationDelegate* delegate_;
38
39 MOJO_DISALLOW_COPY_AND_ASSIGN(ApplicationRunner);
40 };
41
42 } // namespace mojo
43
44 #endif // MOJO_PUBLIC_APPLICATION_APPLICATION_RUNNER_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/application/application_impl.h ('k') | mojo/public/cpp/application/application_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698