OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // IPC messages for injected Java objects (Gin-based implementation). | 5 // IPC messages for injected Java objects (Gin-based implementation). |
6 | 6 |
7 // Multiply-included message file, hence no include guard. | 7 // Multiply-included message file, hence no include guard. |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "content/common/android/gin_java_bridge_errors.h" | 10 #include "content/common/android/gin_java_bridge_errors.h" |
11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
12 #include "ipc/ipc_message_macros.h" | 12 #include "ipc/ipc_message_macros.h" |
13 | 13 |
14 #undef IPC_MESSAGE_EXPORT | 14 #undef IPC_MESSAGE_EXPORT |
15 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 15 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
16 #define IPC_MESSAGE_START GinJavaBridgeMsgStart | 16 #define IPC_MESSAGE_START GinJavaBridgeMsgStart |
17 | 17 |
18 // Messages for handling Java objects injected into JavaScript ----------------- | 18 // Messages for handling Java objects injected into JavaScript ----------------- |
19 | 19 |
20 IPC_ENUM_TRAITS(content::GinJavaBridgeError) | 20 IPC_ENUM_TRAITS_MAX_VALUE(content::GinJavaBridgeError, content::kGinJavaBridgeEr rorLast) |
nasko
2014/09/25 16:29:40
Lines should not exceed 80 characters. Please foll
anujsharma
2014/09/26 03:20:24
Done.
| |
21 | 21 |
22 // Sent from browser to renderer to add a Java object with the given name. | 22 // Sent from browser to renderer to add a Java object with the given name. |
23 // Object IDs are generated on the browser side. | 23 // Object IDs are generated on the browser side. |
24 IPC_MESSAGE_ROUTED2(GinJavaBridgeMsg_AddNamedObject, | 24 IPC_MESSAGE_ROUTED2(GinJavaBridgeMsg_AddNamedObject, |
25 std::string /* name */, | 25 std::string /* name */, |
26 int32 /* object_id */) | 26 int32 /* object_id */) |
27 | 27 |
28 // Sent from browser to renderer to remove a Java object with the given name. | 28 // Sent from browser to renderer to remove a Java object with the given name. |
29 IPC_MESSAGE_ROUTED1(GinJavaBridgeMsg_RemoveNamedObject, | 29 IPC_MESSAGE_ROUTED1(GinJavaBridgeMsg_RemoveNamedObject, |
30 std::string /* name */) | 30 std::string /* name */) |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
64 // 1. (Main usage) To inform that the JS wrapper of the object has | 64 // 1. (Main usage) To inform that the JS wrapper of the object has |
65 // been completely dereferenced and garbage-collected. | 65 // been completely dereferenced and garbage-collected. |
66 // | 66 // |
67 // 2. To notify the browser that wrapper creation has failed. The browser side | 67 // 2. To notify the browser that wrapper creation has failed. The browser side |
68 // assumes optimistically that every time an object is returned from a | 68 // assumes optimistically that every time an object is returned from a |
69 // method, the corresponding wrapper object will be successfully created on | 69 // method, the corresponding wrapper object will be successfully created on |
70 // the renderer side. Sending of this message informs the browser whether | 70 // the renderer side. Sending of this message informs the browser whether |
71 // this expectation has failed. | 71 // this expectation has failed. |
72 IPC_MESSAGE_ROUTED1(GinJavaBridgeHostMsg_ObjectWrapperDeleted, | 72 IPC_MESSAGE_ROUTED1(GinJavaBridgeHostMsg_ObjectWrapperDeleted, |
73 int32 /* object_id */) | 73 int32 /* object_id */) |
OLD | NEW |