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

Unified Diff: shell/out_of_process_dynamic_service_runner.h

Issue 974403002: Add --force-in-process flag to shell. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: use resolved url Created 5 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
Index: shell/out_of_process_dynamic_service_runner.h
diff --git a/shell/out_of_process_dynamic_service_runner.h b/shell/out_of_process_dynamic_service_runner.h
index c00a05e1ce8e5d95699b3726fed3cd19cc873910..eb4bf5682e3fb123f4deebca02bdd336bda3ab64 100644
--- a/shell/out_of_process_dynamic_service_runner.h
+++ b/shell/out_of_process_dynamic_service_runner.h
@@ -8,6 +8,7 @@
#include "base/callback.h"
#include "base/files/file_path.h"
#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
#include "mojo/public/cpp/bindings/error_handler.h"
#include "shell/app_child_process.mojom.h"
#include "shell/app_child_process_host.h"
@@ -17,16 +18,18 @@
namespace mojo {
namespace shell {
+class Context;
+
// An implementation of |DynamicServiceRunner| that loads/runs the given app
// (from the file system) in a separate process (of its own).
-class OutOfProcessDynamicServiceRunner : public mojo::NativeRunner {
+class OutOfProcessDynamicServiceRunner : public NativeRunner {
public:
explicit OutOfProcessDynamicServiceRunner(Context* context);
~OutOfProcessDynamicServiceRunner() override;
// |DynamicServiceRunner| method:
void Start(const base::FilePath& app_path,
- mojo::NativeRunner::CleanupBehavior cleanup_behavior,
+ NativeRunner::CleanupBehavior cleanup_behavior,
InterfaceRequest<Application> application_request,
const base::Closure& app_completed_callback) override;
@@ -44,8 +47,19 @@ class OutOfProcessDynamicServiceRunner : public mojo::NativeRunner {
DISALLOW_COPY_AND_ASSIGN(OutOfProcessDynamicServiceRunner);
};
-typedef DynamicServiceRunnerFactoryImpl<OutOfProcessDynamicServiceRunner>
- OutOfProcessDynamicServiceRunnerFactory;
+class OutOfProcessDynamicServiceRunnerFactory : public NativeRunnerFactory {
+ public:
+ explicit OutOfProcessDynamicServiceRunnerFactory(Context* context)
+ : context_(context) {}
+ ~OutOfProcessDynamicServiceRunnerFactory() override {}
+
+ scoped_ptr<NativeRunner> Create(const Options& options) override;
+
+ private:
+ Context* const context_;
+
+ DISALLOW_COPY_AND_ASSIGN(OutOfProcessDynamicServiceRunnerFactory);
+};
} // namespace shell
} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698