OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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_RUNNER_HOST_IN_PROCESS_NATIVE_RUNNER_H_ | 5 #ifndef MOJO_SHELL_RUNNER_HOST_IN_PROCESS_NATIVE_RUNNER_H_ |
6 #define MOJO_SHELL_RUNNER_HOST_IN_PROCESS_NATIVE_RUNNER_H_ | 6 #define MOJO_SHELL_RUNNER_HOST_IN_PROCESS_NATIVE_RUNNER_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 // An implementation of |NativeRunner| that loads/runs the given app (from the | 24 // An implementation of |NativeRunner| that loads/runs the given app (from the |
25 // file system) on a separate thread (in the current process). | 25 // file system) on a separate thread (in the current process). |
26 class InProcessNativeRunner : public NativeRunner, | 26 class InProcessNativeRunner : public NativeRunner, |
27 public base::DelegateSimpleThread::Delegate { | 27 public base::DelegateSimpleThread::Delegate { |
28 public: | 28 public: |
29 InProcessNativeRunner(); | 29 InProcessNativeRunner(); |
30 ~InProcessNativeRunner() override; | 30 ~InProcessNativeRunner() override; |
31 | 31 |
32 // NativeRunner: | 32 // NativeRunner: |
33 void Start( | 33 mojom::ShellClientPtr Start( |
34 const base::FilePath& app_path, | 34 const base::FilePath& app_path, |
35 const Identity& target, | 35 const Identity& target, |
36 bool start_sandboxed, | 36 bool start_sandboxed, |
37 InterfaceRequest<mojom::ShellClient> request, | |
38 const base::Callback<void(base::ProcessId)>& pid_available_callback, | 37 const base::Callback<void(base::ProcessId)>& pid_available_callback, |
39 const base::Closure& app_completed_callback) override; | 38 const base::Closure& app_completed_callback) override; |
40 | 39 |
41 private: | 40 private: |
42 // |base::DelegateSimpleThread::Delegate| method: | 41 // |base::DelegateSimpleThread::Delegate| method: |
43 void Run() override; | 42 void Run() override; |
44 | 43 |
45 base::FilePath app_path_; | 44 base::FilePath app_path_; |
46 InterfaceRequest<mojom::ShellClient> request_; | 45 InterfaceRequest<mojom::ShellClient> request_; |
47 base::Callback<bool(void)> app_completed_callback_runner_; | 46 base::Callback<bool(void)> app_completed_callback_runner_; |
(...skipping 15 matching lines...) Expand all Loading... |
63 private: | 62 private: |
64 base::TaskRunner* const launch_process_runner_; | 63 base::TaskRunner* const launch_process_runner_; |
65 | 64 |
66 DISALLOW_COPY_AND_ASSIGN(InProcessNativeRunnerFactory); | 65 DISALLOW_COPY_AND_ASSIGN(InProcessNativeRunnerFactory); |
67 }; | 66 }; |
68 | 67 |
69 } // namespace shell | 68 } // namespace shell |
70 } // namespace mojo | 69 } // namespace mojo |
71 | 70 |
72 #endif // MOJO_SHELL_RUNNER_HOST_IN_PROCESS_NATIVE_RUNNER_H_ | 71 #endif // MOJO_SHELL_RUNNER_HOST_IN_PROCESS_NATIVE_RUNNER_H_ |
OLD | NEW |