*
*/
-#include "ewk_view.h"
+#include "ewk_view_product.h"
#include <Evas.h>
-#if !defined(EWK_BRINGUP)
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
#include "webkit/common/webpreferences.h"
#else
#include "content/public/common/web_preferences.h"
#include "notification_permission_popup.h"
#include "public/ewk_back_forward_list.h"
#include "public/ewk_context.h"
-#include "public/ewk_enums.h"
+#include "public/ewk_enums_internal.h"
#include "public/ewk_settings.h"
#include "private/ewk_context_private.h"
#include "private/ewk_frame_private.h"
#include "private/ewk_back_forward_list_private.h"
#include "private/ewk_history_private.h"
#include "private/ewk_view_private.h"
-#include "third_party/WebKit/public/web/WebViewModeEnums.h"
+// FIXME: removed on m63
+//#include "third_party/blink/public/web/WebViewModeEnums.h"
#include "ui/events/gesture_detection/gesture_configuration.h"
+#include "url/gurl.h"
#include "usermedia_permission_popup.h"
#include "web_contents_delegate_efl.h"
return static_cast<Ewk_Context*>(impl->context());
}
-Eina_Bool ewk_view_url_set(Evas_Object* view, const char* url)
+Eina_Bool ewk_view_url_set(Evas_Object* view, const char* url_string)
{
EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
- EINA_SAFETY_ON_NULL_RETURN_VAL(url, false);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(url_string, false);
+ GURL url(url_string);
impl->SetURL(url);
return true;
}
const char* ewk_view_url_get(const Evas_Object* view)
{
EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, 0);
- return impl->GetURL();
+ return impl->GetURL().possibly_invalid_spec().c_str();
}
Eina_Bool ewk_view_reload_bypass_cache(Evas_Object *view)
{
EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
- impl->ReloadIgnoringCache();
+ impl->ReloadBypassingCache();
return true;
}
loadtype = content::NavigationController::LOAD_TYPE_DEFAULT;
break;
case EWK_HTTP_METHOD_POST:
- loadtype = content::NavigationController::LOAD_TYPE_BROWSER_INITIATED_HTTP_POST;
+ loadtype = content::NavigationController::LOAD_TYPE_HTTP_POST;
break;
default:
LOG(ERROR) << "Not supported HTTP Method.";
Eina_Bool ewk_view_page_visibility_state_set(Evas_Object* ewkView, Ewk_Page_Visibility_State page_visibility_state, Eina_Bool initial_state)
{
- EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl,false);
+ // TODO: Should we send initial_state to |Page::setVisibilityState()|?.
+ // isInitialState parameter seems be true only in the constructor of WebViewImpl.
+ EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, false);
+
+ // TODO: We should able to set 'prerender' or 'unloaded' as visibility state.
+ // http://www.w3.org/TR/page-visibility/#dom-document-visibilitystate
switch (page_visibility_state) {
- case EWK_PAGE_VISIBILITY_STATE_VISIBLE :
+ case EWK_PAGE_VISIBILITY_STATE_VISIBLE:
impl->Show();
break;
- case EWK_PAGE_VISIBILITY_STATE_HIDDEN :
+ case EWK_PAGE_VISIBILITY_STATE_HIDDEN:
impl->Hide();
break;
default:
- break;
+ return EINA_FALSE;
}
- return true;
+ return EINA_TRUE;
}
Eina_Bool ewk_view_user_agent_set(Evas_Object* ewkView, const char* user_agent)
EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, EINA_FALSE);
if (view_mode == EWK_VIEW_MODE_WINDOWED) {
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
impl->SetViewMode(blink::WebViewModeWindowed);
+#endif
return EINA_TRUE;
} else if (view_mode == EWK_VIEW_MODE_FULLSCREEN) {
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
impl->SetViewMode(blink::WebViewModeFullscreen);
+#endif
return EINA_TRUE;
} else {
return EINA_FALSE;
void ewk_view_draw_focus_ring_enable_set(Evas_Object* ewkView, Eina_Bool enable)
{
-#if defined(OS_TIZEN_TV) && !defined(EWK_BRINGUP)
- EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl);
- impl->setDrawFocusRing(enable);
-#else
- LOG_EWK_API_MOCKUP("Only for Tizen TV Browser");
-#endif
+ LOG_EWK_API_MOCKUP("This API is deprecated");
}
double ewk_view_page_zoom_get(const Evas_Object* ewkView)