OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CHROME_APP_MASH_MASH_RUNNER_H_ | 5 #ifndef CHROME_APP_MASH_MASH_RUNNER_H_ |
6 #define CHROME_APP_MASH_MASH_RUNNER_H_ | 6 #define CHROME_APP_MASH_MASH_RUNNER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "services/shell/public/interfaces/shell_client.mojom.h" | 11 #include "services/shell/public/interfaces/service.mojom.h" |
12 | 12 |
13 namespace shell { | 13 namespace shell { |
14 class ShellClient; | 14 class Service; |
15 class ShellConnection; | 15 class ShellConnection; |
16 } | 16 } |
17 | 17 |
18 // Responsible for running mash, both child and main processes. | 18 // Responsible for running mash, both child and main processes. |
19 class MashRunner { | 19 class MashRunner { |
20 public: | 20 public: |
21 MashRunner(); | 21 MashRunner(); |
22 ~MashRunner(); | 22 ~MashRunner(); |
23 | 23 |
24 void Run(); | 24 void Run(); |
25 | 25 |
26 private: | 26 private: |
27 void RunMain(); | 27 void RunMain(); |
28 void RunChild(); | 28 void RunChild(); |
29 | 29 |
30 void StartChildApp(shell::mojom::ShellClientRequest client_request); | 30 void StartChildApp(shell::mojom::ServiceRequest service_request); |
31 | 31 |
32 std::unique_ptr<shell::ShellClient> shell_client_; | 32 std::unique_ptr<shell::Service> service_; |
33 std::unique_ptr<shell::ShellConnection> shell_connection_; | 33 std::unique_ptr<shell::ShellConnection> shell_connection_; |
34 | 34 |
35 DISALLOW_COPY_AND_ASSIGN(MashRunner); | 35 DISALLOW_COPY_AND_ASSIGN(MashRunner); |
36 }; | 36 }; |
37 | 37 |
38 int MashMain(); | 38 int MashMain(); |
39 | 39 |
40 #endif // CHROME_APP_MASH_MASH_RUNNER_H_ | 40 #endif // CHROME_APP_MASH_MASH_RUNNER_H_ |
OLD | NEW |