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

Unified Diff: content/browser/renderer_host/java/gin_java_method_invocation_helper.h

Issue 345753003: [Android] Java Bridge with Gin: implement Java Bridge dispatcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use an enum for passing error codes 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_method_invocation_helper.h
diff --git a/content/browser/renderer_host/java/gin_java_method_invocation_helper.h b/content/browser/renderer_host/java/gin_java_method_invocation_helper.h
index 89805ca0696d4f6b09a601153d22b4dfaff5ae5d..4cdb09bc2f19c462f1bccc05d0192a318b34b03a 100644
--- a/content/browser/renderer_host/java/gin_java_method_invocation_helper.h
+++ b/content/browser/renderer_host/java/gin_java_method_invocation_helper.h
@@ -13,6 +13,7 @@
#include "base/values.h"
#include "content/browser/renderer_host/java/gin_java_bound_object.h"
#include "content/browser/renderer_host/java/java_type.h"
+#include "content/common/android/gin_java_bridge_errors.h"
#include "content/common/content_export.h"
namespace content {
@@ -68,7 +69,7 @@ class CONTENT_EXPORT GinJavaMethodInvocationHelper
const base::ListValue& GetPrimitiveResult();
const base::android::JavaRef<jobject>& GetObjectResult();
const base::android::JavaRef<jclass>& GetSafeAnnotationClass();
- const std::string& GetErrorMessage();
+ const GinJavaBridgeError GetInvocationError();
private:
friend class base::RefCountedThreadSafe<GinJavaMethodInvocationHelper>;
@@ -89,7 +90,7 @@ class CONTENT_EXPORT GinJavaMethodInvocationHelper
const JavaType& return_type,
jmethodID id,
jvalue* parameters);
- void SetInvocationFailure(const char* error_message);
+ void SetInvocationError(GinJavaBridgeError error);
void SetPrimitiveResult(const base::ListValue& result_wrapper);
void SetObjectResult(
const base::android::JavaRef<jobject>& object,
@@ -104,7 +105,7 @@ class CONTENT_EXPORT GinJavaMethodInvocationHelper
ObjectRefs object_refs_;
bool holds_primitive_result_;
scoped_ptr<base::ListValue> primitive_result_;
- std::string error_message_;
+ GinJavaBridgeError invocation_error_;
base::android::ScopedJavaGlobalRef<jobject> object_result_;
base::android::ScopedJavaGlobalRef<jclass> safe_annotation_clazz_;

Powered by Google App Engine
This is Rietveld 408576698