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 15 matching lines...) Expand all Loading... |
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 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) override; | 38 const base::Closure& app_completed_callback) override; |
39 void InitHost(ScopedHandle channel, | 39 void InitHost( |
40 InterfaceRequest<Application> application_request) override; | 40 ScopedHandle channel, |
| 41 InterfaceRequest<mojom::Application> application_request) override; |
41 | 42 |
42 private: | 43 private: |
43 // |base::DelegateSimpleThread::Delegate| method: | 44 // |base::DelegateSimpleThread::Delegate| method: |
44 void Run() override; | 45 void Run() override; |
45 | 46 |
46 base::FilePath app_path_; | 47 base::FilePath app_path_; |
47 InterfaceRequest<Application> application_request_; | 48 InterfaceRequest<mojom::Application> application_request_; |
48 base::Callback<bool(void)> app_completed_callback_runner_; | 49 base::Callback<bool(void)> app_completed_callback_runner_; |
49 | 50 |
50 base::ScopedNativeLibrary app_library_; | 51 base::ScopedNativeLibrary app_library_; |
51 scoped_ptr<base::DelegateSimpleThread> thread_; | 52 scoped_ptr<base::DelegateSimpleThread> thread_; |
52 | 53 |
53 DISALLOW_COPY_AND_ASSIGN(InProcessNativeRunner); | 54 DISALLOW_COPY_AND_ASSIGN(InProcessNativeRunner); |
54 }; | 55 }; |
55 | 56 |
56 class InProcessNativeRunnerFactory : public NativeRunnerFactory { | 57 class InProcessNativeRunnerFactory : public NativeRunnerFactory { |
57 public: | 58 public: |
58 explicit InProcessNativeRunnerFactory(base::TaskRunner* launch_process_runner) | 59 explicit InProcessNativeRunnerFactory(base::TaskRunner* launch_process_runner) |
59 : launch_process_runner_(launch_process_runner) {} | 60 : launch_process_runner_(launch_process_runner) {} |
60 ~InProcessNativeRunnerFactory() override {} | 61 ~InProcessNativeRunnerFactory() override {} |
61 | 62 |
62 scoped_ptr<NativeRunner> Create(const base::FilePath& app_path) override; | 63 scoped_ptr<NativeRunner> Create(const base::FilePath& app_path) override; |
63 | 64 |
64 private: | 65 private: |
65 base::TaskRunner* const launch_process_runner_; | 66 base::TaskRunner* const launch_process_runner_; |
66 | 67 |
67 DISALLOW_COPY_AND_ASSIGN(InProcessNativeRunnerFactory); | 68 DISALLOW_COPY_AND_ASSIGN(InProcessNativeRunnerFactory); |
68 }; | 69 }; |
69 | 70 |
70 } // namespace shell | 71 } // namespace shell |
71 } // namespace mojo | 72 } // namespace mojo |
72 | 73 |
73 #endif // MOJO_SHELL_RUNNER_HOST_IN_PROCESS_NATIVE_RUNNER_H_ | 74 #endif // MOJO_SHELL_RUNNER_HOST_IN_PROCESS_NATIVE_RUNNER_H_ |
OLD | NEW |