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

Side by Side Diff: mojo/shell/native_runner.h

Issue 1107233002: Move runner stuff into a runner namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 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 | « mojo/shell/application_manager.h ('k') | mojo/tools/mopy/paths.py » ('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_SHELL_NATIVE_RUNNER_H_ 5 #ifndef MOJO_SHELL_NATIVE_RUNNER_H_
6 #define MOJO_SHELL_NATIVE_RUNNER_H_ 6 #define MOJO_SHELL_NATIVE_RUNNER_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "mojo/public/cpp/bindings/interface_request.h" 10 #include "mojo/public/cpp/bindings/interface_request.h"
11 #include "mojo/public/interfaces/application/application.mojom.h" 11 #include "mojo/public/interfaces/application/application.mojom.h"
12 #include "mojo/runner/native_application_support.h"
13 12
14 namespace base { 13 namespace base {
15 class FilePath; 14 class FilePath;
16 } 15 }
17 16
18 namespace mojo { 17 namespace mojo {
19 namespace shell { 18 namespace shell {
20 19
20 enum class NativeApplicationCleanup { DELETE, DONT_DELETE };
21
21 // ApplicationManager requires implementations of NativeRunner and 22 // ApplicationManager requires implementations of NativeRunner and
22 // NativeRunnerFactory to run native applications. 23 // NativeRunnerFactory to run native applications.
23 class NativeRunner { 24 class NativeRunner {
24 public: 25 public:
25 virtual ~NativeRunner() {} 26 virtual ~NativeRunner() {}
26 27
27 // Loads the app in the file at |app_path| and runs it on some other 28 // Loads the app in the file at |app_path| and runs it on some other
28 // thread/process. If |cleanup| is |DELETE|, this takes ownership of the file. 29 // thread/process. If |cleanup| is |DELETE|, this takes ownership of the file.
29 // |app_completed_callback| is posted (to the thread on which |Start()| was 30 // |app_completed_callback| is posted (to the thread on which |Start()| was
30 // called) after |MojoMain()| completes. 31 // called) after |MojoMain()| completes.
(...skipping 18 matching lines...) Expand all
49 }; 50 };
50 51
51 virtual ~NativeRunnerFactory() {} 52 virtual ~NativeRunnerFactory() {}
52 virtual scoped_ptr<NativeRunner> Create(const Options& options) = 0; 53 virtual scoped_ptr<NativeRunner> Create(const Options& options) = 0;
53 }; 54 };
54 55
55 } // namespace shell 56 } // namespace shell
56 } // namespace mojo 57 } // namespace mojo
57 58
58 #endif // MOJO_SHELL_NATIVE_RUNNER_H_ 59 #endif // MOJO_SHELL_NATIVE_RUNNER_H_
OLDNEW
« no previous file with comments | « mojo/shell/application_manager.h ('k') | mojo/tools/mopy/paths.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698