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

Unified Diff: shell/application_manager/application_manager.h

Issue 961053005: More shell cleanup: Move NativeRunner(Factory) to native_runner.h. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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
« no previous file with comments | « shell/application_manager/BUILD.gn ('k') | shell/application_manager/application_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shell/application_manager/application_manager.h
diff --git a/shell/application_manager/application_manager.h b/shell/application_manager/application_manager.h
index 52b0ec68f4e1916f4fc04e1a8e026095a763412a..38784d734f9d5fe881075a0e632b6866e1596a8f 100644
--- a/shell/application_manager/application_manager.h
+++ b/shell/application_manager/application_manager.h
@@ -7,18 +7,16 @@
#include <map>
-#include "base/basictypes.h"
-#include "base/callback.h"
-#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
#include "mojo/public/cpp/bindings/interface_request.h"
+#include "mojo/public/interfaces/application/application.mojom.h"
#include "mojo/public/interfaces/application/service_provider.mojom.h"
#include "mojo/services/network/public/interfaces/network_service.mojom.h"
#include "shell/application_manager/application_loader.h"
-#include "shell/application_manager/fetcher.h"
-#include "shell/application_manager/shell_impl.h"
+#include "shell/application_manager/native_runner.h"
#include "url/gurl.h"
namespace base {
@@ -29,42 +27,8 @@ class SequencedWorkerPool;
namespace mojo {
namespace shell {
-// ApplicationManager requires implementations of NativeRunner and
-// NativeRunnerFactory to run native applications.
-class NativeRunner {
- public:
- // Parameter for |Start()| to specify its cleanup behavior.
- enum CleanupBehavior { DeleteAppPath, DontDeleteAppPath };
-
- virtual ~NativeRunner() {}
-
- // Loads the app in the file at |app_path| and runs it on some other
- // thread/process. If |cleanup_behavior| is |true|, takes ownership of the
- // file. |app_completed_callback| is posted (to the thread on which |Start()|
- // was called) after |MojoMain()| completes.
- // TODO(vtl): |app_path| and |cleanup_behavior| should probably be moved to
- // the factory's Create(). Rationale: The factory may need information from
- // the file to decide what kind of NativeRunner to make.
- virtual void Start(const base::FilePath& app_path,
- CleanupBehavior cleanup_behavior,
- InterfaceRequest<Application> application_request,
- const base::Closure& app_completed_callback) = 0;
-};
-
-class NativeRunnerFactory {
- public:
- // Options for running the native app. (This will contain, e.g., information
- // about the sandbox profile, etc.)
- struct Options {
- // Constructs with default options.
- Options() : force_in_process(false) {}
-
- bool force_in_process;
- };
-
- virtual ~NativeRunnerFactory() {}
- virtual scoped_ptr<NativeRunner> Create(const Options& options) = 0;
-};
+class Fetcher;
+class ShellImpl;
class ApplicationManager {
public:
« no previous file with comments | « shell/application_manager/BUILD.gn ('k') | shell/application_manager/application_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698