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

Unified Diff: mojo/shell/context.h

Issue 491443005: Get rid of KeepAlive. Quit shell when all urls run directly by Context are closed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Bring back ConnectToServiceViaNetwork Created 6 years, 4 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: mojo/shell/context.h
diff --git a/mojo/shell/context.h b/mojo/shell/context.h
index 3c33a7590e6640cd69be63f745e371253084e94d..1bf166547d05898d8923114caf5240db98c159bf 100644
--- a/mojo/shell/context.h
+++ b/mojo/shell/context.h
@@ -8,7 +8,6 @@
#include <string>
#include "mojo/application_manager/application_manager.h"
-#include "mojo/shell/keep_alive.h"
#include "mojo/shell/mojo_url_resolver.h"
#include "mojo/shell/task_runners.h"
@@ -25,16 +24,23 @@ namespace shell {
class DynamicApplicationLoader;
// The "global" context for the shell's main process.
-class Context {
+class Context : ApplicationManager::Delegate {
public:
Context();
- ~Context();
+ virtual ~Context();
void Init();
+ // ApplicationManager::Delegate override.
+ virtual void OnServiceError(const GURL& gurl) OVERRIDE;
+
+ void Run(const GURL& url);
+ ScopedMessagePipeHandle ConnectToServiceByName(
+ const GURL& application_url,
tim (not reviewing) 2014/08/23 00:14:27 nit - indent two more spaces.
DaveMoore 2014/08/24 22:31:11 Done.
+ const std::string& service_name);
+
TaskRunners* task_runners() { return task_runners_.get(); }
ApplicationManager* application_manager() { return &application_manager_; }
- KeepAliveCounter* keep_alive_counter() { return &keep_alive_counter_; }
MojoURLResolver* mojo_url_resolver() { return &mojo_url_resolver_; }
#if defined(OS_ANDROID)
@@ -45,6 +51,7 @@ class Context {
private:
class NativeViewportApplicationLoader;
+ std::set<GURL> app_urls_;
scoped_ptr<TaskRunners> task_runners_;
ApplicationManager application_manager_;
MojoURLResolver mojo_url_resolver_;
@@ -53,8 +60,6 @@ class Context {
base::MessageLoop* ui_loop_;
#endif // defined(OS_ANDROID)
- KeepAliveCounter keep_alive_counter_;
-
DISALLOW_COPY_AND_ASSIGN(Context);
};

Powered by Google App Engine
This is Rietveld 408576698