mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2026-06-01 11:56:47 +03:00
98 lines
3.0 KiB
C++
98 lines
3.0 KiB
C++
// Copyright (c) 2012 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/jni_android.h"
|
|
|
|
#include "base/debug/debugging_buildflags.h"
|
|
#include "base/lazy_instance.h"
|
|
#include "base/threading/thread_local.h"
|
|
#include "third_party/abseil-cpp/absl/base/attributes.h"
|
|
|
|
namespace base {
|
|
namespace android {
|
|
void InitVM(JavaVM* vm) {
|
|
}
|
|
|
|
void InitGlobalClassLoader(JNIEnv* env) {
|
|
}
|
|
|
|
ScopedJavaLocalRef<jclass> GetClass(JNIEnv* env,
|
|
const char* class_name,
|
|
const char* split_name) {
|
|
return nullptr;
|
|
}
|
|
|
|
ScopedJavaLocalRef<jclass> GetClass(JNIEnv* env, const char* class_name) {
|
|
return nullptr;
|
|
}
|
|
|
|
// This is duplicated with LazyGetClass below because these are performance
|
|
// sensitive.
|
|
jclass LazyGetClass(JNIEnv* env,
|
|
const char* class_name,
|
|
const char* split_name,
|
|
std::atomic<jclass>* atomic_class_id) {
|
|
return nullptr;
|
|
}
|
|
|
|
// This is duplicated with LazyGetClass above because these are performance
|
|
// sensitive.
|
|
jclass LazyGetClass(JNIEnv* env,
|
|
const char* class_name,
|
|
std::atomic<jclass>* atomic_class_id) {
|
|
return nullptr;
|
|
}
|
|
|
|
template<MethodID::Type type>
|
|
jmethodID MethodID::Get(JNIEnv* env,
|
|
jclass clazz,
|
|
const char* method_name,
|
|
const char* jni_signature) {
|
|
return nullptr;
|
|
}
|
|
|
|
// If |atomic_method_id| set, it'll return immediately. Otherwise, it'll call
|
|
// into ::Get() above. If there's a race, it's ok since the values are the same
|
|
// (and the duplicated effort will happen only once).
|
|
template<MethodID::Type type>
|
|
jmethodID MethodID::LazyGet(JNIEnv* env,
|
|
jclass clazz,
|
|
const char* method_name,
|
|
const char* jni_signature,
|
|
std::atomic<jmethodID>* atomic_method_id) {
|
|
return nullptr;
|
|
}
|
|
|
|
// Various template instantiations.
|
|
template jmethodID MethodID::Get<MethodID::TYPE_STATIC>(
|
|
JNIEnv* env, jclass clazz, const char* method_name,
|
|
const char* jni_signature);
|
|
|
|
template jmethodID MethodID::Get<MethodID::TYPE_INSTANCE>(
|
|
JNIEnv* env, jclass clazz, const char* method_name,
|
|
const char* jni_signature);
|
|
|
|
template jmethodID MethodID::LazyGet<MethodID::TYPE_STATIC>(
|
|
JNIEnv* env, jclass clazz, const char* method_name,
|
|
const char* jni_signature, std::atomic<jmethodID>* atomic_method_id);
|
|
|
|
template jmethodID MethodID::LazyGet<MethodID::TYPE_INSTANCE>(
|
|
JNIEnv* env, jclass clazz, const char* method_name,
|
|
const char* jni_signature, std::atomic<jmethodID>* atomic_method_id);
|
|
|
|
void CheckException(JNIEnv* env) {
|
|
}
|
|
|
|
std::string GetJavaExceptionInfo(JNIEnv* env,
|
|
const JavaRef<jthrowable>& java_throwable) {
|
|
return {};
|
|
}
|
|
|
|
std::string GetJavaStackTraceIfPresent() {
|
|
return {};
|
|
}
|
|
|
|
} // namespace android
|
|
} // namespace base
|