Blink roll 174933:174969
[chromium-blink-merge.git] / content / common / java_bridge_messages.h
blob6bb811631e0279b01fc8e26c3f59cdd8ce4e243f
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.
5 // IPC messages for injected Java objects. See JavaBridgeDispatcher for details.
7 // Multiply-included message file, hence no include guard.
9 #if defined(OS_ANDROID)
11 #include "content/child/plugin_param_traits.h"
12 #include "ipc/ipc_channel_handle.h"
13 #include "ipc/ipc_message_macros.h"
15 #define IPC_MESSAGE_START JavaBridgeMsgStart
17 // Messages for handling Java objects injected into JavaScript -----------------
19 // Sent from browser to renderer to add a Java object with the given name.
20 IPC_MESSAGE_ROUTED2(JavaBridgeMsg_AddNamedObject,
21 base::string16 /* name */,
22 content::NPVariant_Param) /* object */
24 // Sent from browser to renderer to remove a Java object with the given name.
25 IPC_MESSAGE_ROUTED1(JavaBridgeMsg_RemoveNamedObject,
26 base::string16 /* name */)
28 // Sent from renderer to browser to request a route ID for a renderer-side (ie
29 // JavaScript) object.
30 IPC_SYNC_MESSAGE_CONTROL0_1(JavaBridgeMsg_GenerateRouteID,
31 int /* route_id */)
33 // Sent from renderer to browser to get the channel handle for NP channel.
34 IPC_SYNC_MESSAGE_ROUTED0_1(JavaBridgeHostMsg_GetChannelHandle,
35 IPC::ChannelHandle) /* channel handle */
37 #endif // defined(OS_ANDROID)