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

Unified Diff: mojo/shell/runner/host/child_process_base.cc

Issue 1761153002: Replace ChildController with ShellClientFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@29binding
Patch Set: . Created 4 years, 10 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
« no previous file with comments | « mojo/shell/runner/host/child_process.cc ('k') | mojo/shell/runner/host/child_process_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/runner/host/child_process_base.cc
diff --git a/mojo/shell/runner/host/child_process_base.cc b/mojo/shell/runner/host/child_process_base.cc
index a1c3f1e14d1eebc195576a97873d740fad0c1072..d4d6870dcb9bb1b1f8dddc1b05f825405c8d6077 100644
--- a/mojo/shell/runner/host/child_process_base.cc
+++ b/mojo/shell/runner/host/child_process_base.cc
@@ -32,7 +32,7 @@
#include "mojo/message_pump/message_pump_mojo.h"
#include "mojo/public/cpp/bindings/binding.h"
#include "mojo/public/cpp/system/core.h"
-#include "mojo/shell/runner/child/child_controller.mojom.h"
+#include "mojo/shell/public/interfaces/shell_client_factory.mojom.h"
#include "mojo/shell/runner/common/switches.h"
#include "mojo/shell/runner/init.h"
@@ -176,13 +176,10 @@ class AppContext : public edk::ProcessDelegate {
// ChildControllerImpl ------------------------------------------------------
-class ChildControllerImpl : public mojom::ChildController {
+class ChildControllerImpl : public mojom::ShellClientFactory {
public:
~ChildControllerImpl() override {
DCHECK(thread_checker_.CalledOnValidThread());
-
- // TODO(vtl): Pass in the result from |MainMain()|.
- on_app_complete_.Run(MOJO_RESULT_UNIMPLEMENTED);
}
// To be executed on the controller thread. Creates the |ChildController|,
@@ -216,20 +213,13 @@ class ChildControllerImpl : public mojom::ChildController {
_exit(1);
}
- // |ChildController| methods:
- void StartApp(InterfaceRequest<mojom::ShellClient> request,
- const StartAppCallback& on_app_complete) override {
+ // |mojom::ShellClientFactory| methods:
+ void CreateShellClient(mojom::ShellClientRequest request,
+ const String& name) override {
DCHECK(thread_checker_.CalledOnValidThread());
-
- on_app_complete_ = on_app_complete;
unblocker_.Unblock(base::Bind(run_callback_, base::Passed(&request)));
}
- void ExitNow(int32_t exit_code) override {
- DVLOG(2) << "ChildControllerImpl::ExitNow(" << exit_code << ")";
- _exit(exit_code);
- }
-
private:
ChildControllerImpl(AppContext* app_context,
const RunCallback& run_callback,
@@ -239,9 +229,8 @@ class ChildControllerImpl : public mojom::ChildController {
base::ThreadChecker thread_checker_;
RunCallback run_callback_;
Blocker::Unblocker unblocker_;
- StartAppCallback on_app_complete_;
- Binding<ChildController> binding_;
+ Binding<mojom::ShellClientFactory> binding_;
DISALLOW_COPY_AND_ASSIGN(ChildControllerImpl);
};
« no previous file with comments | « mojo/shell/runner/host/child_process.cc ('k') | mojo/shell/runner/host/child_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698