2 * Copyright (C) 2009-2010 ProFUSION embedded systems
3 * Copyright (C) 2009-2016 Samsung Electronics. All rights reserved.
4 * Copyright (C) 2012 Intel Corporation
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this library; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #include "ewk_view_product.h"
25 #include "authentication_challenge_popup.h"
26 #include "content/public/browser/navigation_controller.h"
27 #include "cookie_manager.h"
28 #include "eweb_view.h"
29 #include "geolocation_permission_popup.h"
30 #include "notification_permission_popup.h"
31 #include "private/ewk_back_forward_list_private.h"
32 #include "private/ewk_context_private.h"
33 #include "private/ewk_frame_private.h"
34 #include "private/ewk_history_private.h"
35 #include "private/ewk_hit_test_private.h"
36 #include "private/ewk_notification_private.h"
37 #include "private/ewk_private.h"
38 #include "private/ewk_quota_permission_request_private.h"
39 #include "private/ewk_view_private.h"
40 #include "public/ewk_back_forward_list.h"
41 #include "public/ewk_context.h"
42 #include "public/ewk_enums_internal.h"
43 #include "public/ewk_settings.h"
44 #include "third_party/blink/public/common/page/page_zoom.h"
45 #include "third_party/blink/public/common/web_preferences/web_preferences.h"
46 #include "ui/events/gesture_detection/gesture_configuration.h"
48 #include "usermedia_permission_popup.h"
49 #include "web_contents_delegate_efl.h"
51 static Eina_Bool _ewk_view_default_user_media_permission(
52 Evas_Object*, Ewk_User_Media_Permission_Request*, void*);
54 static Eina_Bool _ewk_view_default_geolocation_permission(
55 Evas_Object*, Ewk_Geolocation_Permission_Request*, void*);
57 static Eina_Bool _ewk_view_default_notification_permission(
58 Evas_Object*, Ewk_Notification_Permission_Request*, void*);
60 static void _ewk_view_default_authentication(
61 Evas_Object*, Ewk_Auth_Challenge*, void*);
63 Eina_Bool ewk_view_smart_class_set(Ewk_View_Smart_Class* api)
65 EINA_SAFETY_ON_NULL_RETURN_VAL(api, false);
66 return InitSmartClassInterface(*api);
69 // TODO: Evas_Object *ewk_view_smart_add(Evas *e, Evas_Smart *smart, Ewk_Context *context, Ewk_Page_Group *pageGroup)
71 Evas_Object* ewk_view_add_with_session_data(Evas* canvas, const char* data, unsigned length)
73 EINA_SAFETY_ON_NULL_RETURN_VAL(canvas, NULL);
75 Evas_Object* ret = ewk_view_add(canvas);
77 EWebView *webView = GetWebViewFromEvasObject(ret);
79 if (!webView || !data || !length)
82 if (webView->RestoreFromSessionData(data, length))
90 Evas_Object* ewk_view_add_with_context(Evas* e, Ewk_Context* context)
92 EINA_SAFETY_ON_NULL_RETURN_VAL(context, 0);
93 Evas_Object* ewk_view = CreateWebViewAsEvasObject(context, e);
96 ewk_view_user_media_permission_callback_set(ewk_view,
97 _ewk_view_default_user_media_permission, 0);
98 ewk_view_geolocation_permission_callback_set(ewk_view,
99 _ewk_view_default_geolocation_permission, 0);
100 ewk_view_notification_permission_callback_set(ewk_view,
101 _ewk_view_default_notification_permission, 0);
102 ewk_view_authentication_callback_set(ewk_view,
103 _ewk_view_default_authentication, nullptr);
109 Evas_Object* ewk_view_add(Evas* e)
111 EINA_SAFETY_ON_NULL_RETURN_VAL(e, NULL);
112 // TODO: shouldn't this function create new EWebContext for each new EWebView?
113 // when using default context like that it makes unclear who should release
114 // default web context. It won't be released by destroyed eweb_view because
115 // ewk_context_default_get does AddRef
116 Ewk_Context* context = ewk_context_default_get();
117 return ewk_view_add_with_context(e, context);
120 Evas_Object* ewk_view_add_in_incognito_mode(Evas* e)
122 Ewk_Context* context = Ewk_Context::Create(true);
123 EINA_SAFETY_ON_NULL_RETURN_VAL(context, NULL);
124 return ewk_view_add_with_context(e, context);
127 Ewk_Context *ewk_view_context_get(const Evas_Object *view)
129 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, 0);
130 return static_cast<Ewk_Context*>(impl->context());
133 Eina_Bool ewk_view_url_set(Evas_Object* view, const char* url_string)
135 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
136 EINA_SAFETY_ON_NULL_RETURN_VAL(url_string, false);
137 GURL url(url_string);
142 const char* ewk_view_url_get(const Evas_Object* view)
144 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, 0);
145 return impl->GetURL().possibly_invalid_spec().c_str();
148 const char* ewk_view_original_url_get(const Evas_Object* view)
150 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, 0);
151 return impl->GetOriginalURL().possibly_invalid_spec().c_str();
154 Eina_Bool ewk_view_reload(Evas_Object *view)
156 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
162 Eina_Bool ewk_view_reload_bypass_cache(Evas_Object *view)
164 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
165 impl->ReloadBypassingCache();
169 Eina_Bool ewk_view_stop(Evas_Object* view)
171 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
177 Ewk_Settings *ewk_view_settings_get(const Evas_Object *ewkView)
179 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl,0);
180 return impl->GetSettings();
183 const char* ewk_view_title_get(const Evas_Object* view)
185 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, 0);
186 return impl->GetTitle();
189 double ewk_view_load_progress_get(const Evas_Object* view)
191 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, -1);
192 return impl->GetProgressValue();
195 Eina_Bool ewk_view_scale_set(Evas_Object* view, double scale_factor, int x, int y)
197 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
198 impl->SetScale(scale_factor);
199 impl->SetScroll(x, y);
203 double ewk_view_scale_get(const Evas_Object *view)
205 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, -1);
206 return impl->GetScale();
209 Eina_Bool ewk_view_back(Evas_Object *view)
211 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
212 return impl->GoBack();
215 Eina_Bool ewk_view_forward(Evas_Object *view)
217 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
218 return impl->GoForward();
221 Eina_Bool ewk_view_back_possible(Evas_Object *view)
223 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
224 return impl->CanGoBack();
227 Eina_Bool ewk_view_forward_possible(Evas_Object *view)
229 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
230 return impl->CanGoForward();
233 Eina_Bool ewk_view_web_login_request(Evas_Object* ewkView)
235 LOG_EWK_API_MOCKUP();
239 Eina_Bool ewk_view_html_string_load(Evas_Object* view, const char* html, const char* base_uri, const char* unreachable_uri)
241 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
242 EINA_SAFETY_ON_NULL_RETURN_VAL(html, EINA_FALSE);
243 impl->LoadHTMLString(html, base_uri, unreachable_uri);
247 Eina_Bool ewk_view_mouse_events_enabled_set(Evas_Object *view, Eina_Bool enabled)
249 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
251 impl->SetMouseEventsEnabled(!!enabled);
256 Eina_Bool ewk_view_mouse_events_enabled_get(const Evas_Object *view)
258 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
260 return impl->MouseEventsEnabled();
263 Eina_Bool ewk_view_color_picker_color_set(Evas_Object* ewkView, int r, int g, int b, int a)
265 LOG_EWK_API_MOCKUP();
269 double ewk_view_text_zoom_get(const Evas_Object* view)
271 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, -1.0);
272 return impl->GetTextZoomFactor();
275 Eina_Bool ewk_view_text_zoom_set(Evas_Object* view, double text_zoom_level)
277 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
278 if (ewk_settings_text_zoom_enabled_get(ewk_view_settings_get(view))) {
279 impl->SetTextZoomFactor(text_zoom_level);
285 void ewk_view_not_found_error_page_load(Evas_Object* ewkView, const char* errorUrl)
287 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl);
288 impl->LoadNotFoundErrorPage(std::string(errorUrl));
291 void ewk_view_scale_range_get(Evas_Object* view, double* min_scale, double* max_scale)
293 if (!min_scale && !max_scale)
296 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl);
297 impl->GetPageScaleRange(min_scale, max_scale);
300 void ewk_view_suspend(Evas_Object* ewkView)
302 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl);
306 void ewk_view_resume(Evas_Object* ewkView)
308 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl);
312 Eina_Bool ewk_view_url_request_set(Evas_Object* ewkView, const char* url, Ewk_Http_Method method, Eina_Hash* headers, const char* body)
314 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, EINA_FALSE);
315 EINA_SAFETY_ON_NULL_RETURN_VAL(url, EINA_FALSE);
316 content::NavigationController::LoadURLType loadtype;
318 case EWK_HTTP_METHOD_GET:
319 loadtype = content::NavigationController::LOAD_TYPE_DEFAULT;
321 case EWK_HTTP_METHOD_POST:
322 loadtype = content::NavigationController::LOAD_TYPE_HTTP_POST;
325 LOG(ERROR) << "Not supported HTTP Method.";
329 impl->UrlRequestSet(url, loadtype, headers, body);
333 Eina_Bool ewk_view_plain_text_set(Evas_Object* view, const char* plain_text)
335 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
336 EINA_SAFETY_ON_NULL_RETURN_VAL(plain_text, EINA_FALSE);
337 impl->LoadPlainTextString(plain_text);
341 Eina_Bool ewk_view_contents_set(Evas_Object* view, const char* contents, size_t contents_size, char* mime_type, char* encoding, char* base_uri)
343 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
344 EINA_SAFETY_ON_NULL_RETURN_VAL(contents, EINA_FALSE);
345 impl->LoadData(contents, contents_size, mime_type, encoding, base_uri);
349 Eina_Bool ewk_view_html_contents_set(Evas_Object* view, const char* html, const char* base_uri)
351 return ewk_view_html_string_load(view, html, base_uri, NULL);
354 Eina_Bool ewk_view_page_visibility_state_set(Evas_Object* ewkView, Ewk_Page_Visibility_State page_visibility_state, Eina_Bool initial_state)
356 // TODO: Should we send initial_state to |Page::setVisibilityState()|?.
357 // isInitialState parameter seems be true only in the constructor of WebViewImpl.
358 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, false);
360 // TODO: We should able to set 'prerender' or 'unloaded' as visibility state.
361 // http://www.w3.org/TR/page-visibility/#dom-document-visibilitystate
362 switch (page_visibility_state) {
363 case EWK_PAGE_VISIBILITY_STATE_VISIBLE:
366 case EWK_PAGE_VISIBILITY_STATE_HIDDEN:
375 Eina_Bool ewk_view_user_agent_set(Evas_Object* ewkView, const char* user_agent)
377 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, false);
379 return impl->SetUserAgent(user_agent);
382 const char* ewk_view_user_agent_get(const Evas_Object* ewkView)
384 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, 0);
385 return impl->GetUserAgent();
388 Eina_Bool ewk_view_application_name_for_user_agent_set(Evas_Object* ewkView, const char* application_name)
390 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, false);
391 return impl->SetUserAgentAppName(application_name);
394 const char* ewk_view_application_name_for_user_agent_get(const Evas_Object* ewkView)
396 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, 0);
397 return eina_stringshare_add(impl->GetUserAgentAppName());
400 Eina_Bool ewk_view_custom_header_add(const Evas_Object* ewkView, const char* name, const char* value)
402 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, EINA_FALSE);
403 EINA_SAFETY_ON_NULL_RETURN_VAL(name, EINA_FALSE);
404 EINA_SAFETY_ON_NULL_RETURN_VAL(value, EINA_FALSE);
405 EINA_SAFETY_ON_NULL_RETURN_VAL(impl->context(),EINA_FALSE);
406 return impl->context()->HTTPCustomHeaderAdd(name, value);
409 Eina_Bool ewk_view_custom_header_remove(const Evas_Object* ewkView, const char* name)
411 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, EINA_FALSE);
412 EINA_SAFETY_ON_NULL_RETURN_VAL(name, EINA_FALSE);
413 EINA_SAFETY_ON_NULL_RETURN_VAL(impl->context(),EINA_FALSE);
414 return impl->context()->HTTPCustomHeaderRemove(name);
418 Eina_Bool ewk_view_custom_header_clear(const Evas_Object* ewkView)
420 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, EINA_FALSE);
421 EINA_SAFETY_ON_NULL_RETURN_VAL(impl->context(),EINA_FALSE);
422 impl->context()->HTTPCustomHeaderClear();
427 Eina_Bool ewk_view_visibility_set(Evas_Object* view, Eina_Bool enable)
429 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
439 Evas_Object* ewk_view_screenshot_contents_get(const Evas_Object* view, Eina_Rectangle view_area, float scale_factor, Evas* canvas)
441 EINA_SAFETY_ON_NULL_RETURN_VAL(canvas, NULL);
442 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, NULL);
443 // Zoom level equality (<=0.001) is sufficient compared to high precision std::numeric_value::epsilon.
444 if (!blink::PageZoomValuesEqual(scale_factor, 1.0)) {
445 LOG(ERROR) << "We only support scale factor of 1.0."
446 << "Scaling option will be supported after hardware acceleration is enabled.";
449 return impl->GetSnapshot(view_area);
452 Eina_Bool ewk_view_screenshot_contents_get_async(const Evas_Object* view, Eina_Rectangle view_area,
453 float scale_factor, Evas* canvas, Ewk_Web_App_Screenshot_Captured_Callback callback, void* user_data)
455 EINA_SAFETY_ON_NULL_RETURN_VAL(callback, EINA_FALSE);
456 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
457 // Zoom level equality (<=0.001) is sufficient compared to high precision std::numeric_value::epsilon.
458 if (!blink::PageZoomValuesEqual(scale_factor, 1.0)) {
459 LOG(ERROR) << "We only support scale factor of 1.0."
460 << "Scaling option will be supported after hardware acceleration is enabled.";
463 return impl->GetSnapshotAsync(view_area, callback, user_data) ? EINA_TRUE : EINA_FALSE;
466 unsigned int ewk_view_inspector_server_start(Evas_Object* ewkView, unsigned int port)
468 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, false);
469 return impl->StartInspectorServer(port);
472 Eina_Bool ewk_view_inspector_server_stop(Evas_Object* ewkView)
474 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, false);
475 return impl->StopInspectorServer();
478 Eina_Bool ewk_view_cache_image_get(const Evas_Object* o, const char* image_url, Evas* canvas, Ewk_View_Cache_Image_Get_Callback callback, void* user_data)
480 LOG_EWK_API_MOCKUP();
484 void ewk_view_scroll_by(Evas_Object* ewkView, int deltaX, int deltaY)
488 if (EINA_TRUE == ewk_view_scroll_pos_get(ewkView, &x, &y)) {
489 ewk_view_scroll_set(ewkView, x + deltaX, y + deltaY);
493 Eina_Bool ewk_view_scroll_pos_get(Evas_Object* ewkView, int* x, int* y)
495 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, false);
496 EINA_SAFETY_ON_NULL_RETURN_VAL(x, EINA_FALSE);
497 EINA_SAFETY_ON_NULL_RETURN_VAL(y, EINA_FALSE);
498 return impl->GetScrollPosition(x, y);
501 Eina_Bool ewk_view_scroll_set(Evas_Object* view, int x, int y)
503 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
504 impl->SetScroll(x, y);
509 Eina_Bool ewk_view_scroll_size_get(const Evas_Object* view, int* width, int* height)
515 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
516 impl->GetScrollSize(width,height);
520 void ewk_view_password_confirm_popup_callback_set(Evas_Object* view, Ewk_View_Password_Confirm_Popup_Callback callback, void* user_data)
522 LOG_EWK_API_MOCKUP();
525 void ewk_view_password_confirm_popup_reply(Evas_Object* ewkView, Ewk_Password_Popup_Option result)
527 LOG_EWK_API_MOCKUP();
530 void ewk_view_javascript_alert_callback_set(Evas_Object* view, Ewk_View_JavaScript_Alert_Callback callback, void* user_data)
532 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl);
534 impl->SetJavaScriptAlertCallback(callback, user_data);
537 void ewk_view_javascript_alert_reply(Evas_Object* view)
539 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl);
540 impl->JavaScriptAlertReply();
543 void ewk_view_javascript_confirm_callback_set(Evas_Object* view, Ewk_View_JavaScript_Confirm_Callback callback, void* user_data)
545 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl);
547 impl->SetJavaScriptConfirmCallback(callback, user_data);
550 void ewk_view_javascript_confirm_reply(Evas_Object* view, Eina_Bool result)
552 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl);
553 impl->JavaScriptConfirmReply(result);
556 void ewk_view_javascript_prompt_callback_set(Evas_Object* view, Ewk_View_JavaScript_Prompt_Callback callback, void* user_data)
558 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl);
560 impl->SetJavaScriptPromptCallback(callback, user_data);
563 void ewk_view_javascript_prompt_reply(Evas_Object* view, const char* result)
565 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl);
566 impl->JavaScriptPromptReply(result);
569 void ewk_view_before_unload_confirm_panel_callback_set(Evas_Object* ewkView, Ewk_View_Before_Unload_Confirm_Panel_Callback callback, void* userData)
571 LOG_EWK_API_MOCKUP();
574 void ewk_view_before_unload_confirm_panel_reply(Evas_Object* ewkView, Eina_Bool result)
576 LOG_EWK_API_MOCKUP();
579 Eina_Bool ewk_view_web_application_capable_get(Evas_Object* ewkView, Ewk_Web_App_Capable_Get_Callback callback, void* userData)
581 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, EINA_FALSE);
582 EINA_SAFETY_ON_NULL_RETURN_VAL(callback, EINA_FALSE);
583 return impl->WebAppCapableGet(callback, userData) ? EINA_TRUE : EINA_FALSE;
586 Eina_Bool ewk_view_web_application_icon_url_get(Evas_Object* ewkView, Ewk_Web_App_Icon_URL_Get_Callback callback, void* userData)
588 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, EINA_FALSE);
589 EINA_SAFETY_ON_NULL_RETURN_VAL(callback, EINA_FALSE);
590 return impl->WebAppIconUrlGet(callback, userData) ? EINA_TRUE : EINA_FALSE;
593 Eina_Bool ewk_view_web_application_icon_urls_get(Evas_Object* ewkView, Ewk_Web_App_Icon_URLs_Get_Callback callback, void* userData)
595 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, EINA_FALSE);
596 EINA_SAFETY_ON_NULL_RETURN_VAL(callback, EINA_FALSE);
597 return impl->WebAppIconUrlsGet(callback, userData) ? EINA_TRUE : EINA_FALSE;
600 Eina_Bool ewk_view_command_execute(Evas_Object* view, const char* command, const char* value)
602 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
603 EINA_SAFETY_ON_NULL_RETURN_VAL(command, false);
604 impl->ExecuteEditCommand(command, value);
608 Eina_Bool ewk_view_contents_size_get(const Evas_Object* view, Evas_Coord* width, Evas_Coord* height)
615 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
616 Eina_Rectangle contents_size = impl->GetContentsSize();
619 *width = contents_size.w;
621 *height = contents_size.h;
626 Eina_Bool ewk_view_contents_pdf_get(Evas_Object* view, int width, int height, const char* fileName)
628 EINA_SAFETY_ON_NULL_RETURN_VAL(fileName, EINA_FALSE);
629 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
630 return impl->SaveAsPdf(width, height, fileName);
633 Eina_Bool ewk_view_script_execute(Evas_Object* ewkView, const char* script, Ewk_View_Script_Execute_Callback callback, void* user_data)
635 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, false);
636 EINA_SAFETY_ON_NULL_RETURN_VAL(script, false);
637 // callback can be null, so do not test it for null
638 if (0 != strcmp(script, "")) //check for empty string
639 return impl->ExecuteJavaScript(script, callback, user_data);
644 Eina_Bool ewk_view_plain_text_get(Evas_Object* view, Ewk_View_Plain_Text_Get_Callback callback, void* user_data)
646 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
647 EINA_SAFETY_ON_NULL_RETURN_VAL(callback, EINA_FALSE);
648 return (impl->PlainTextGet(callback, user_data));
651 Eina_Bool ewk_view_mhtml_data_get(Evas_Object *view, Ewk_View_MHTML_Data_Get_Callback callback, void *user_data)
653 EINA_SAFETY_ON_NULL_RETURN_VAL(callback, EINA_FALSE);
654 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
655 return impl->GetMHTMLData(callback, user_data);
658 Ewk_Hit_Test* ewk_view_hit_test_new(Evas_Object* ewkView, int x, int y, int hit_test_mode)
660 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, 0);
661 return impl->RequestHitTestDataAt(x, y,
662 static_cast<Ewk_Hit_Test_Mode>(hit_test_mode));
665 Eina_Bool ewk_view_hit_test_request(Evas_Object* o, int x, int y, int hit_test_mode, Ewk_View_Hit_Test_Request_Callback callback, void* user_data)
667 EWK_VIEW_IMPL_GET_OR_RETURN(o, impl, EINA_FALSE);
668 return impl->AsyncRequestHitTestDataAt(x, y, static_cast<Ewk_Hit_Test_Mode>(hit_test_mode), callback, user_data);
671 Ewk_History* ewk_view_history_get(Evas_Object* ewkView)
673 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, NULL);
674 return impl->GetBackForwardHistory();
677 Eina_Bool ewk_view_notification_closed(Evas_Object* ewkView, Eina_List* notification_list)
682 Eina_Bool ewk_view_popup_menu_select(Evas_Object* ewkView, unsigned int selectedIndex)
684 LOG_EWK_API_MOCKUP();
688 Eina_Bool ewk_view_popup_menu_multiple_select(Evas_Object* ewkView, Eina_Inarray* changeList)
690 LOG_EWK_API_MOCKUP();
694 void ewk_view_orientation_send(Evas_Object* ewkView, int orientation)
696 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl);
697 impl->SetOrientation(orientation);
700 void ewk_view_encoding_custom_set(Evas_Object* ewkView, const char* encoding)
702 // Chromium does not support this feature hence the comment
703 LOG_EWK_API_MOCKUP("Not Supported by chromium");
706 Eina_Bool ewk_view_text_selection_range_get(const Evas_Object* view, Eina_Rectangle* left_rect, Eina_Rectangle* right_rect)
708 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
709 if (left_rect && right_rect && impl->GetSelectionRange(left_rect, right_rect)) {
711 evas_object_geometry_get(view, &x, &y, 0, 0);
721 Eina_Bool ewk_view_text_selection_clear(Evas_Object *view)
723 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
724 return impl->ClearSelection();
727 const char* ewk_view_text_selection_text_get(Evas_Object* view)
729 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, NULL);
730 return impl->CacheSelectedText();
733 void ewk_view_focused_input_element_value_set(Evas_Object* ewkView, const char* value)
735 LOG_EWK_API_MOCKUP();
738 const char* ewk_view_focused_input_element_value_get(Evas_Object* ewkView)
740 LOG_EWK_API_MOCKUP();
744 Eina_Bool ewk_view_vertical_panning_hold_get(Evas_Object* ewkView)
746 LOG_EWK_API_MOCKUP();
750 void ewk_view_vertical_panning_hold_set(Evas_Object* view, Eina_Bool hold)
752 LOG_EWK_API_MOCKUP();
753 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl);
754 // FIX ME: Currently the pan support is not present.
755 // In WK2 panning was implemented with evas directly, here its with chorme gesture reconignation
756 // So paning is not present yet
759 void ewk_view_orientation_lock_callback_set(Evas_Object* ewkView, Ewk_Orientation_Lock_Cb func, void* data)
761 LOG_EWK_API_MOCKUP("This API is deprecated, to use orientation lock/unlock "
762 "API please use functions lock_orientation/unlock_orientation provided "
763 "by Ewk_View_Smart_Class.");
767 void ewk_view_back_forward_list_clear(const Evas_Object *view)
769 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl);
770 impl->BackForwardListClear();
773 Eina_Bool ewk_view_feed_touch_event(Evas_Object *view, Ewk_Touch_Event_Type type, const Eina_List *points, const Evas_Modifier *modifiers)
775 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
777 impl->HandleTouchEvents(type, points, modifiers);
782 Eina_Bool ewk_view_touch_events_enabled_set(Evas_Object *view, Eina_Bool enabled)
784 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
786 impl->SetTouchEventsEnabled(!!enabled);
791 Eina_Bool ewk_view_touch_events_enabled_get(const Evas_Object *view)
793 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
795 return impl->TouchEventsEnabled();
798 Ewk_Frame_Ref ewk_view_main_frame_get(Evas_Object* o)
800 EWK_VIEW_IMPL_GET_OR_RETURN(o, impl, NULL);
801 return static_cast<Ewk_Frame_Ref>(impl->GetMainFrame());
804 void ewk_view_content_security_policy_set(Evas_Object* ewkView, const char* policy, Ewk_CSP_Header_Type type)
806 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl);
807 EINA_SAFETY_ON_NULL_RETURN(policy);
808 impl->SetContentSecurityPolicy(policy, type);
811 void ewk_view_application_cache_permission_callback_set(Evas_Object* ewkView, Ewk_View_Applicacion_Cache_Permission_Callback callback, void* userData)
813 // Chromium does not support this feature hence the comment
814 LOG_EWK_API_MOCKUP("Not Supported by chromium");
817 void ewk_view_application_cache_permission_reply(Evas_Object* ewkView, Eina_Bool allow)
819 // Chromium does not support this feature hence the comment
820 LOG_EWK_API_MOCKUP("Not Supported by chromium");
823 void ewk_view_exceeded_indexed_database_quota_callback_set(Evas_Object* ewkView, Ewk_View_Exceeded_Indexed_Database_Quota_Callback callback, void* userData)
825 // Chromium does not support quota for Indexed DB only.
826 // IndexedDB uses temporary storage that is shared
827 // between other features.
828 LOG_EWK_API_MOCKUP("Not Supported by chromium");
831 void ewk_view_exceeded_indexed_database_quota_reply(Evas_Object* ewkView, Eina_Bool allow)
833 // Chromium does not support quota for Indexed DB only.
834 // IndexedDB uses temporary storage that is shared
835 // between other features.
836 LOG_EWK_API_MOCKUP("Not Supported by chromium");
839 Eina_Bool ewk_view_text_find(Evas_Object *view, const char *text, Ewk_Find_Options options, unsigned int max_match_count)
841 // FIXME: We need to implement next options in Ewk_Find_Options struct. (refer to ewk_view.h)
842 // - EWK_FIND_OPTIONS_AT_WORD_STARTS
843 // - EWK_FIND_OPTIONS_TREAT_MEDIAL_CAPITAL_AS_WORD_START
844 // - EWK_FIND_OPTIONS_WRAP_AROUND
845 // - EWK_FIND_OPTIONS_SHOW_OVERLAY
846 // - EWK_FIND_OPTIONS_SHOW_FIND_INDICATOR
847 // - EWK_FIND_OPTIONS_SHOW_HIGHLIGHT (Currently there is no way to control this option. so it is always set)
849 // FIXME: Updating of max_match_count is not implemented.
851 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
852 EINA_SAFETY_ON_NULL_RETURN_VAL(text, EINA_FALSE);
853 impl->Find(text, options);
857 Eina_Bool ewk_view_text_find_highlight_clear(Evas_Object *view)
859 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
864 void ewk_view_exceeded_database_quota_callback_set(Evas_Object* ewkView, Ewk_View_Exceeded_Database_Quota_Callback callback, void* userData)
866 // According to chromium source code:
867 // src/third_party/WebKit/Source/modules/webdatabase/SQLTransactionClient.cpp line 67
868 // Chromium does not allow users to manually change the quota for an origin (for now, at least).
869 // This API is impossible to implement right now
870 LOG_EWK_API_MOCKUP("Not Supported by chromium");
873 void ewk_view_exceeded_database_quota_reply(Evas_Object* ewkView, Eina_Bool allow)
875 // According to chromium source code:
876 // src/third_party/WebKit/Source/modules/webdatabase/SQLTransactionClient.cpp line 67
877 // Chromium does not allow users to manually change the quota for an origin (for now, at least).
878 // This API is impossible to implement right now
879 LOG_EWK_API_MOCKUP("Not Supported by chromium");
882 void ewk_view_exceeded_local_file_system_quota_callback_set(Evas_Object* ewkView, Ewk_View_Exceeded_Indexed_Database_Quota_Callback callback, void* userData)
884 LOG_EWK_API_MOCKUP();
887 void ewk_view_exceeded_local_file_system_quota_reply(Evas_Object* ewkView, Eina_Bool allow)
889 LOG_EWK_API_MOCKUP();
892 void ewk_view_unfocus_allow_callback_set(Evas_Object* ewkView, Ewk_View_Unfocus_Allow_Callback callback, void* user_data)
894 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl);
895 impl->SetViewUnfocusAllowCallback(callback, user_data);
898 void ewk_view_geolocation_permission_callback_set(Evas_Object* ewk_view, Ewk_View_Geolocation_Permission_Callback callback, void* user_data)
900 EWK_VIEW_IMPL_GET_OR_RETURN(ewk_view, impl);
901 impl->SetViewGeolocationPermissionCallback(callback, user_data);
904 static Eina_Bool _ewk_view_default_geolocation_permission(
905 Evas_Object* ewk_view,
906 Ewk_Geolocation_Permission_Request* request,
909 EWK_VIEW_IMPL_GET_OR_RETURN(ewk_view, impl, EINA_FALSE);
911 std::string value = std::string(ewk_security_origin_host_get(
912 ewk_geolocation_permission_request_origin_get(request)));
913 std::string message = std::string(
914 "Web Page (%s) is requesting permission to access your location.");
915 std::string replace_str = std::string("(%s)");
917 size_t pos = message.find(replace_str.c_str());
918 if (pos != std::string::npos)
919 message.replace(pos, replace_str.length(), value.c_str());
921 // add for suspending
922 ewk_geolocation_permission_request_suspend(request);
924 GeolocationPermissionPopup* popup = new GeolocationPermissionPopup(request,
925 ewk_geolocation_permission_request_origin_get(request), message);
927 impl->GetPermissionPopupManager()->AddPermissionRequest(popup);
932 void ewk_view_user_media_permission_callback_set(Evas_Object* ewk_view,
933 Ewk_View_User_Media_Permission_Callback callback,
936 EWK_VIEW_IMPL_GET_OR_RETURN(ewk_view, impl);
937 impl->SetViewUserMediaPermissionCallback(callback, user_data);
940 static Eina_Bool _ewk_view_default_user_media_permission(
941 Evas_Object* ewk_view,
942 Ewk_User_Media_Permission_Request* user_media_permission_request,
945 EWK_VIEW_IMPL_GET_OR_RETURN(ewk_view, impl, EINA_FALSE);
947 std::string value = std::string(ewk_security_origin_host_get(
948 ewk_user_media_permission_request_origin_get(
949 user_media_permission_request)));
951 std::string message = std::string(dgettext(
953 "IDS_WEBVIEW_POP_P1SS_HP2SS_IS_REQUESTING_PERMISSION_TO_USE_YOUR_CAMERA"));
955 std::string replace_str = std::string("%1$s");
956 size_t pos = message.find(replace_str.c_str());
957 if (pos != std::string::npos)
958 message.replace(pos, replace_str.length(), value.c_str());
960 replace_str = std::string("(%2$s)");
961 pos = message.find(replace_str.c_str());
962 if (pos != std::string::npos)
963 message.replace(pos, replace_str.length(), "");
965 // add for suspending
966 ewk_user_media_permission_request_suspend(user_media_permission_request);
968 UserMediaPermissionPopup* popup = new UserMediaPermissionPopup(
969 user_media_permission_request,
970 ewk_user_media_permission_request_origin_get(
971 user_media_permission_request), message);
973 impl->GetPermissionPopupManager()->AddPermissionRequest(popup);
978 void ewk_view_use_settings_font(Evas_Object* ewkView)
980 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl);
981 impl->UseSettingsFont();
984 char* ewk_view_get_cookies_for_url(Evas_Object* view, const char* url)
986 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, 0);
987 EINA_SAFETY_ON_NULL_RETURN_VAL(url, 0);
988 EINA_SAFETY_ON_NULL_RETURN_VAL(impl->context(), 0);
989 std::string cookiesForURL =
990 impl->context()->cookieManager()->GetCookiesForURL(std::string(url));
991 if (cookiesForURL.empty())
993 return strndup(cookiesForURL.c_str(), cookiesForURL.length());
996 Eina_Bool ewk_view_fullscreen_exit(Evas_Object* view)
998 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
999 impl->ExitFullscreen();
1003 Eina_Bool ewk_view_draws_transparent_background_set(Evas_Object *view, Eina_Bool enabled)
1005 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
1006 impl->SetDrawsTransparentBackground(enabled);
1010 void ewk_view_browser_font_set(Evas_Object* ewkView)
1012 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl);
1013 impl->SetBrowserFont();
1016 void ewk_view_session_data_get(Evas_Object* ewkView, const char** data, unsigned* length)
1018 EINA_SAFETY_ON_NULL_RETURN(data);
1019 EINA_SAFETY_ON_NULL_RETURN(length);
1021 EWebView* impl = GetWebViewFromEvasObject(ewkView);
1028 impl->GetSessionData(data, length);
1031 Eina_Bool ewk_view_mode_set(Evas_Object* ewkView, Ewk_View_Mode view_mode)
1033 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, EINA_FALSE);
1035 if (view_mode == EWK_VIEW_MODE_WINDOWED) {
1036 #if !defined(EWK_BRINGUP) // FIXME: m67 bringup
1037 impl->SetViewMode(blink::WebViewModeWindowed);
1040 } else if (view_mode == EWK_VIEW_MODE_FULLSCREEN) {
1041 #if !defined(EWK_BRINGUP) // FIXME: m67 bringup
1042 impl->SetViewMode(blink::WebViewModeFullscreen);
1050 Eina_Bool ewk_view_split_scroll_overflow_enabled_set(Evas_Object* ewkView, const Eina_Bool enabled)
1052 LOG_EWK_API_MOCKUP("for browser");
1056 Ewk_Back_Forward_List* ewk_view_back_forward_list_get(const Evas_Object* ewkView)
1058 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, NULL);
1059 return impl->GetBackForwardList();
1062 void ewk_view_notification_permission_callback_set(Evas_Object *o, Ewk_View_Notification_Permission_Callback callback, void *user_data)
1064 EWK_VIEW_IMPL_GET_OR_RETURN(o, impl);
1065 impl->SetNotificationPermissionCallback(callback, user_data);
1068 static Eina_Bool _ewk_view_default_notification_permission(
1069 Evas_Object* ewk_view,
1070 Ewk_Notification_Permission_Request* request,
1073 EWK_VIEW_IMPL_GET_OR_RETURN(ewk_view, impl, EINA_FALSE);
1075 std::string value = std::string(ewk_security_origin_host_get(
1076 ewk_notification_permission_request_origin_get(request)));
1077 std::string message = std::string(
1078 "Web Page (%s) is requesting permission to show notifications.");
1079 std::string replace_str = std::string("(%s)");
1081 size_t pos = message.find(replace_str.c_str());
1082 if (pos != std::string::npos)
1083 message.replace(pos, replace_str.length(), value.c_str());
1085 // add for suspending
1086 ewk_notification_permission_request_suspend(request);
1088 NotificationPermissionPopup* popup = new NotificationPermissionPopup(request,
1089 ewk_notification_permission_request_origin_get(request), message);
1091 impl->GetPermissionPopupManager()->AddPermissionRequest(popup);
1096 void ewk_view_draw_focus_ring_enable_set(Evas_Object* ewkView, Eina_Bool enable)
1098 LOG_EWK_API_MOCKUP("This API is deprecated");
1101 double ewk_view_page_zoom_get(const Evas_Object* ewkView)
1103 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, -1.0);
1104 return impl->GetPageZoomFactor();
1107 Eina_Bool ewk_view_page_zoom_set(Evas_Object* ewkView, double zoomFactor)
1109 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, EINA_FALSE);
1110 impl->SetPageZoomFactor(zoomFactor);
1114 Evas_Object* ewk_view_smart_add(Evas* canvas, Evas_Smart* smart, Ewk_Context* context, Ewk_Page_Group* pageGroup)
1116 EINA_SAFETY_ON_NULL_RETURN_VAL(context, 0);
1117 return CreateWebViewAsEvasObject(context, canvas, smart);
1120 void ewk_view_quota_permission_request_callback_set(Evas_Object* ewkView, Ewk_Quota_Permission_Request_Callback callback, void* user_data)
1122 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl);
1123 impl->SetQuotaPermissionRequestCallback(callback, user_data);
1126 void ewk_view_quota_permission_request_reply(const Ewk_Quota_Permission_Request* request, const Eina_Bool allow)
1128 EINA_SAFETY_ON_NULL_RETURN(request);
1129 Evas_Object* ewkView = request->getView();
1130 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl);
1131 impl->QuotaRequestReply(request, allow == EINA_TRUE);
1134 void ewk_view_quota_permission_request_cancel(const Ewk_Quota_Permission_Request* request)
1136 EINA_SAFETY_ON_NULL_RETURN(request);
1137 Evas_Object* ewkView = request->getView();
1138 EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl);
1139 impl->QuotaRequestCancel(request);
1142 Eina_Bool ewk_view_focus_set(const Evas_Object* view, Eina_Bool focused)
1144 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
1145 impl->SetFocus(focused);
1149 Eina_Bool ewk_view_focus_get(const Evas_Object* view)
1151 EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
1152 return impl->HasFocus();
1155 Eina_Bool ewk_view_page_close(Evas_Object* o)
1157 EWK_VIEW_IMPL_GET_OR_RETURN(o, impl, EINA_FALSE);
1163 void ewk_view_session_timeout_set(Evas_Object* o, unsigned long timeout)
1165 LOG_EWK_API_MOCKUP();
1168 Evas_Object* ewk_view_widget_get(Evas_Object* view)
1170 LOG_EWK_API_MOCKUP();
1174 Eina_Bool ewk_view_horizontal_panning_hold_get(Evas_Object* o)
1176 LOG_EWK_API_MOCKUP();
1180 void ewk_view_horizontal_panning_hold_set(Evas_Object* o, Eina_Bool hold)
1182 LOG_EWK_API_MOCKUP();
1185 Eina_Bool ewk_view_draws_transparent_background_get(Evas_Object* o)
1187 LOG_EWK_API_MOCKUP();
1191 Eina_Bool ewk_view_split_scroll_overflow_enabled_get(const Evas_Object* o)
1193 LOG_EWK_API_MOCKUP();
1197 Eina_Bool ewk_view_did_change_theme_color_callback_set(Evas_Object* o, Ewk_View_Did_Change_Theme_Color_Callback callback, void* user_data)
1199 LOG_EWK_API_MOCKUP();
1203 Eina_Bool ewk_view_save_page_as_mhtml(Evas_Object* o, const char* path, Ewk_View_Save_Page_Callback callback, void* user_data)
1205 LOG_EWK_API_MOCKUP();
1209 void ewk_view_reader_mode_set(Evas_Object* ewk_view, Eina_Bool enable)
1211 LOG_EWK_API_MOCKUP();
1214 Eina_Bool ewk_view_top_controls_height_set(Evas_Object* ewk_view, size_t top_height, size_t bottom_height)
1216 LOG_EWK_API_MOCKUP();
1220 Eina_Bool ewk_view_top_controls_state_set(Evas_Object* ewk_view, Ewk_Top_Control_State constraint, Ewk_Top_Control_State current, Eina_Bool animation)
1222 LOG_EWK_API_MOCKUP();
1226 Eina_Bool ewk_view_main_frame_scrollbar_visible_set(Evas_Object* o, Eina_Bool visible)
1228 LOG_EWK_API_MOCKUP();
1232 Eina_Bool ewk_view_set_custom_device_pixel_ratio(Evas_Object* ewkView, Eina_Bool enabled)
1234 LOG_EWK_API_MOCKUP();
1238 #if BUILDFLAG(IS_TIZEN_TV)
1239 Eina_Bool ewk_media_translated_url_set(Evas_Object* ewkView, const char* url)
1241 LOG_EWK_API_MOCKUP();
1245 Eina_Bool ewk_view_app_preload_set(Evas_Object* ewkView, Eina_Bool is_preload)
1247 LOG_EWK_API_MOCKUP();
1252 Eina_Bool ewk_view_html_string_override_current_entry_load(Evas_Object* view, const char* html, const char* base_uri, const char* unreachable_url)
1254 LOG_EWK_API_MOCKUP();
1258 Eina_Bool ewk_view_text_matches_count(Evas_Object* o, const char* text, Ewk_Find_Options options, unsigned max_match_count)
1260 LOG_EWK_API_MOCKUP();
1264 void ewk_view_voicemanager_label_draw(Evas_Object* view, Evas_Object* image, Eina_Rectangle rect){
1265 LOG_EWK_API_MOCKUP();
1268 void ewk_view_voicemanager_labels_clear(Evas_Object* view)
1270 LOG_EWK_API_MOCKUP();
1273 void ewk_view_mirrored_blur_set(Evas_Object* o, Eina_Bool state)
1275 LOG_EWK_API_MOCKUP();
1278 void ewk_view_add_dynamic_certificate_path(const Evas_Object *ewkView, const char* host, const char* cert_path)
1280 LOG_EWK_API_MOCKUP();
1283 void ewk_view_atk_deactivation_by_app(Evas_Object* view, Eina_Bool enable)
1285 LOG_EWK_API_MOCKUP();
1288 char* ewk_view_cookies_get(Evas_Object* o, const char* url)
1290 LOG_EWK_API_MOCKUP();
1294 void ewk_view_notification_show_callback_set(Evas_Object *o, Ewk_View_Notification_Show_Callback show_callback, void *user_data)
1296 LOG_EWK_API_MOCKUP();
1299 void ewk_view_notification_cancel_callback_set(Evas_Object *o, Ewk_View_Notification_Cancel_Callback cancel_callback, void *user_data)
1301 LOG_EWK_API_MOCKUP();
1304 const char* ewk_view_custom_encoding_get(const Evas_Object* o)
1306 LOG_EWK_API_MOCKUP();
1310 Eina_Bool ewk_view_custom_encoding_set(Evas_Object* o, const char* encoding)
1312 LOG_EWK_API_MOCKUP();
1316 void ewk_view_force_layout(const Evas_Object* o)
1318 LOG_EWK_API_MOCKUP();
1321 Eina_Bool ewk_view_send_key_event(Evas_Object* ewk_view, void* key_event, Eina_Bool is_press) {
1322 LOG_EWK_API_MOCKUP();
1326 Eina_Bool ewk_view_tts_mode_set(Evas_Object* view, ewk_tts_mode tts_mode) {
1327 LOG_EWK_API_MOCKUP();
1331 void ewk_view_authentication_callback_set(
1332 Evas_Object* ewk_view,
1333 Ewk_View_Authentication_Callback callback,
1336 EWK_VIEW_IMPL_GET_OR_RETURN(ewk_view, impl);
1337 impl->SetViewAuthCallback(callback, user_data);
1341 static void _ewk_view_default_authentication(Evas_Object* ewk_view,
1342 Ewk_Auth_Challenge* auth_challenge,
1345 AuthenticationChallengePopup::CreateAndShow(auth_challenge, ewk_view);
1348 void ewk_view_app_installation_request_callback_set(Evas_Object* o, Ewk_App_Installation_Request_Callback callback, void* user_data)
1350 LOG_EWK_API_MOCKUP();
1353 Eina_Bool ewk_view_bg_color_set(Evas_Object* o, int r, int g, int b, int a) {
1354 LOG_EWK_API_MOCKUP("This will be implemented soon");
1358 Eina_Bool ewk_view_key_events_enabled_set(Evas_Object* o, Eina_Bool enabled) {
1359 LOG_EWK_API_MOCKUP();
1363 void ewk_view_clear_all_tiles_resources(Evas_Object* ewkView) {
1364 LOG_EWK_API_MOCKUP();
1367 Eina_Bool ewk_view_set_support_video_hole(Evas_Object* ewkView, Evas_Object* window, Eina_Bool enable, Eina_Bool isVideoWindow) {
1368 LOG_EWK_API_MOCKUP();
1372 void ewk_view_widget_pepper_extension_callback_set(Evas_Object* ewk_view, Generic_Sync_Call_Callback cb, void* user_data) {
1373 LOG_EWK_API_MOCKUP();
1376 void ewk_view_widget_pepper_extension_info_set(Evas_Object* ewk_view, Ewk_Value widget_pepper_ext_info) {
1377 LOG_EWK_API_MOCKUP();
1380 void ewk_view_offscreen_rendering_enabled_set(Evas_Object* o, Eina_Bool enabled)
1382 LOG_EWK_API_MOCKUP();
1385 void ewk_view_ime_window_set(Evas_Object* o, void* window)
1387 LOG_EWK_API_MOCKUP();
1390 void ewk_view_smartrc_show_mic_notification_callback_set(Evas_Object* o, Ewk_View_SmartRC_Mic_Notification_Callback callback, void* user_data)
1392 LOG_EWK_API_MOCKUP();
1395 Eina_Bool ewk_view_set_support_canvas_hole(Evas_Object* ewkView, const char* url)
1397 LOG_EWK_API_MOCKUP();
1401 Eina_Bool ewk_view_marlin_enable_set(Evas_Object* ewkView, Eina_Bool is_enable)
1403 LOG_EWK_API_MOCKUP();
1407 Eina_Bool ewk_view_key_system_whitelist_set(Evas_Object* ewkView, const char** list, unsigned list_size)
1409 LOG_EWK_API_MOCKUP();
1413 Eina_Bool ewk_view_active_drm_set(Evas_Object* view, const char* drm_system_id)
1415 LOG_EWK_API_MOCKUP();
1419 void ewk_media_set_subtitle_lang(Evas_Object* ewkView, const char* lang_list)
1421 LOG_EWK_API_MOCKUP();
1424 void ewk_media_set_parental_rating_result(Evas_Object* ewkView, const char* url, Eina_Bool is_pass)
1426 LOG_EWK_API_MOCKUP();
1429 void ewk_media_start_with_high_bit_rate(Evas_Object* ewkView, Eina_Bool is_high_bitrate)
1431 LOG_EWK_API_MOCKUP();
1434 double ewk_view_media_current_time_get(const Evas_Object *o)
1436 LOG_EWK_API_MOCKUP();
1440 void ewk_view_request_canvas_fullscreen(Evas_Object* ewkView)
1442 LOG_EWK_API_MOCKUP();
1445 void ewk_view_360video_play(Evas_Object* ewkView)
1447 LOG_EWK_API_MOCKUP();
1450 void ewk_view_360video_pause(Evas_Object* ewkView)
1452 LOG_EWK_API_MOCKUP();
1455 void ewk_view_360video_duration(Evas_Object* ewkView, Ewk_360_Video_Duration_Callback callback, void* user_data)
1457 LOG_EWK_API_MOCKUP();
1460 void ewk_view_360video_current_time(Evas_Object* ewkView, Ewk_360_Video_CurrentTime_Callback callback, void* user_data)
1462 LOG_EWK_API_MOCKUP();
1465 void ewk_view_360video_set_current_time(Evas_Object* ewkView, double current_time)
1467 LOG_EWK_API_MOCKUP();
1470 Eina_Bool ewk_view_script_execute_all_frames(Evas_Object *o, const char *script, Ewk_View_Script_Execute_Cb callback, void *user_data)
1472 LOG_EWK_API_MOCKUP();
1476 void ewk_view_floating_window_state_changed(const Evas_Object *o, Eina_Bool status)
1478 LOG_EWK_API_MOCKUP();
1481 void ewk_view_auto_login(Evas_Object *view, const char* user_name, const char* password)
1483 LOG_EWK_API_MOCKUP();
1486 void ewk_view_request_manifest(Evas_Object* o,
1487 Ewk_View_Request_Manifest_Callback callback,
1489 EWK_VIEW_IMPL_GET_OR_RETURN(o, impl);
1490 impl->RequestManifest(callback, user_data);