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

Unified Diff: content/common/gin_java_bridge_messages.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
« no previous file with comments | « content/common/android/gin_java_bridge_errors.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gin_java_bridge_messages.h
diff --git a/content/common/gin_java_bridge_messages.h b/content/common/gin_java_bridge_messages.h
index f9525b1e5a5c4ba11301855f47456977a1053ad0..cbce41385438e33daf3e312d43d3b036d3a3fb9d 100644
--- a/content/common/gin_java_bridge_messages.h
+++ b/content/common/gin_java_bridge_messages.h
@@ -7,6 +7,7 @@
// Multiply-included message file, hence no include guard.
#include "base/basictypes.h"
+#include "content/common/android/gin_java_bridge_errors.h"
#include "content/common/content_export.h"
#include "ipc/ipc_message_macros.h"
@@ -16,6 +17,8 @@
// Messages for handling Java objects injected into JavaScript -----------------
+IPC_ENUM_TRAITS(content::GinJavaBridgeError)
+
// Sent from browser to renderer to add a Java object with the given name.
// Object IDs are generated on the browser side.
IPC_MESSAGE_ROUTED2(GinJavaBridgeMsg_AddNamedObject,
@@ -45,14 +48,16 @@ IPC_SYNC_MESSAGE_ROUTED2_1(GinJavaBridgeHostMsg_HasMethod,
// a container to work around immutability of base::Value.
// Empty result list indicates that an error has happened on the Java side
// (either bridge-induced error or an unhandled Java exception) and an exception
-// must be thrown into JavaScript.
+// must be thrown into JavaScript. |error_code| indicates the cause of
+// the error.
// Some special value types that are not supported by base::Value are encoded
// as BinaryValues via GinJavaBridgeValue.
-IPC_SYNC_MESSAGE_ROUTED3_1(GinJavaBridgeHostMsg_InvokeMethod,
+IPC_SYNC_MESSAGE_ROUTED3_2(GinJavaBridgeHostMsg_InvokeMethod,
int32 /* object_id */,
std::string /* method_name */,
base::ListValue /* arguments */,
- base::ListValue /* result */)
+ base::ListValue /* result */,
+ content::GinJavaBridgeError /* error_code */)
// Sent from renderer to browser in two cases:
//
« no previous file with comments | « content/common/android/gin_java_bridge_errors.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698