Upstream version 11.40.277.0
[platform/framework/web/crosswalk.git] / src / xwalk / runtime / common / xwalk_common_messages.h
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5
6 // Multiply-included file, no traditional include guard.
7 #include <string>
8
9 #include "content/public/common/common_param_traits.h"
10 #include "ipc/ipc_channel_handle.h"
11 #include "ipc/ipc_message_macros.h"
12 #include "ipc/ipc_platform_file.h"
13 #include "url/gurl.h"
14 #include "xwalk/application/browser/application_security_policy.h"
15
16 // Singly-included section for enums and custom IPC traits.
17 #ifndef XWALK_RUNTIME_COMMON_XWALK_COMMON_MESSAGES_H_
18 #define XWALK_RUNTIME_COMMON_XWALK_COMMON_MESSAGES_H_
19
20 namespace IPC {
21
22 // TODO(upstream): - add enums and custom IPC traits here when needed.
23
24 }  // namespace IPC
25
26 #endif  // XWALK_RUNTIME_COMMON_XWALK_COMMON_MESSAGES_H_
27
28 #define IPC_MESSAGE_START ViewMsgStart
29
30 IPC_ENUM_TRAITS(xwalk::application::ApplicationSecurityPolicy::SecurityMode)
31 //-----------------------------------------------------------------------------
32 // RenderView messages
33 // These are messages sent from the browser to the renderer process.
34
35 IPC_MESSAGE_CONTROL3(ViewMsg_SetAccessWhiteList,  // NOLINT
36                      GURL /* source */,
37                      GURL /* dest */,
38                      bool /* allow_subdomains */)
39
40 IPC_MESSAGE_CONTROL2(ViewMsg_EnableSecurityMode,    // NOLINT
41                      GURL /* application url */,
42                      xwalk::application::ApplicationSecurityPolicy::SecurityMode
43                      /* security mode */)
44
45 IPC_MESSAGE_CONTROL1(ViewMsg_SuspendJSEngine,  // NOLINT
46                      bool /* is suspend */)
47
48 #if defined(OS_TIZEN)
49 IPC_MESSAGE_CONTROL1(ViewMsg_UserAgentStringChanged,  // NOLINT
50                      std::string /*new user agent string*/)
51 #endif
52
53 IPC_MESSAGE_ROUTED1(ViewMsg_HWKeyPressed, int /*keycode*/)  // NOLINT
54
55 // These are messages sent from the renderer to the browser process.
56 #if defined(OS_TIZEN)
57 IPC_MESSAGE_CONTROL1(ViewMsg_OpenLinkExternal,  // NOLINT
58                      GURL /* target link */)
59 #endif  // OS_TIZEN  // NOLINT