[M108 Migration] Remove "undo,size" and "redo,size" callbacks
[platform/framework/web/chromium-efl.git] / tizen_src / ewk / efl_integration / common / render_messages_ewk.h
1 // Copyright 2015-2016 Samsung Electronics. 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 // Multiply-included file, no traditional include guard.
6
7 #include "base/values.h"
8 #include "common/hit_test_params.h"
9 #include "common/navigation_policy_params.h"
10 #include "common/print_pages_params.h"
11 #include "common/web_preferences_efl.h"
12 #include "content/public/common/common_param_traits.h"
13 #include "content/public/common/common_param_traits_macros.h"
14 #include "ipc/ipc_channel_handle.h"
15 #include "ipc/ipc_message_macros.h"
16 #include "ipc_message_start_ewk.h"
17 #include "private/ewk_hit_test_private.h"
18 #include "private/ewk_wrt_private.h"
19 #include "public/ewk_hit_test_internal.h"
20 #include "public/ewk_view.h"
21 #include "public/ewk_view_internal.h"
22 #include "third_party/blink/public/web/web_navigation_policy.h"
23 #include "third_party/blink/public/web/web_navigation_type.h"
24
25 typedef std::map<std::string, std::string> StringMap;
26 typedef std::map<std::string, bool> ExtensibleApiMap;
27
28 #define IPC_MESSAGE_START EwkMsgStart
29
30 IPC_STRUCT_TRAITS_BEGIN(Ewk_Wrt_Message_Data)
31   IPC_STRUCT_TRAITS_MEMBER(type)
32   IPC_STRUCT_TRAITS_MEMBER(value)
33   IPC_STRUCT_TRAITS_MEMBER(id)
34   IPC_STRUCT_TRAITS_MEMBER(reference_id)
35 IPC_STRUCT_TRAITS_END()
36
37 IPC_STRUCT_TRAITS_BEGIN(WebPreferencesEfl)
38   IPC_STRUCT_TRAITS_MEMBER(shrinks_viewport_content_to_fit)
39   IPC_STRUCT_TRAITS_MEMBER(javascript_can_open_windows_automatically_ewk)
40   IPC_STRUCT_TRAITS_MEMBER(link_effect_enabled)
41 IPC_STRUCT_TRAITS_END()
42
43 IPC_STRUCT_TRAITS_BEGIN(Hit_Test_Params::Node_Data)
44   IPC_STRUCT_TRAITS_MEMBER(tagName)
45   IPC_STRUCT_TRAITS_MEMBER(nodeValue)
46   IPC_STRUCT_TRAITS_MEMBER(attributes)
47 IPC_STRUCT_TRAITS_END()
48
49 IPC_STRUCT_TRAITS_BEGIN(Hit_Test_Params::Image_Data)
50   IPC_STRUCT_TRAITS_MEMBER(fileNameExtension)
51   IPC_STRUCT_TRAITS_MEMBER(imageBitmap)
52 IPC_STRUCT_TRAITS_END()
53
54 IPC_STRUCT_TRAITS_BEGIN(Hit_Test_Params)
55   IPC_STRUCT_TRAITS_MEMBER(context)
56   IPC_STRUCT_TRAITS_MEMBER(linkURI)
57   IPC_STRUCT_TRAITS_MEMBER(linkTitle)
58   IPC_STRUCT_TRAITS_MEMBER(linkLabel)
59   IPC_STRUCT_TRAITS_MEMBER(imageURI)
60   IPC_STRUCT_TRAITS_MEMBER(isEditable)
61   IPC_STRUCT_TRAITS_MEMBER(mode)
62   IPC_STRUCT_TRAITS_MEMBER(nodeData)
63   IPC_STRUCT_TRAITS_MEMBER(imageData)
64 IPC_STRUCT_TRAITS_END()
65
66 IPC_ENUM_TRAITS(Ewk_CSP_Header_Type)
67
68 IPC_ENUM_TRAITS(Ewk_Hit_Test_Mode)
69
70 IPC_STRUCT_TRAITS_BEGIN(DidPrintPagesParams)
71   IPC_STRUCT_TRAITS_MEMBER(metafile_data_handle)
72   IPC_STRUCT_TRAITS_MEMBER(data_size)
73   IPC_STRUCT_TRAITS_MEMBER(document_cookie)
74   IPC_STRUCT_TRAITS_MEMBER(filename)
75 IPC_STRUCT_TRAITS_END()
76
77 IPC_ENUM_TRAITS(blink::WebNavigationPolicy)
78 IPC_ENUM_TRAITS(blink::WebNavigationType)
79
80 IPC_STRUCT_TRAITS_BEGIN(NavigationPolicyParams)
81   IPC_STRUCT_TRAITS_MEMBER(render_frame_id)
82   IPC_STRUCT_TRAITS_MEMBER(cookie)
83   IPC_STRUCT_TRAITS_MEMBER(url)
84   IPC_STRUCT_TRAITS_MEMBER(httpMethod)
85   IPC_STRUCT_TRAITS_MEMBER(referrer)
86   IPC_STRUCT_TRAITS_MEMBER(policy)
87   IPC_STRUCT_TRAITS_MEMBER(type)
88   IPC_STRUCT_TRAITS_MEMBER(should_replace_current_entry)
89   IPC_STRUCT_TRAITS_MEMBER(is_main_frame)
90   IPC_STRUCT_TRAITS_MEMBER(is_redirect)
91 IPC_STRUCT_TRAITS_END()
92 #if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
93 IPC_ENUM_TRAITS(blink::WebViewMode)
94 #endif
95
96 IPC_MESSAGE_CONTROL2(WrtMsg_ParseUrl,
97                      int,            // result: request_id
98                      GURL)           // result: url
99
100 IPC_MESSAGE_CONTROL2(WrtMsg_ParseUrlResponse,
101                      int,            // result: request_id
102                      GURL)           // result: url
103
104 IPC_MESSAGE_CONTROL1(WrtMsg_SendWrtMessage,
105                      Ewk_Wrt_Message_Data /* data */)
106
107 IPC_SYNC_MESSAGE_ROUTED1_1(EwkHostMsg_WrtSyncMessage,
108                            Ewk_Wrt_Message_Data /* data */,
109                            std::string /*result*/)
110
111 IPC_MESSAGE_ROUTED1(EwkHostMsg_WrtMessage,
112                     Ewk_Wrt_Message_Data /* data */)
113
114 IPC_MESSAGE_CONTROL2(EwkViewHostMsg_HitTestReply,
115                     int, /* render_view_id */
116                     Hit_Test_Params);
117
118 IPC_MESSAGE_CONTROL3(EwkViewHostMsg_HitTestAsyncReply,
119                     int, /* render_view_id */
120                     Hit_Test_Params,
121                     int64_t /* request id */)
122
123 IPC_MESSAGE_ROUTED0(EwkHostMsg_DidCreateDocumentElement)
124
125 IPC_MESSAGE_ROUTED1(EwkHostMsg_DidPrintPagesToPdf,
126                     DidPrintPagesParams /* pdf document parameters */)
127
128 IPC_MESSAGE_CONTROL0(EflViewMsg_ClearCache)
129 IPC_MESSAGE_CONTROL1(EflViewMsg_SetCache, int64_t /* cache_total_capacity */)
130 IPC_MESSAGE_ROUTED3(EwkViewMsg_PrintToPdf,
131                     int, /* width */
132                     int, /* height */
133                     base::FilePath /* file name to save pdf*/)
134
135 IPC_MESSAGE_ROUTED1(EwkViewMsg_GetMHTMLData,
136                     int /* callback id */)
137
138 IPC_MESSAGE_ROUTED3(EwkViewMsg_DoHitTest,
139                     int, /* horizontal position */
140                     int, /* vertical position */
141                     Ewk_Hit_Test_Mode /* mode */)
142
143 IPC_MESSAGE_ROUTED4(EwkViewMsg_DoHitTestAsync,
144                     int, /* horizontal position */
145                     int, /* vertical position */
146                     Ewk_Hit_Test_Mode, /* mode */
147                     int64_t /* request id */)
148
149 // Tells the renderer to clear the cache.
150 IPC_MESSAGE_ROUTED0(EwkViewMsg_UseSettingsFont)
151 IPC_MESSAGE_ROUTED0(EwkViewMsg_SetBrowserFont)
152 IPC_MESSAGE_ROUTED0(EwkViewMsg_SuspendScheduledTask)
153 IPC_MESSAGE_ROUTED0(EwkViewMsg_ResumeScheduledTasks)
154
155 IPC_MESSAGE_ROUTED2(EwkViewMsg_SetScroll,
156                     int, /* horizontal position */
157                     int /* vertical position */)
158
159 IPC_MESSAGE_ROUTED1(EwkViewMsg_PlainTextGet,
160                     int /* callback id */)
161
162 IPC_MESSAGE_ROUTED1(EwkSettingsMsg_UpdateWebKitPreferencesEfl, WebPreferencesEfl)
163
164 IPC_MESSAGE_ROUTED2(EwkHostMsg_HandleTapGestureWithContext,
165                     bool /* is_link */,
166                     bool /* is_editable_content */)
167
168 IPC_MESSAGE_ROUTED0(EwkHostMsg_PlayLinkEffect)
169
170 IPC_MESSAGE_ROUTED2(EwkHostMsg_PlainTextGetContents,
171                     std::string, /* contentText */
172                     int /* callback id */)
173
174 IPC_MESSAGE_ROUTED2(EwkHostMsg_DidChangeContentsSize,
175                     int, /* width */
176                     int /* height */)
177
178 IPC_MESSAGE_ROUTED2(EwkHostMsg_DidChangeMaxScrollOffset,
179                     int, /*max scrollX*/
180                     int  /*max scrollY*/)
181
182 IPC_MESSAGE_ROUTED2(EwkHostMsg_DidChangeScrollOffset,
183                     int, /*scrollX*/
184                     int  /*scrollY*/)
185
186 IPC_MESSAGE_ROUTED2(EwkHostMsg_ReadMHTMLData,
187                     std::string, /* Mhtml text */
188                     int /* callback id */)
189
190 IPC_MESSAGE_ROUTED1(EwkViewMsg_SetDrawsTransparentBackground,
191                     bool /* enabled */)
192
193 // Notifies the browser to form submit
194 IPC_MESSAGE_ROUTED1(EwkHostMsg_FormSubmit, GURL)
195
196 IPC_MESSAGE_ROUTED1(EwkViewMsg_WebAppIconUrlGet,
197                     int /* callback id */)
198
199 IPC_MESSAGE_ROUTED2(EwkHostMsg_WebAppIconUrlGet,
200                     std::string, /* icon url */
201                     int /* callback id */)
202
203 IPC_MESSAGE_ROUTED1(EwkViewMsg_WebAppIconUrlsGet,
204                     int /* callback id */)
205
206 IPC_MESSAGE_ROUTED2(EwkHostMsg_WebAppIconUrlsGet,
207                     StringMap, /* icon urls */
208                     int /* callback id */)
209
210 IPC_MESSAGE_ROUTED1(EwkViewMsg_WebAppCapableGet,
211                     int /* calback id */)
212
213 IPC_MESSAGE_ROUTED2(EwkHostMsg_WebAppCapableGet,
214                     bool, /* capable */
215                     int /* calback id */)
216
217 IPC_SYNC_MESSAGE_CONTROL1_1(EwkHostMsg_DecideNavigationPolicy,
218                             NavigationPolicyParams,
219                             bool /*handled*/)
220
221 // FIXME: error: ‘WebNavigationTypeOther’ is not a member of ‘blink’
222 #if !defined(EWK_BRINGUP)  // FIXME: m67 bringup
223 IPC_MESSAGE_ROUTED1(ViewMsg_SetViewMode,
224                     blink::WebViewMode /* view_mode */)
225 #endif
226
227 IPC_MESSAGE_ROUTED1(ViewMsg_SetTextZoomFactor,
228                     float /*font zoom factor*/)
229
230 IPC_MESSAGE_ROUTED1(EwkFrameMsg_LoadNotFoundErrorPage,
231                     std::string /* error url */)
232
233 IPC_MESSAGE_ROUTED1(EwkFrameMsg_MoveToNextOrPreviousSelectElement,
234                     bool /* next */)
235 IPC_MESSAGE_ROUTED0(EwkFrameMsg_RequestSelectCollectionInformation)
236 IPC_MESSAGE_ROUTED4(EwkHostMsg_RequestSelectCollectionInformationUpdateACK,
237                     int /* formElementCount */,
238                     int /* currentNodeIndex */,
239                     bool /* prevState */,
240                     bool /* nextState */)
241
242 IPC_MESSAGE_CONTROL1(EwkProcessMsg_UpdateTizenExtensible,
243                      ExtensibleApiMap /* Extensible APIs */)
244 IPC_MESSAGE_CONTROL2(EwkProcessMsg_SetExtensibleAPI,
245                      std::string /* api name */,
246                      bool /* enable */)
247
248 IPC_MESSAGE_ROUTED0(EwkHostMsg_DidNotAllowScript)