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 SHELL_OUT_OF_PROCESS_NATIVE_RUNNER_H_ | 5 #ifndef SHELL_OUT_OF_PROCESS_NATIVE_RUNNER_H_ |
6 #define SHELL_OUT_OF_PROCESS_NATIVE_RUNNER_H_ | 6 #define SHELL_OUT_OF_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" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "mojo/public/cpp/bindings/error_handler.h" | 12 #include "mojo/public/cpp/bindings/error_handler.h" |
13 #include "shell/application_manager/native_runner.h" | 13 #include "shell/application_manager/native_runner.h" |
14 | 14 |
15 namespace shell { | 15 namespace shell { |
16 | 16 |
17 class Context; | 17 class Context; |
18 class ChildProcessHost; | 18 class ChildProcessHost; |
19 | 19 |
20 // An implementation of |NativeRunner| that loads/runs the given app (from the | 20 // An implementation of |NativeRunner| that loads/runs the given app (from the |
21 // file system) in a separate process (of its own). | 21 // file system) in a separate process (of its own). |
22 class OutOfProcessNativeRunner : public NativeRunner { | 22 class OutOfProcessNativeRunner : public NativeRunner { |
23 public: | 23 public: |
24 explicit OutOfProcessNativeRunner(Context* context); | 24 explicit OutOfProcessNativeRunner(Context* context); |
25 ~OutOfProcessNativeRunner() override; | 25 ~OutOfProcessNativeRunner() override; |
26 | 26 |
27 // |NativeRunner| method: | 27 // |NativeRunner| method: |
28 void Start(const base::FilePath& app_path, | 28 void Start(const base::FilePath& app_path, |
29 NativeApplicationCleanup cleanup, | |
30 mojo::InterfaceRequest<mojo::Application> application_request, | 29 mojo::InterfaceRequest<mojo::Application> application_request, |
31 const base::Closure& app_completed_callback) override; | 30 const base::Closure& app_completed_callback) override; |
32 | 31 |
33 private: | 32 private: |
34 // |ChildProcessHost::StartApp()| callback: | 33 // |ChildProcessHost::StartApp()| callback: |
35 void AppCompleted(int32_t result); | 34 void AppCompleted(int32_t result); |
36 | 35 |
37 Context* const context_; | 36 Context* const context_; |
38 | 37 |
39 base::FilePath app_path_; | 38 base::FilePath app_path_; |
(...skipping 14 matching lines...) Expand all Loading... |
54 | 53 |
55 private: | 54 private: |
56 Context* const context_; | 55 Context* const context_; |
57 | 56 |
58 DISALLOW_COPY_AND_ASSIGN(OutOfProcessNativeRunnerFactory); | 57 DISALLOW_COPY_AND_ASSIGN(OutOfProcessNativeRunnerFactory); |
59 }; | 58 }; |
60 | 59 |
61 } // namespace shell | 60 } // namespace shell |
62 | 61 |
63 #endif // SHELL_OUT_OF_PROCESS_NATIVE_RUNNER_H_ | 62 #endif // SHELL_OUT_OF_PROCESS_NATIVE_RUNNER_H_ |
OLD | NEW |