[email protected] | 7f3c7af | 2011-10-20 22:52:51 | [diff] [blame] | 1 | // Copyright (c) 2011 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 | // IPC messages for injected Java objects. See JavaBridgeDispatcher for details. |
| 6 | |
| 7 | // Multiply-included message file, hence no include guard. |
| 8 | |
[email protected] | 9d8ea30 | 2012-09-25 15:04:22 | [diff] [blame] | 9 | #include "content/common/content_param_traits.h" |
[email protected] | 7f3c7af | 2011-10-20 22:52:51 | [diff] [blame] | 10 | #include "ipc/ipc_channel_handle.h" |
| 11 | #include "ipc/ipc_message_macros.h" |
| 12 | |
| 13 | #define IPC_MESSAGE_START JavaBridgeMsgStart |
| 14 | |
| 15 | // Messages for handling Java objects injected into JavaScript ----------------- |
| 16 | |
| 17 | // Sent from browser to renderer to initialize the Java Bridge. |
[email protected] | 64d0e19 | 2011-12-09 14:44:20 | [diff] [blame] | 18 | IPC_MESSAGE_ROUTED0(JavaBridgeMsg_Init) |
[email protected] | 7f3c7af | 2011-10-20 22:52:51 | [diff] [blame] | 19 | |
| 20 | // Sent from browser to renderer to add a Java object with the given name. |
| 21 | IPC_MESSAGE_ROUTED2(JavaBridgeMsg_AddNamedObject, |
| 22 | string16 /* name */, |
[email protected] | 13075767 | 2012-10-24 00:26:19 | [diff] [blame] | 23 | content::NPVariant_Param) /* object */ |
[email protected] | 7f3c7af | 2011-10-20 22:52:51 | [diff] [blame] | 24 | |
| 25 | // Sent from browser to renderer to remove a Java object with the given name. |
| 26 | IPC_MESSAGE_ROUTED1(JavaBridgeMsg_RemoveNamedObject, |
| 27 | string16 /* name */) |
[email protected] | 64d0e19 | 2011-12-09 14:44:20 | [diff] [blame] | 28 | |
[email protected] | 98a7aaf | 2011-12-20 18:26:23 | [diff] [blame] | 29 | // Sent from renderer to browser to request a route ID for a renderer-side (ie |
| 30 | // JavaScript) object. |
| 31 | IPC_SYNC_MESSAGE_CONTROL0_1(JavaBridgeMsg_GenerateRouteID, |
| 32 | int /* route_id */) |
| 33 | |
[email protected] | 64d0e19 | 2011-12-09 14:44:20 | [diff] [blame] | 34 | // Sent from renderer to browser to get the channel handle for NP channel. |
| 35 | IPC_SYNC_MESSAGE_ROUTED0_1(JavaBridgeHostMsg_GetChannelHandle, |
| 36 | IPC::ChannelHandle) /* channel handle */ |