| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "mojo/shell/android/mojo_main.h" | |
| 6 | |
| 7 #include "base/android/jni_string.h" | 5 #include "base/android/jni_string.h" |
| 8 #include "base/at_exit.h" | 6 #include "base/at_exit.h" |
| 9 #include "base/bind.h" | 7 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 11 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 12 #include "base/logging.h" | 10 #include "base/logging.h" |
| 13 #include "base/macros.h" | 11 #include "base/macros.h" |
| 14 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
| 15 #include "jni/MojoMain_jni.h" | 13 #include "jni/MojoMain_jni.h" |
| 16 #include "mojo/public/shell/application.h" | 14 #include "mojo/public/shell/application.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 shell_context->set_activity(activity.obj()); | 98 shell_context->set_activity(activity.obj()); |
| 101 g_viewport_service_loader.Get().reset(new NativeViewportServiceLoader()); | 99 g_viewport_service_loader.Get().reset(new NativeViewportServiceLoader()); |
| 102 shell_context->service_manager()->SetLoaderForURL( | 100 shell_context->service_manager()->SetLoaderForURL( |
| 103 g_viewport_service_loader.Get().get(), | 101 g_viewport_service_loader.Get().get(), |
| 104 GURL("mojo:mojo_native_viewport_service")); | 102 GURL("mojo:mojo_native_viewport_service")); |
| 105 | 103 |
| 106 g_context.Get().reset(shell_context); | 104 g_context.Get().reset(shell_context); |
| 107 shell::Run(shell_context); | 105 shell::Run(shell_context); |
| 108 } | 106 } |
| 109 | 107 |
| 110 bool RegisterMojoMain(JNIEnv* env) { | |
| 111 return RegisterNativesImpl(env); | |
| 112 } | |
| 113 | |
| 114 } // namespace mojo | 108 } // namespace mojo |
| OLD | NEW |