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

Unified Diff: content/browser/renderer_host/java/gin_java_bound_object_delegate.cc

Issue 323403007: [Android] Java Bridge with Gin: implement Java bound object (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 6 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
Index: content/browser/renderer_host/java/gin_java_bound_object_delegate.cc
diff --git a/content/browser/renderer_host/java/gin_java_bound_object_delegate.cc b/content/browser/renderer_host/java/gin_java_bound_object_delegate.cc
new file mode 100644
index 0000000000000000000000000000000000000000..92b1ccc2fc1d2a11877471bd9b5554fa6886e8ac
--- /dev/null
+++ b/content/browser/renderer_host/java/gin_java_bound_object_delegate.cc
@@ -0,0 +1,43 @@
+// Copyright 2014 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 "content/browser/renderer_host/java/gin_java_bound_object_delegate.h"
+
+namespace content {
+
+GinJavaBoundObjectDelegate::GinJavaBoundObjectDelegate(
+ scoped_refptr<GinJavaBoundObject> object)
+ : object_(object) {
+}
+
+GinJavaBoundObjectDelegate::~GinJavaBoundObjectDelegate() {
+}
+
+base::android::ScopedJavaLocalRef<jobject>
+GinJavaBoundObjectDelegate::GetLocalRef(JNIEnv* env) {
+ return object_->GetLocalRef(env);
+}
+
+base::android::ScopedJavaLocalRef<jclass>
+GinJavaBoundObjectDelegate::GetLocalClassRef(JNIEnv* env) {
+ return object_->GetLocalClassRef(env);
+}
+
+const JavaMethod* GinJavaBoundObjectDelegate::FindMethod(
+ const std::string& method_name,
+ size_t num_parameters) {
+ return object_->FindMethod(method_name, num_parameters);
+}
+
+bool GinJavaBoundObjectDelegate::IsObjectGetClassMethod(
+ const JavaMethod* method) {
+ return object_->IsObjectGetClassMethod(method);
+}
+
+const base::android::JavaRef<jclass>&
+GinJavaBoundObjectDelegate::GetSafeAnnotationClass() {
+ return object_->GetSafeAnnotationClass();
+}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698