void
+OnFaviconReceived(void* pUserData, Evas_Object* pView, void* pEventInfo)
+{
+ _WebImpl* pImpl = reinterpret_cast< _WebImpl* >(pUserData);
+ SysAssertf(pImpl, "Failed to request");
+
+ if (pImpl->GetLoadingListener())
+ {
+ result r = E_SUCCESS;
+
+ std::unique_ptr<_LoadingEventArg> pEventArg(new (std::nothrow) _LoadingEventArg(WEB_EVENT_LOADINGLISTENER_FAVICON_RECEIVED));
+ SysTryReturnVoidResult(NID_WEB_CTRL, pEventArg.get(), E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
+ r = pImpl->GetWebEvent()->FireAsync(*pEventArg.get());
+ SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ pEventArg.release();
+ }
+
+}
+
+
+void
OnDidStartDownloadCallback(const char* pUrl, void* pUserData)
{
_WebImpl* pImpl = reinterpret_cast< _WebImpl* >(pUserData);
evas_object_smart_callback_add(pWebNativeNode, "text,found", OnTextFound, this);
evas_object_smart_callback_add(pWebNativeNode, "touchmove,handled", OnWebPreventDefaultTriggered, this);
+ evas_object_smart_callback_add(pWebNativeNode, "icon,received", OnFaviconReceived, this);
Ewk_Context* pContext = ewk_view_context_get(pWebNativeNode);
SysAssertf(pContext, "Failed to get webkit instance.");
evas_object_smart_callback_del(pWebNativeNode, "text,found", OnTextFound);
evas_object_smart_callback_del(pWebNativeNode, "touchmove,handled", OnWebPreventDefaultTriggered);
+ evas_object_smart_callback_del(pWebNativeNode, "icon,received", OnFaviconReceived);
ewk_view_open_panel_callback_set(null, null, null);
break;
}
+ case WEB_EVENT_LOADINGLISTENER_FAVICON_RECEIVED:
+ {
+ std::unique_ptr<Bitmap> pFavicon(GetFaviconN());
+ SysTryReturn(NID_WEB_CTRL, pFavicon.get(), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+
+ pLoadingListner->OnFaviconReceived(*pFavicon.get());
+ break;
+ }
+
default:
{
SysAssert(false);