From: Yuni Jeong Date: Mon, 27 Aug 2012 14:26:06 +0000 (+0900) Subject: Added ewk_frame_can_show_mime_type() API X-Git-Tag: 2.0_alpha~81 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4b870c231890d15a0913d040d04e05d15563d915;p=framework%2Fweb%2Fwebkit-efl.git Added ewk_frame_can_show_mime_type() API [Title] Added ewk_frame_can_show_mime_type() API [Issue#] N/A [Problem] N/A [Cause] N/A [Solution] N/A Change-Id: Icc7d304c69b56576602b8c7c40544b7fe4789667 --- diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_frame.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_frame.cpp index 5ae8f57..d50dfda 100755 --- a/Source/WebKit2/UIProcess/API/efl/ewk_frame.cpp +++ b/Source/WebKit2/UIProcess/API/efl/ewk_frame.cpp @@ -23,6 +23,7 @@ #include "WKAPICast.h" #include "WKFrame.h" #include "WKPage.h" +#include "WKRetainPtr.h" #include "WKString.h" #include @@ -76,3 +77,12 @@ Eina_Bool ewk_frame_source_get(Ewk_Frame_Ref frame, Ewk_Frame_Source_Get_Callbac return true; } +Eina_Bool ewk_frame_can_show_mime_type(Ewk_Frame_Ref frame, char* mimeType) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(frame, false); + EINA_SAFETY_ON_NULL_RETURN_VAL(mimeType, false); + + WKFrameRef wkFrame = static_cast(frame); + WKRetainPtr mimeTypeRef(AdoptWK, WKStringCreateWithUTF8CString(mimeType)); + return WKFrameCanShowMIMEType(wkFrame, mimeTypeRef.get()); +} \ No newline at end of file diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_frame.h b/Source/WebKit2/UIProcess/API/efl/ewk_frame.h index 2b41a23..c724d77 100755 --- a/Source/WebKit2/UIProcess/API/efl/ewk_frame.h +++ b/Source/WebKit2/UIProcess/API/efl/ewk_frame.h @@ -58,6 +58,16 @@ EAPI Ewk_Frame_Ref ewk_frame_parent_get(Ewk_Frame_Ref frame); */ EAPI Eina_Bool ewk_frame_source_get(Ewk_Frame_Ref frame, Ewk_Frame_Source_Get_Callback callback, void* user_data); +/** + * Returns that Whether or not a MIME type can be displayed. + * + * @param frame frame object + * @param mime_type a mime type + * + * @return @c EINA_TRUE if the MIME type can be displayed or @c EINA_FALSE otherwise + */ +EAPI Eina_Bool ewk_frame_can_show_mime_type(Ewk_Frame_Ref frame, char* mime_type); + #ifdef __cplusplus } #endif