OLD | NEW |
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 "base/process/process_handle.h" | 10 #include "base/process/process_handle.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 // NativeRunnerFactory to run native applications. | 26 // NativeRunnerFactory to run native applications. |
27 class NativeRunner { | 27 class NativeRunner { |
28 public: | 28 public: |
29 virtual ~NativeRunner() {} | 29 virtual ~NativeRunner() {} |
30 | 30 |
31 // Loads the app in the file at |app_path| and runs it on some other | 31 // Loads the app in the file at |app_path| and runs it on some other |
32 // thread/process. | 32 // thread/process. |
33 virtual void Start( | 33 virtual void Start( |
34 const base::FilePath& app_path, | 34 const base::FilePath& app_path, |
35 bool start_sandboxed, | 35 bool start_sandboxed, |
36 InterfaceRequest<Application> application_request, | 36 InterfaceRequest<mojom::Application> application_request, |
37 const base::Callback<void(base::ProcessId)>& pid_available_callback, | 37 const base::Callback<void(base::ProcessId)>& pid_available_callback, |
38 const base::Closure& app_completed_callback) = 0; | 38 const base::Closure& app_completed_callback) = 0; |
39 | 39 |
40 // Like Start(), but used to initialize the host for a child process started | 40 // Like Start(), but used to initialize the host for a child process started |
41 // by someone else. Provides |application_request| via |channel|. | 41 // by someone else. Provides |application_request| via |channel|. |
42 virtual void InitHost(ScopedHandle channel, | 42 virtual void InitHost( |
43 InterfaceRequest<Application> application_request) = 0; | 43 ScopedHandle channel, |
| 44 InterfaceRequest<mojom::Application> application_request) = 0; |
44 }; | 45 }; |
45 | 46 |
46 class NativeRunnerFactory { | 47 class NativeRunnerFactory { |
47 public: | 48 public: |
48 virtual ~NativeRunnerFactory() {} | 49 virtual ~NativeRunnerFactory() {} |
49 virtual scoped_ptr<NativeRunner> Create(const base::FilePath& app_path) = 0; | 50 virtual scoped_ptr<NativeRunner> Create(const base::FilePath& app_path) = 0; |
50 }; | 51 }; |
51 | 52 |
52 } // namespace shell | 53 } // namespace shell |
53 } // namespace mojo | 54 } // namespace mojo |
54 | 55 |
55 #endif // MOJO_SHELL_NATIVE_RUNNER_H_ | 56 #endif // MOJO_SHELL_NATIVE_RUNNER_H_ |
OLD | NEW |