summaryrefslogtreecommitdiff
path: root/chromium/content/common/java_bridge_messages.h
blob: 6bb811631e0279b01fc8e26c3f59cdd8ce4e243f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// IPC messages for injected Java objects. See JavaBridgeDispatcher for details.

// Multiply-included message file, hence no include guard.

#if defined(OS_ANDROID)

#include "content/child/plugin_param_traits.h"
#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_message_macros.h"

#define IPC_MESSAGE_START JavaBridgeMsgStart

// Messages for handling Java objects injected into JavaScript -----------------

// Sent from browser to renderer to add a Java object with the given name.
IPC_MESSAGE_ROUTED2(JavaBridgeMsg_AddNamedObject,
                    base::string16 /* name */,
                    content::NPVariant_Param) /* object */

// Sent from browser to renderer to remove a Java object with the given name.
IPC_MESSAGE_ROUTED1(JavaBridgeMsg_RemoveNamedObject,
                    base::string16 /* name */)

// Sent from renderer to browser to request a route ID for a renderer-side (ie
// JavaScript) object.
IPC_SYNC_MESSAGE_CONTROL0_1(JavaBridgeMsg_GenerateRouteID,
                            int /* route_id */)

// Sent from renderer to browser to get the channel handle for NP channel.
IPC_SYNC_MESSAGE_ROUTED0_1(JavaBridgeHostMsg_GetChannelHandle,
                           IPC::ChannelHandle) /* channel handle */

#endif  // defined(OS_ANDROID)