Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Unified Diff: chrome/app/mash/mash_runner.h

Issue 2646033002: mash: Exit the root process if the window manager service crashes (Closed)
Patch Set: cleanup Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/app/mash/mash_runner.h
diff --git a/chrome/app/mash/mash_runner.h b/chrome/app/mash/mash_runner.h
index deaea41a5765d69747d29483559d84a3e679dd9f..62fe4196c6e91246d2ff7e45923e446ad822dd2a 100644
--- a/chrome/app/mash/mash_runner.h
+++ b/chrome/app/mash/mash_runner.h
@@ -10,7 +10,12 @@
#include "base/macros.h"
#include "services/service_manager/public/interfaces/service.mojom.h"
+namespace base {
+class RunLoop;
+}
+
namespace service_manager {
+class Identity;
class ServiceContext;
}
@@ -25,7 +30,16 @@ class MashRunner {
int Run();
private:
- void RunMain();
+ // Runs the main process, including the service manager. Returns the exit
+ // value for the process.
+ int RunMain();
+
+ // Runs a background service manager in the main process.
+ void RunServiceManagerInMain();
+
+ // Called when a child service exits. The main process may decide to exit in
+ // response.
+ void OnInstanceQuitInMain(const service_manager::Identity& identity);
// Returns 0 if the child process was initialized correctly, or error code on
// failure.
@@ -33,8 +47,15 @@ class MashRunner {
void StartChildApp(service_manager::mojom::ServiceRequest service_request);
+ // Context for service manager in the main process.
std::unique_ptr<service_manager::ServiceContext> context_;
+ // Run loop for the main process.
+ std::unique_ptr<base::RunLoop> main_run_loop_;
+
+ // Return value for the main process.
+ int main_return_value_ = 0;
+
DISALLOW_COPY_AND_ASSIGN(MashRunner);
};

Powered by Google App Engine
This is Rietveld 408576698