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

Unified Diff: sky/shell/library_loader.cc

Issue 1139873004: Make android directory for Android-specific bits of SkyShell (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « sky/shell/java_service_provider.cc ('k') | sky/shell/org/domokit/sky/shell/GestureProvider.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/shell/library_loader.cc
diff --git a/sky/shell/library_loader.cc b/sky/shell/library_loader.cc
deleted file mode 100644
index cd2ce139d8c991c75ae6d36df75ba1895f6683a4..0000000000000000000000000000000000000000
--- a/sky/shell/library_loader.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/android/base_jni_onload.h"
-#include "base/android/base_jni_registrar.h"
-#include "base/android/jni_android.h"
-#include "base/android/jni_registrar.h"
-#include "base/android/library_loader/library_loader_hooks.h"
-#include "base/bind.h"
-#include "base/logging.h"
-#include "mojo/android/system/core_impl.h"
-#include "sky/shell/java_service_provider.h"
-#include "sky/shell/platform_view.h"
-#include "sky/shell/sky_main.h"
-#include "sky/shell/tracing_controller.h"
-
-namespace {
-
-base::android::RegistrationMethod kSkyRegisteredMethods[] = {
- {"CoreImpl", mojo::android::RegisterCoreImpl},
- {"JavaServiceProvider", sky::shell::RegisterJavaServiceProvider},
- {"PlatformView", sky::shell::PlatformView::Register},
- {"SkyMain", sky::shell::RegisterSkyMain},
- {"TracingController", sky::shell::RegisterTracingController},
-};
-
-bool RegisterJNI(JNIEnv* env) {
- if (!base::android::RegisterJni(env))
- return false;
-
- return RegisterNativeMethods(env, kSkyRegisteredMethods,
- arraysize(kSkyRegisteredMethods));
-}
-
-} // namespace
-
-// This is called by the VM when the shared library is first loaded.
-JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
- std::vector<base::android::RegisterCallback> register_callbacks;
- register_callbacks.push_back(base::Bind(&RegisterJNI));
- if (!base::android::OnJNIOnLoadRegisterJNI(vm, register_callbacks) ||
- !base::android::OnJNIOnLoadInit(
- std::vector<base::android::InitCallback>())) {
- return -1;
- }
-
- return JNI_VERSION_1_4;
-}
« no previous file with comments | « sky/shell/java_service_provider.cc ('k') | sky/shell/org/domokit/sky/shell/GestureProvider.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698