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

Unified Diff: sky/shell/sky_main.cc

Issue 936883002: Connect Sky and Ganesh in SkyShell (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: sort includes 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: sky/shell/sky_main.cc
diff --git a/sky/shell/sky_main.cc b/sky/shell/sky_main.cc
index 4ae0b940be6b917be21e07fc786750b3a69212ae..2d4b37f1c97abcc8a3ab15355cd0d0917e18ab51 100644
--- a/sky/shell/sky_main.cc
+++ b/sky/shell/sky_main.cc
@@ -31,9 +31,6 @@ namespace {
LazyInstance<scoped_ptr<base::MessageLoop>> g_java_message_loop =
LAZY_INSTANCE_INITIALIZER;
-LazyInstance<base::android::ScopedJavaGlobalRef<jobject>> g_main_activiy =
- LAZY_INSTANCE_INITIALIZER;
-
LazyInstance<scoped_ptr<Shell>> g_shell = LAZY_INSTANCE_INITIALIZER;
void InitializeLogging() {
@@ -52,8 +49,6 @@ void InitializeLogging() {
static void Init(JNIEnv* env,
jclass clazz,
jobject activity) {
- g_main_activiy.Get().Reset(env, activity);
-
base::android::ScopedJavaLocalRef<jobject> scoped_activity(env, activity);
eseidel 2015/02/18 20:55:56 You mentioned you wanted to rename this to "applic
base::android::InitApplicationContext(env, scoped_activity);
@@ -68,15 +63,7 @@ static void Init(JNIEnv* env,
gfx::GLSurface::InitializeOneOff();
g_shell.Get().reset(new Shell(g_java_message_loop.Get()->task_runner()));
-
- g_java_message_loop.Get()->PostTask(
- FROM_HERE,
- base::Bind(&Shell::Init, base::Unretained(g_shell.Get().get())));
-}
-
-static jboolean Start(JNIEnv* env, jclass clazz) {
- LOG(INFO) << "Native code started!";
- return true;
+ g_shell.Get()->Init();
eseidel 2015/02/18 20:55:56 This can just be Shell::Init(), which creates g_sh
}
bool RegisterSkyMain(JNIEnv* env) {

Powered by Google App Engine
This is Rietveld 408576698