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

Unified Diff: mojo/shell/android/mojo_main.cc

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/android/mojo_main.cc
diff --git a/mojo/shell/android/mojo_main.cc b/mojo/shell/android/mojo_main.cc
index 2f8924d87874039282637ab241c7e06bcd7f1a7b..832e0aa63e9855bd6a9917ac10188180eb02f7c5 100644
--- a/mojo/shell/android/mojo_main.cc
+++ b/mojo/shell/android/mojo_main.cc
@@ -18,7 +18,6 @@
#include "mojo/application_manager/application_manager.h"
#include "mojo/shell/context.h"
#include "mojo/shell/init.h"
-#include "mojo/shell/run.h"
#include "ui/gl/gl_surface_egl.h"
using base::LazyInstance;
@@ -37,9 +36,13 @@ LazyInstance<scoped_ptr<base::android::JavaHandlerThread> > g_shell_thread =
LAZY_INSTANCE_INITIALIZER;
void RunShell(std::vector<GURL> app_urls) {
- g_context.Get()->Init();
- g_context.Get()->set_ui_loop(g_java_message_loop.Get().get());
- shell::Run(g_context.Get().get(), app_urls);
+ shell::Context* context = g_context.Pointer()->get();
+ context->Init();
+ context->set_ui_loop(g_java_message_loop.Get().get());
+ for (std::vector<GURL>::const_iterator it = app_urls.begin();
+ it != app_urls.end(); ++it) {
+ context->Run(*it);
+ }
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698