-// Copyright 2015 Samsung Electronics. All rights reserved.
+// Copyright 2015-2016 Samsung Electronics. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Multiply-included file, no traditional include guard.
#include "base/values.h"
-#include "common//print_pages_params.h"
-#include "common/cache_params_efl.h"
+#include "common/hit_test_params.h"
#include "common/navigation_policy_params.h"
-#include "ipc/ipc_message_macros.h"
+#include "common/print_pages_params.h"
+#include "common/web_preferences_efl.h"
+#include "content/public/common/common_param_traits.h"
+#include "content/public/common/common_param_traits_macros.h"
#include "ipc/ipc_channel_handle.h"
+#include "ipc/ipc_message_macros.h"
+#include "ipc_message_start_ewk.h"
#include "private/ewk_hit_test_private.h"
-#include "private/ewk_text_style_private.h"
#include "private/ewk_wrt_private.h"
+#include "public/ewk_hit_test_internal.h"
#include "public/ewk_view.h"
-#include "tizen_webview/public/tw_error.h"
-#include "tizen_webview/public/tw_hit_test.h"
-#include "tizen_webview/public/tw_settings.h"
-#include "third_party/WebKit/public/web/WebNavigationPolicy.h"
-#include "third_party/WebKit/public/web/WebNavigationType.h"
-#include "third_party/WebKit/public/web/WebViewModeEnums.h"
+#include "public/ewk_view_internal.h"
+#include "third_party/blink/public/web/web_navigation_policy.h"
+#include "third_party/blink/public/web/web_navigation_type.h"
+#if BUILDFLAG(IS_TIZEN_TV)
+#include "cc/input/scrollbar.h"
+#endif
typedef std::map<std::string, std::string> StringMap;
+typedef std::map<std::string, bool> ExtensibleApiMap;
#define IPC_MESSAGE_START EwkMsgStart
IPC_STRUCT_TRAITS_MEMBER(reference_id)
IPC_STRUCT_TRAITS_END()
-IPC_STRUCT_TRAITS_BEGIN(tizen_webview::Settings)
- IPC_STRUCT_TRAITS_MEMBER(javascript_can_open_windows)
-IPC_STRUCT_TRAITS_END()
-
-IPC_STRUCT_TRAITS_BEGIN(tizen_webview::Error)
- IPC_STRUCT_TRAITS_MEMBER(url)
- IPC_STRUCT_TRAITS_MEMBER(is_main_frame)
- IPC_STRUCT_TRAITS_MEMBER(code)
- IPC_STRUCT_TRAITS_MEMBER(description)
- IPC_STRUCT_TRAITS_MEMBER(domain)
+IPC_STRUCT_TRAITS_BEGIN(WebPreferencesEfl)
+ IPC_STRUCT_TRAITS_MEMBER(javascript_can_open_windows_automatically_ewk)
IPC_STRUCT_TRAITS_END()
-IPC_ENUM_TRAITS(Ewk_CSP_Header_Type)
-
-IPC_ENUM_TRAITS(tizen_webview::Hit_Test_Mode)
-IPC_ENUM_TRAITS(tizen_webview::Hit_Test_Result_Context)
-
-IPC_STRUCT_TRAITS_BEGIN(_Ewk_Hit_Test::Hit_Test_Node_Data)
+IPC_STRUCT_TRAITS_BEGIN(Hit_Test_Params::Node_Data)
IPC_STRUCT_TRAITS_MEMBER(tagName)
IPC_STRUCT_TRAITS_MEMBER(nodeValue)
+ IPC_STRUCT_TRAITS_MEMBER(attributes)
IPC_STRUCT_TRAITS_END()
-IPC_STRUCT_TRAITS_BEGIN(DidPrintPagesParams)
- IPC_STRUCT_TRAITS_MEMBER(metafile_data_handle)
- IPC_STRUCT_TRAITS_MEMBER(data_size)
- IPC_STRUCT_TRAITS_MEMBER(document_cookie)
- IPC_STRUCT_TRAITS_MEMBER(filename)
-IPC_STRUCT_TRAITS_END()
-
-#if !defined(EWK_BRINGUP)
-IPC_STRUCT_TRAITS_BEGIN(_Ewk_Hit_Test::Hit_Test_Image_Buffer)
+IPC_STRUCT_TRAITS_BEGIN(Hit_Test_Params::Image_Data)
IPC_STRUCT_TRAITS_MEMBER(fileNameExtension)
+#if !defined(EWK_BRINGUP) // FIXME: m120 bringup
IPC_STRUCT_TRAITS_MEMBER(imageBitmap)
-IPC_STRUCT_TRAITS_END()
#endif
+IPC_STRUCT_TRAITS_END()
-IPC_STRUCT_TRAITS_BEGIN(_Ewk_Hit_Test)
+IPC_STRUCT_TRAITS_BEGIN(Hit_Test_Params)
IPC_STRUCT_TRAITS_MEMBER(context)
IPC_STRUCT_TRAITS_MEMBER(linkURI)
- IPC_STRUCT_TRAITS_MEMBER(linkLabel)
IPC_STRUCT_TRAITS_MEMBER(linkTitle)
+ IPC_STRUCT_TRAITS_MEMBER(linkLabel)
IPC_STRUCT_TRAITS_MEMBER(imageURI)
- IPC_STRUCT_TRAITS_MEMBER(mediaURI)
IPC_STRUCT_TRAITS_MEMBER(isEditable)
IPC_STRUCT_TRAITS_MEMBER(mode)
IPC_STRUCT_TRAITS_MEMBER(nodeData)
-// XXX: find a better way to prevent the crash when copying SkBitmap
-#if !defined(EWK_BRINGUP)
IPC_STRUCT_TRAITS_MEMBER(imageData)
-#endif
IPC_STRUCT_TRAITS_END()
-IPC_STRUCT_TRAITS_BEGIN(CacheParamsEfl)
- IPC_STRUCT_TRAITS_MEMBER(cache_total_capacity)
- IPC_STRUCT_TRAITS_MEMBER(cache_min_dead_capacity)
- IPC_STRUCT_TRAITS_MEMBER(cache_max_dead_capacity)
-IPC_STRUCT_TRAITS_END()
+IPC_ENUM_TRAITS(Ewk_CSP_Header_Type)
-IPC_STRUCT_TRAITS_BEGIN(SelectionStylePrams)
- IPC_STRUCT_TRAITS_MEMBER(underline_state)
- IPC_STRUCT_TRAITS_MEMBER(italic_state)
- IPC_STRUCT_TRAITS_MEMBER(bold_state)
- IPC_STRUCT_TRAITS_MEMBER(bg_color)
- IPC_STRUCT_TRAITS_MEMBER(color)
- IPC_STRUCT_TRAITS_MEMBER(font_size)
- IPC_STRUCT_TRAITS_MEMBER(order_list_state)
- IPC_STRUCT_TRAITS_MEMBER(un_order_list_state)
- IPC_STRUCT_TRAITS_MEMBER(text_align_center_state)
- IPC_STRUCT_TRAITS_MEMBER(text_align_left_state)
- IPC_STRUCT_TRAITS_MEMBER(text_align_right_state)
- IPC_STRUCT_TRAITS_MEMBER(text_align_full_state)
- IPC_STRUCT_TRAITS_MEMBER(has_composition)
-IPC_STRUCT_TRAITS_END()
+IPC_ENUM_TRAITS(Ewk_Hit_Test_Mode)
-IPC_STRUCT_TRAITS_BEGIN(SelectionColor)
- IPC_STRUCT_TRAITS_MEMBER(r)
- IPC_STRUCT_TRAITS_MEMBER(g)
- IPC_STRUCT_TRAITS_MEMBER(b)
- IPC_STRUCT_TRAITS_MEMBER(a)
+IPC_STRUCT_TRAITS_BEGIN(DidPrintPagesParams)
+ IPC_STRUCT_TRAITS_MEMBER(metafile_data_handle)
+ IPC_STRUCT_TRAITS_MEMBER(data_size)
+ IPC_STRUCT_TRAITS_MEMBER(document_cookie)
+ IPC_STRUCT_TRAITS_MEMBER(filename)
IPC_STRUCT_TRAITS_END()
IPC_ENUM_TRAITS(blink::WebNavigationPolicy)
IPC_ENUM_TRAITS(blink::WebNavigationType)
IPC_STRUCT_TRAITS_BEGIN(NavigationPolicyParams)
- IPC_STRUCT_TRAITS_MEMBER(render_view_id)
+ IPC_STRUCT_TRAITS_MEMBER(render_frame_id)
IPC_STRUCT_TRAITS_MEMBER(cookie)
IPC_STRUCT_TRAITS_MEMBER(url)
IPC_STRUCT_TRAITS_MEMBER(httpMethod)
+#if !defined(EWK_BRINGUP) // FIXME: m120 bringup
IPC_STRUCT_TRAITS_MEMBER(referrer)
+#endif
IPC_STRUCT_TRAITS_MEMBER(policy)
IPC_STRUCT_TRAITS_MEMBER(type)
IPC_STRUCT_TRAITS_MEMBER(should_replace_current_entry)
IPC_STRUCT_TRAITS_MEMBER(is_main_frame)
IPC_STRUCT_TRAITS_MEMBER(is_redirect)
IPC_STRUCT_TRAITS_END()
-
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
IPC_ENUM_TRAITS(blink::WebViewMode)
-
-
-IPC_MESSAGE_CONTROL4(WrtMsg_SetWidgetInfo,
- int, // result: widgetHandle
- double, // result: scale
- std::string, // result: theme
- std::string) // result: encodedBundle
+#endif
IPC_MESSAGE_CONTROL2(WrtMsg_ParseUrl,
int, // result: request_id
GURL) // result: url
IPC_MESSAGE_CONTROL1(WrtMsg_SendWrtMessage,
- Ewk_Wrt_Message_Data /* data */);
+ Ewk_Wrt_Message_Data /* data */)
IPC_SYNC_MESSAGE_ROUTED1_1(EwkHostMsg_WrtSyncMessage,
Ewk_Wrt_Message_Data /* data */,
- std::string /*result*/);
+ std::string /*result*/)
IPC_MESSAGE_ROUTED1(EwkHostMsg_WrtMessage,
- Ewk_Wrt_Message_Data /* data */);
+ Ewk_Wrt_Message_Data /* data */)
-IPC_MESSAGE_CONTROL3(EwkViewHostMsg_HitTestReply,
+IPC_MESSAGE_CONTROL2(EwkViewHostMsg_HitTestReply,
int, /* render_view_id */
- _Ewk_Hit_Test, /* Ewk Hit test data without node map */
- NodeAttributesMap /* node attributes */)
+ Hit_Test_Params);
-IPC_MESSAGE_CONTROL4(EwkViewHostMsg_HitTestAsyncReply,
+IPC_MESSAGE_CONTROL3(EwkViewHostMsg_HitTestAsyncReply,
int, /* render_view_id */
- _Ewk_Hit_Test, /* Ewk Hit test data without node map */
- NodeAttributesMap, /* node attributes */
+ Hit_Test_Params,
int64_t /* request id */)
-IPC_MESSAGE_ROUTED1(EwkViewMsg_DidFailLoadWithError,
- tizen_webview::Error /* error */)
-
-IPC_MESSAGE_ROUTED2(EwkViewMsg_SetCSP,
- std::string, /* policy */
- Ewk_CSP_Header_Type /* header type */)
-
-IPC_SYNC_MESSAGE_ROUTED0_2(EwkHostMsg_GetContentSecurityPolicy,
- std::string, /* policy */
- Ewk_CSP_Header_Type /* header type */)
-
-IPC_MESSAGE_ROUTED3(EwkViewMsg_Scale,
- double, /* scale factor */
- int, /* center x */
- int /* center y */)
+IPC_MESSAGE_ROUTED0(EwkHostMsg_DidCreateDocumentElement)
IPC_MESSAGE_ROUTED1(EwkHostMsg_DidPrintPagesToPdf,
DidPrintPagesParams /* pdf document parameters */)
IPC_MESSAGE_CONTROL0(EflViewMsg_ClearCache)
-IPC_MESSAGE_CONTROL1(EflViewMsg_SetCache,
- CacheParamsEfl)
-
-// Tells the renderer to dump as much memory as it can, perhaps because we
-// have memory pressure or the renderer is (or will be) paged out. This
-// should only result in purging objects we can recalculate, e.g. caches or
-// JS garbage, not in purging irreplaceable objects.
-IPC_MESSAGE_CONTROL0(EwkViewMsg_PurgeMemory)
-
+IPC_MESSAGE_CONTROL1(EflViewMsg_SetCache, int64_t /* cache_total_capacity */)
IPC_MESSAGE_ROUTED3(EwkViewMsg_PrintToPdf,
int, /* width */
int, /* height */
IPC_MESSAGE_ROUTED3(EwkViewMsg_DoHitTest,
int, /* horizontal position */
int, /* vertical position */
- tizen_webview::Hit_Test_Mode /* mode */)
+ Ewk_Hit_Test_Mode /* mode */)
IPC_MESSAGE_ROUTED4(EwkViewMsg_DoHitTestAsync,
int, /* horizontal position */
int, /* vertical position */
- tizen_webview::Hit_Test_Mode, /* mode */
+ Ewk_Hit_Test_Mode, /* mode */
int64_t /* request id */)
// Tells the renderer to clear the cache.
IPC_MESSAGE_ROUTED0(EwkViewMsg_UseSettingsFont)
IPC_MESSAGE_ROUTED0(EwkViewMsg_SetBrowserFont)
-IPC_MESSAGE_ROUTED0(EwkViewMsg_SuspendScheduledTask)
-IPC_MESSAGE_ROUTED0(EwkViewMsg_ResumeScheduledTasks)
-
-IPC_MESSAGE_ROUTED0(EwkViewMsg_GetSelectionStyle)
IPC_MESSAGE_ROUTED2(EwkViewMsg_SetScroll,
int, /* horizontal position */
int /* vertical position */)
-IPC_MESSAGE_ROUTED1(EwkViewMsg_PlainTextGet,
- int /* callback id */)
+IPC_MESSAGE_ROUTED1(EwkFrameMsg_GetPlainText, int /* callback id */)
+
+IPC_MESSAGE_ROUTED1(EwkSettingsMsg_UpdateWebKitPreferencesEfl, WebPreferencesEfl)
-IPC_MESSAGE_ROUTED1(EwkViewMsg_SelectionTextStyleState,
- SelectionStylePrams /* params */)
+IPC_MESSAGE_ROUTED2(EwkHostMsg_HandleTapGestureWithContext,
+ bool /* is_link */,
+ bool /* is_editable_content */)
-IPC_MESSAGE_ROUTED1(EflViewMsg_UpdateSettings, tizen_webview::Settings)
+IPC_MESSAGE_ROUTED0(EwkHostMsg_PlayLinkEffect)
+
+IPC_MESSAGE_ROUTED4(EwkHostMsg_AddEdgeEffectForUIF,
+ bool /* top */,
+ bool /* bottom */,
+ bool /* right */,
+ bool /* left */)
IPC_MESSAGE_ROUTED2(EwkHostMsg_PlainTextGetContents,
std::string, /* contentText */
std::string, /* Mhtml text */
int /* callback id */)
-IPC_MESSAGE_ROUTED1(EwkHostMsg_DidChangePageScaleFactor,
- double /* page scale factor */)
-
-IPC_MESSAGE_ROUTED2(EwkHostMsg_DidChangePageScaleRange,
- double, /* minimum page scale factor */
- double /* maximum page scale factor */)
-
IPC_MESSAGE_ROUTED1(EwkViewMsg_SetDrawsTransparentBackground,
bool /* enabled */)
bool, /* capable */
int /* calback id */)
+#if defined(TIZEN_VIDEO_HOLE)
+IPC_MESSAGE_ROUTED1(EwkViewMsg_SetVideoHole, bool /* Enable */)
+#endif
+
+#if BUILDFLAG(IS_TIZEN_TV)
+IPC_MESSAGE_ROUTED0(EwkHostMsg_RunArrowScroll);
+
+IPC_ENUM_TRAITS(cc::ScrollbarOrientation)
+IPC_MESSAGE_ROUTED2(EwkHostMsg_ScrollbarThumbPartFocusChanged,
+ cc::ScrollbarOrientation, /* orientation */
+ bool /* focused */)
+#endif
+
IPC_SYNC_MESSAGE_CONTROL1_1(EwkHostMsg_DecideNavigationPolicy,
NavigationPolicyParams,
bool /*handled*/)
+// FIXME: error: ‘WebNavigationTypeOther’ is not a member of ‘blink’
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
IPC_MESSAGE_ROUTED1(ViewMsg_SetViewMode,
blink::WebViewMode /* view_mode */)
+#endif
+
+IPC_MESSAGE_ROUTED1(ViewMsg_SetTextZoomFactor,
+ float /*font zoom factor*/)
+
+IPC_MESSAGE_ROUTED1(EwkFrameMsg_LoadNotFoundErrorPage,
+ std::string /* error url */)
+
+IPC_MESSAGE_ROUTED1(EwkFrameMsg_MoveToNextOrPreviousSelectElement,
+ bool /* next */)
+IPC_MESSAGE_ROUTED0(EwkFrameMsg_RequestSelectCollectionInformation)
+IPC_MESSAGE_ROUTED4(EwkHostMsg_RequestSelectCollectionInformationUpdateACK,
+ int /* formElementCount */,
+ int /* currentNodeIndex */,
+ bool /* prevState */,
+ bool /* nextState */)
+
+IPC_MESSAGE_CONTROL1(EwkProcessMsg_UpdateTizenExtensible,
+ ExtensibleApiMap /* Extensible APIs */)
+IPC_MESSAGE_CONTROL2(EwkProcessMsg_SetExtensibleAPI,
+ std::string /* api name */,
+ bool /* enable */)
+
+IPC_MESSAGE_ROUTED0(EwkHostMsg_DidNotAllowScript)
+
+#if BUILDFLAG(IS_TIZEN_TV)
+IPC_MESSAGE_CONTROL1(HbbtvMsg_RegisterJSPluginMimeTypes,
+ std::string /* mime types */)
+
+IPC_MESSAGE_CONTROL1(HbbtvMsg_RegisterURLSchemesAsCORSEnabled,
+ std::string /* scheme */)
+
+IPC_MESSAGE_CONTROL1(EwkViewMsg_SetTimeOffset, double /* time offset */)
+// Sent when the renderer was prevented from displaying insecure content in
+// a secure page by a security policy. The page may appear incomplete.
+IPC_MESSAGE_ROUTED0(EwkHostMsg_DidBlockInsecureContent)
+
+// Sent in response to FrameHostMsg_DidBlockDisplayingInsecureContent.
+IPC_MESSAGE_ROUTED1(EwkMsg_SetAllowInsecureContent, bool /* allowed */)
+#endif