1 // Copyright 2014 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "content/browser/android/java/gin_java_bound_object_delegate.h" 6 7 namespace content { 8 GinJavaBoundObjectDelegate(scoped_refptr<GinJavaBoundObject> object)9GinJavaBoundObjectDelegate::GinJavaBoundObjectDelegate( 10 scoped_refptr<GinJavaBoundObject> object) 11 : object_(object) { 12 } 13 ~GinJavaBoundObjectDelegate()14GinJavaBoundObjectDelegate::~GinJavaBoundObjectDelegate() { 15 } 16 17 base::android::ScopedJavaLocalRef<jobject> GetLocalRef(JNIEnv * env)18GinJavaBoundObjectDelegate::GetLocalRef(JNIEnv* env) { 19 return object_->GetLocalRef(env); 20 } 21 22 base::android::ScopedJavaLocalRef<jclass> GetLocalClassRef(JNIEnv * env)23GinJavaBoundObjectDelegate::GetLocalClassRef(JNIEnv* env) { 24 return object_->GetLocalClassRef(env); 25 } 26 FindMethod(const std::string & method_name,size_t num_parameters)27const JavaMethod* GinJavaBoundObjectDelegate::FindMethod( 28 const std::string& method_name, 29 size_t num_parameters) { 30 return object_->FindMethod(method_name, num_parameters); 31 } 32 IsObjectGetClassMethod(const JavaMethod * method)33bool GinJavaBoundObjectDelegate::IsObjectGetClassMethod( 34 const JavaMethod* method) { 35 return object_->IsObjectGetClassMethod(method); 36 } 37 38 const base::android::JavaRef<jclass>& GetSafeAnnotationClass()39GinJavaBoundObjectDelegate::GetSafeAnnotationClass() { 40 return object_->GetSafeAnnotationClass(); 41 } 42 43 } // namespace content 44