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

Side by Side Diff: sky/shell/sky_main.cc

Issue 873923003: sky/shell should link with sky/engine (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: moar deps 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 unified diff | Download patch
« no previous file with comments | « sky/shell/shell.cc ('k') | sky/shell/ui/engine.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sky/shell/sky_main.h" 5 #include "sky/shell/sky_main.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/i18n/icu_util.h"
13 #include "base/lazy_instance.h" 14 #include "base/lazy_instance.h"
14 #include "base/logging.h" 15 #include "base/logging.h"
15 #include "base/macros.h" 16 #include "base/macros.h"
16 #include "base/message_loop/message_loop.h" 17 #include "base/message_loop/message_loop.h"
17 #include "base/run_loop.h" 18 #include "base/run_loop.h"
18 #include "base/threading/simple_thread.h" 19 #include "base/threading/simple_thread.h"
19 #include "jni/SkyMain_jni.h" 20 #include "jni/SkyMain_jni.h"
20 #include "sky/shell/shell.h" 21 #include "sky/shell/shell.h"
21 #include "ui/gl/gl_surface_egl.h" 22 #include "ui/gl/gl_surface_egl.h"
22 23
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 base::android::ScopedJavaLocalRef<jobject> scoped_activity(env, activity); 57 base::android::ScopedJavaLocalRef<jobject> scoped_activity(env, activity);
57 base::android::InitApplicationContext(env, scoped_activity); 58 base::android::InitApplicationContext(env, scoped_activity);
58 59
59 base::CommandLine::Init(0, nullptr); 60 base::CommandLine::Init(0, nullptr);
60 61
61 InitializeLogging(); 62 InitializeLogging();
62 63
63 g_java_message_loop.Get().reset(new base::MessageLoopForUI); 64 g_java_message_loop.Get().reset(new base::MessageLoopForUI);
64 base::MessageLoopForUI::current()->Start(); 65 base::MessageLoopForUI::current()->Start();
65 66
67 base::i18n::InitializeICU();
66 gfx::GLSurface::InitializeOneOff(); 68 gfx::GLSurface::InitializeOneOff();
67 69
68 g_shell.Get().reset(new Shell(g_java_message_loop.Get()->task_runner())); 70 g_shell.Get().reset(new Shell(g_java_message_loop.Get()->task_runner()));
69 71
70 g_java_message_loop.Get()->PostTask( 72 g_java_message_loop.Get()->PostTask(
71 FROM_HERE, 73 FROM_HERE,
72 base::Bind(&Shell::Init, base::Unretained(g_shell.Get().get()))); 74 base::Bind(&Shell::Init, base::Unretained(g_shell.Get().get())));
73 } 75 }
74 76
75 static jboolean Start(JNIEnv* env, jclass clazz) { 77 static jboolean Start(JNIEnv* env, jclass clazz) {
76 LOG(INFO) << "Native code started!"; 78 LOG(INFO) << "Native code started!";
77 return true; 79 return true;
78 } 80 }
79 81
80 bool RegisterSkyMain(JNIEnv* env) { 82 bool RegisterSkyMain(JNIEnv* env) {
81 return RegisterNativesImpl(env); 83 return RegisterNativesImpl(env);
82 } 84 }
83 85
84 } // namespace sky 86 } // namespace sky
85 } // namespace mojo 87 } // namespace mojo
OLDNEW
« no previous file with comments | « sky/shell/shell.cc ('k') | sky/shell/ui/engine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698