Retire EwkViewMsg_DidFailLoadWithError
[platform/framework/web/chromium-efl.git] / tizen_src / ewk / efl_integration / common / render_messages_ewk.h
1 // Copyright 2015 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/print_pages_params.h"
9 #include "common/hit_test_params.h"
10 #include "common/cache_params_efl.h"
11 #include "common/navigation_policy_params.h"
12 #include "common/web_preferences_efl.h"
13 #include "ipc/ipc_message_macros.h"
14 #include "ipc/ipc_channel_handle.h"
15 #include "private/ewk_hit_test_private.h"
16 #include "private/ewk_text_style_private.h"
17 #include "private/ewk_wrt_private.h"
18 #include "public/ewk_hit_test.h"
19 #include "public/ewk_view.h"
20 #include "third_party/WebKit/public/web/WebNavigationPolicy.h"
21 #include "third_party/WebKit/public/web/WebNavigationType.h"
22 #include "third_party/WebKit/public/web/WebViewModeEnums.h"
23 #include "ipc_message_start_ewk.h"
24
25 typedef std::map<std::string, std::string> StringMap;
26
27 #define IPC_MESSAGE_START EwkMsgStart
28
29 IPC_STRUCT_TRAITS_BEGIN(Ewk_Wrt_Message_Data)
30   IPC_STRUCT_TRAITS_MEMBER(type)
31   IPC_STRUCT_TRAITS_MEMBER(value)
32   IPC_STRUCT_TRAITS_MEMBER(id)
33   IPC_STRUCT_TRAITS_MEMBER(reference_id)
34 IPC_STRUCT_TRAITS_END()
35
36 IPC_STRUCT_TRAITS_BEGIN(WebPreferencesEfl)
37   IPC_STRUCT_TRAITS_MEMBER(shrinks_viewport_content_to_fit)
38   IPC_STRUCT_TRAITS_MEMBER(javascript_can_open_windows_automatically_ewk)
39 IPC_STRUCT_TRAITS_END()
40
41 IPC_STRUCT_TRAITS_BEGIN(Hit_Test_Params::Node_Data)
42   IPC_STRUCT_TRAITS_MEMBER(tagName)
43   IPC_STRUCT_TRAITS_MEMBER(nodeValue)
44   IPC_STRUCT_TRAITS_MEMBER(attributes)
45 IPC_STRUCT_TRAITS_END()
46
47 IPC_STRUCT_TRAITS_BEGIN(Hit_Test_Params::Image_Data)
48   IPC_STRUCT_TRAITS_MEMBER(fileNameExtension)
49   IPC_STRUCT_TRAITS_MEMBER(imageBitmap)
50 IPC_STRUCT_TRAITS_END()
51
52 IPC_STRUCT_TRAITS_BEGIN(Hit_Test_Params)
53   IPC_STRUCT_TRAITS_MEMBER(context)
54   IPC_STRUCT_TRAITS_MEMBER(linkURI)
55   IPC_STRUCT_TRAITS_MEMBER(linkTitle)
56   IPC_STRUCT_TRAITS_MEMBER(linkLabel)
57   IPC_STRUCT_TRAITS_MEMBER(imageURI)
58   IPC_STRUCT_TRAITS_MEMBER(mediaURI)
59   IPC_STRUCT_TRAITS_MEMBER(isEditable)
60   IPC_STRUCT_TRAITS_MEMBER(mode)
61   IPC_STRUCT_TRAITS_MEMBER(nodeData)
62   IPC_STRUCT_TRAITS_MEMBER(imageData)
63 IPC_STRUCT_TRAITS_END()
64
65 IPC_ENUM_TRAITS(Ewk_CSP_Header_Type)
66
67 IPC_ENUM_TRAITS(Ewk_Hit_Test_Mode)
68
69 IPC_STRUCT_TRAITS_BEGIN(DidPrintPagesParams)
70   IPC_STRUCT_TRAITS_MEMBER(metafile_data_handle)
71   IPC_STRUCT_TRAITS_MEMBER(data_size)
72   IPC_STRUCT_TRAITS_MEMBER(document_cookie)
73   IPC_STRUCT_TRAITS_MEMBER(filename)
74 IPC_STRUCT_TRAITS_END()
75
76 IPC_STRUCT_TRAITS_BEGIN(CacheParamsEfl)
77   IPC_STRUCT_TRAITS_MEMBER(cache_total_capacity)
78   IPC_STRUCT_TRAITS_MEMBER(cache_min_dead_capacity)
79   IPC_STRUCT_TRAITS_MEMBER(cache_max_dead_capacity)
80 IPC_STRUCT_TRAITS_END()
81
82 IPC_STRUCT_TRAITS_BEGIN(SelectionStylePrams)
83   IPC_STRUCT_TRAITS_MEMBER(underline_state)
84   IPC_STRUCT_TRAITS_MEMBER(italic_state)
85   IPC_STRUCT_TRAITS_MEMBER(bold_state)
86   IPC_STRUCT_TRAITS_MEMBER(bg_color)
87   IPC_STRUCT_TRAITS_MEMBER(color)
88   IPC_STRUCT_TRAITS_MEMBER(font_size)
89   IPC_STRUCT_TRAITS_MEMBER(order_list_state)
90   IPC_STRUCT_TRAITS_MEMBER(un_order_list_state)
91   IPC_STRUCT_TRAITS_MEMBER(text_align_center_state)
92   IPC_STRUCT_TRAITS_MEMBER(text_align_left_state)
93   IPC_STRUCT_TRAITS_MEMBER(text_align_right_state)
94   IPC_STRUCT_TRAITS_MEMBER(text_align_full_state)
95   IPC_STRUCT_TRAITS_MEMBER(has_composition)
96 IPC_STRUCT_TRAITS_END()
97
98 IPC_STRUCT_TRAITS_BEGIN(SelectionColor)
99   IPC_STRUCT_TRAITS_MEMBER(r)
100   IPC_STRUCT_TRAITS_MEMBER(g)
101   IPC_STRUCT_TRAITS_MEMBER(b)
102   IPC_STRUCT_TRAITS_MEMBER(a)
103 IPC_STRUCT_TRAITS_END()
104
105 IPC_ENUM_TRAITS(blink::WebNavigationPolicy)
106 IPC_ENUM_TRAITS(blink::WebNavigationType)
107
108 IPC_STRUCT_TRAITS_BEGIN(NavigationPolicyParams)
109   IPC_STRUCT_TRAITS_MEMBER(render_view_id)
110   IPC_STRUCT_TRAITS_MEMBER(cookie)
111   IPC_STRUCT_TRAITS_MEMBER(url)
112   IPC_STRUCT_TRAITS_MEMBER(httpMethod)
113   IPC_STRUCT_TRAITS_MEMBER(referrer)
114   IPC_STRUCT_TRAITS_MEMBER(policy)
115   IPC_STRUCT_TRAITS_MEMBER(type)
116   IPC_STRUCT_TRAITS_MEMBER(should_replace_current_entry)
117   IPC_STRUCT_TRAITS_MEMBER(is_main_frame)
118   IPC_STRUCT_TRAITS_MEMBER(is_redirect)
119 IPC_STRUCT_TRAITS_END()
120
121 IPC_ENUM_TRAITS(blink::WebViewMode)
122
123
124 IPC_MESSAGE_CONTROL2(WrtMsg_ParseUrl,
125                      int,            // result: request_id
126                      GURL)           // result: url
127
128 IPC_MESSAGE_CONTROL2(WrtMsg_ParseUrlResponse,
129                      int,            // result: request_id
130                      GURL)           // result: url
131
132 IPC_MESSAGE_CONTROL1(WrtMsg_SendWrtMessage,
133                      Ewk_Wrt_Message_Data /* data */);
134
135 IPC_SYNC_MESSAGE_ROUTED1_1(EwkHostMsg_WrtSyncMessage,
136                            Ewk_Wrt_Message_Data /* data */,
137                            std::string /*result*/);
138
139 IPC_MESSAGE_ROUTED1(EwkHostMsg_WrtMessage,
140                     Ewk_Wrt_Message_Data /* data */);
141
142 IPC_MESSAGE_CONTROL2(EwkViewHostMsg_HitTestReply,
143                     int, /* render_view_id */
144                     Hit_Test_Params);
145
146 IPC_MESSAGE_CONTROL3(EwkViewHostMsg_HitTestAsyncReply,
147                     int, /* render_view_id */
148                     Hit_Test_Params,
149                     int64_t /* request id */)
150
151 IPC_MESSAGE_ROUTED2(EwkViewMsg_SetCSP,
152                     std::string, /* policy */
153                     Ewk_CSP_Header_Type /* header type */)
154
155 IPC_SYNC_MESSAGE_ROUTED0_2(EwkHostMsg_GetContentSecurityPolicy,
156                            std::string, /* policy */
157                            Ewk_CSP_Header_Type /* header type */)
158
159 IPC_MESSAGE_ROUTED3(EwkViewMsg_Scale,
160                     double, /* scale factor */
161                     int, /* center x */
162                     int /* center y */)
163
164 IPC_MESSAGE_ROUTED1(EwkHostMsg_DidPrintPagesToPdf,
165                     DidPrintPagesParams /* pdf document parameters */)
166
167 IPC_MESSAGE_CONTROL0(EflViewMsg_ClearCache)
168 IPC_MESSAGE_CONTROL1(EflViewMsg_SetCache,
169                      CacheParamsEfl)
170
171 IPC_MESSAGE_ROUTED3(EwkViewMsg_PrintToPdf,
172                     int, /* width */
173                     int, /* height */
174                     base::FilePath /* file name to save pdf*/)
175
176 IPC_MESSAGE_ROUTED1(EwkViewMsg_GetMHTMLData,
177                     int /* callback id */)
178
179 IPC_MESSAGE_ROUTED3(EwkViewMsg_DoHitTest,
180                     int, /* horizontal position */
181                     int, /* vertical position */
182                     Ewk_Hit_Test_Mode /* mode */)
183
184 IPC_MESSAGE_ROUTED4(EwkViewMsg_DoHitTestAsync,
185                     int, /* horizontal position */
186                     int, /* vertical position */
187                     Ewk_Hit_Test_Mode, /* mode */
188                     int64_t /* request id */)
189
190 // Tells the renderer to clear the cache.
191 IPC_MESSAGE_ROUTED0(EwkViewMsg_UseSettingsFont)
192 IPC_MESSAGE_ROUTED0(EwkViewMsg_SetBrowserFont)
193 IPC_MESSAGE_ROUTED0(EwkViewMsg_SuspendScheduledTask)
194 IPC_MESSAGE_ROUTED0(EwkViewMsg_ResumeScheduledTasks)
195
196 IPC_MESSAGE_ROUTED0(EwkViewMsg_GetSelectionStyle)
197
198 IPC_MESSAGE_ROUTED2(EwkViewMsg_SetScroll,
199                     int, /* horizontal position */
200                     int /* vertical position */)
201
202 IPC_MESSAGE_ROUTED1(EwkViewMsg_PlainTextGet,
203                     int /* callback id */)
204
205 IPC_MESSAGE_ROUTED1(EwkViewMsg_SelectionTextStyleState,
206                     SelectionStylePrams /* params */)
207
208 IPC_MESSAGE_ROUTED1(EwkSettingsMsg_UpdateWebKitPreferencesEfl, WebPreferencesEfl)
209
210 IPC_MESSAGE_ROUTED2(EwkHostMsg_HandleTapGestureWithContext,
211                     bool /* is_link */,
212                     bool /* is_editable_content */)
213
214 IPC_MESSAGE_ROUTED2(EwkHostMsg_PlainTextGetContents,
215                     std::string, /* contentText */
216                     int /* callback id */)
217
218 IPC_MESSAGE_ROUTED2(EwkHostMsg_DidChangeContentsSize,
219                     int, /* width */
220                     int /* height */)
221
222 IPC_MESSAGE_ROUTED2(EwkHostMsg_DidChangeMaxScrollOffset,
223                     int, /*max scrollX*/
224                     int  /*max scrollY*/)
225
226 IPC_MESSAGE_ROUTED2(EwkHostMsg_DidChangeScrollOffset,
227                     int, /*scrollX*/
228                     int  /*scrollY*/)
229
230 IPC_MESSAGE_ROUTED2(EwkHostMsg_ReadMHTMLData,
231                     std::string, /* Mhtml text */
232                     int /* callback id */)
233
234 IPC_MESSAGE_ROUTED1(EwkHostMsg_DidChangePageScaleFactor,
235                     double /* page scale factor */)
236
237 IPC_MESSAGE_ROUTED1(EwkViewMsg_SetDrawsTransparentBackground,
238                     bool /* enabled */)
239
240 // Notifies the browser to form submit
241 IPC_MESSAGE_ROUTED1(EwkHostMsg_FormSubmit, GURL)
242
243 IPC_MESSAGE_ROUTED1(EwkViewMsg_WebAppIconUrlGet,
244                     int /* callback id */)
245
246 IPC_MESSAGE_ROUTED2(EwkHostMsg_WebAppIconUrlGet,
247                     std::string, /* icon url */
248                     int /* callback id */)
249
250 IPC_MESSAGE_ROUTED1(EwkViewMsg_WebAppIconUrlsGet,
251                     int /* callback id */)
252
253 IPC_MESSAGE_ROUTED2(EwkHostMsg_WebAppIconUrlsGet,
254                     StringMap, /* icon urls */
255                     int /* callback id */)
256
257 IPC_MESSAGE_ROUTED1(EwkViewMsg_WebAppCapableGet,
258                     int /* calback id */)
259
260 IPC_MESSAGE_ROUTED2(EwkHostMsg_WebAppCapableGet,
261                     bool, /* capable */
262                     int /* calback id */)
263
264 IPC_SYNC_MESSAGE_CONTROL1_1(EwkHostMsg_DecideNavigationPolicy,
265                             NavigationPolicyParams,
266                             bool /*handled*/)
267
268 IPC_MESSAGE_ROUTED1(ViewMsg_SetViewMode,
269                     blink::WebViewMode /* view_mode */)
270
271 IPC_MESSAGE_ROUTED1(ViewMsg_SetTextZoomFactor,
272                     float /*font zoom factor*/)
273
274 IPC_MESSAGE_ROUTED1(EwkFrameMsg_LoadNotFoundErrorPage,
275                     std::string /* error url */)
276
277 IPC_MESSAGE_ROUTED1(EwkFrameMsg_MoveToNextOrPreviousSelectElement,
278                     bool /* next */)
279 IPC_MESSAGE_ROUTED0(EwkFrameMsg_RequestSelectCollectionInformation);
280 IPC_MESSAGE_ROUTED4(EwkHostMsg_RequestSelectCollectionInformationUpdateACK,
281                     int /* formElementCount */,
282                     int /* currentNodeIndex */,
283                     bool /* prevState */,
284                     bool /* nextState */)