*/
virtual DecisionPolicy OnWebDataReceived(const Tizen::Base::String& mime, const Tizen::Net::Http::HttpHeader& httpHeader) = 0;
+ /**
+ * Called when the favicon of the new page has been received. @n
+ * If receiving this callback the once, an application can get favicon by using Tizen::Web::Controls::GetFaviconN().
+ *
+ * @since 2.1
+ * @see Tizen::Web::Controls::GetFaviconN()
+ */
+ virtual void OnFaviconReceived(void) {}
+
protected:
- //
- // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
- //
- // Gets the Impl instance.
- //
- // @since 2.0
- //
- virtual void ILoadingListener_Reserved1(void) {}
//
// This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
WEB_EVENT_LOADINGLISTENER_COMPLETED,
WEB_EVENT_LOADINGLISTENER_AUTHENTICATION_REQUESTED,
WEB_EVENT_LOADINGLISTENER_AUTHENTICATION_CANCELED,
+ WEB_EVENT_LOADINGLISTENER_FAVICON_RECEIVED,
WEB_EVENT_WEBDOWNLOADLISTENER = 0x300,
WEB_EVENT_WEBDOWNLOADLISTENER_DATA_RECEIVED,
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:
+ {
+ pLoadingListner->OnFaviconReceived();
+ break;
+ }
+
default:
{
SysAssert(false);