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/service.mojom.h" | 11 #include "services/service_manager/public/interfaces/service.mojom.h" |
12 | 12 |
13 namespace shell { | 13 namespace shell { |
14 class Service; | 14 class Service; |
15 } | 15 } |
16 | 16 |
17 // Responsible for running mash, both child and main processes. | 17 // Responsible for running mash, both child and main processes. |
18 class MashRunner { | 18 class MashRunner { |
19 public: | 19 public: |
20 MashRunner(); | 20 MashRunner(); |
21 ~MashRunner(); | 21 ~MashRunner(); |
22 | 22 |
23 void Run(); | 23 void Run(); |
24 | 24 |
25 private: | 25 private: |
26 void RunMain(); | 26 void RunMain(); |
27 void RunChild(); | 27 void RunChild(); |
28 | 28 |
29 void StartChildApp(shell::mojom::ServiceRequest service_request); | 29 void StartChildApp(shell::mojom::ServiceRequest service_request); |
30 | 30 |
31 std::unique_ptr<shell::Service> service_; | 31 std::unique_ptr<shell::Service> service_; |
32 | 32 |
33 DISALLOW_COPY_AND_ASSIGN(MashRunner); | 33 DISALLOW_COPY_AND_ASSIGN(MashRunner); |
34 }; | 34 }; |
35 | 35 |
36 int MashMain(); | 36 int MashMain(); |
37 | 37 |
38 #endif // CHROME_APP_MASH_MASH_RUNNER_H_ | 38 #endif // CHROME_APP_MASH_MASH_RUNNER_H_ |
OLD | NEW |