__pImpl->SendUserEvent(ID_USER_SCRIPT_CONFIRM_CLOSE, null);
break;
}
+ case USER_CONFIRM_SAVE_PASSWORD:
+ {
+ __pImpl->SendUserEvent(ID_USER_CONFIRM_SAVE_PASSWORD_CLOSE, null);
+ break;
+ }
default:
SysAssert(false);
}
ewk_view_javascript_confirm_reply(pView, allow);
break;
}
+ case USER_CONFIRM_SAVE_PASSWORD:
+ {
+ Evas_Object* pView = reinterpret_cast< Evas_Object* >(__pUserPolicyData);
+ if (allow)
+ {
+ ewk_view_password_confirm_popup_reply(pView, EWK_PASSWORD_POPUP_OK);
+ }
+ else
+ {
+ ewk_view_password_confirm_popup_reply(pView, EWK_PASSWORD_POPUP_CANCEL);
+ }
+ break;
+ }
case USER_CONFIRM_APP_CACHE:
{
Evas_Object *pObj = reinterpret_cast< Evas_Object* >(__pUserPolicyData);
__pImpl->SendUserEvent(ID_USER_SCRIPT_CONFIRM_CLOSE, null);
break;
}
+ case USER_CONFIRM_SAVE_PASSWORD:
+ {
+ __pImpl->SendUserEvent(ID_USER_CONFIRM_SAVE_PASSWORD_CLOSE, null);
+ break;
+ }
case USER_PROTOCOL_HANDLER:
case USER_CONTENT_HANDLER:
case USER_CONFIRM_APP_CACHE:
CATCH:
ewk_view_javascript_prompt_reply(pView, null);
- return EINA_FALSE;
+ return EINA_TRUE;
+}
+
+
+Eina_Bool
+OnSavePasswordConfirmRequested(Evas_Object* pWebview, const char* pMessage, void* pUserData)
+{
+ SysLog(NID_WEB_CTRL, "The current value of message is %s", pMessage);
+
+ result r = E_SUCCESS;
+ _WebImpl* pImpl = reinterpret_cast< _WebImpl* >(pUserData);
+
+ String msg(pMessage);
+
+ r = pImpl->ShowUserConfirmPopupAsync(USER_CONFIRM_SAVE_PASSWORD, pWebview, msg);
+ SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ return EINA_TRUE;
+
+CATCH:
+ ewk_view_password_confirm_popup_reply(pWebview, EWK_PASSWORD_POPUP_CANCEL);
+
+ return EINA_TRUE;
}
, __pDbQuotaConfirmPopup(null)
, __pLocalFsQuotaConfirmPopup(null)
, __pIndexedDbQuotaConfirmPopup(null)
+ , __pSavePasswordConfirmPopup(null)
, __pPromptPopup(null)
, __pCertConfirmPopup(null)
, __pSelectBox(null)
ewk_view_exceeded_database_quota_callback_set(pWebNativeNode, OnDatabaseQuotaExceeded, const_cast< _WebImpl* >(this));
ewk_view_exceeded_local_file_system_quota_callback_set(pWebNativeNode, OnLocalFileSystemQuotaExceeded, const_cast< _WebImpl* >(this));
+ ewk_view_password_confirm_popup_callback_set(pWebNativeNode, OnSavePasswordConfirmRequested, const_cast< _WebImpl* >(this));
+
evas_object_event_callback_add(pWebNativeNode, EVAS_CALLBACK_FOCUS_IN, OnWebNativeNodeFocusGained, this);
evas_object_event_callback_add(pWebNativeNode, EVAS_CALLBACK_FOCUS_OUT, OnWebNativeNodeFocusLost, this);
}
ewk_view_exceeded_database_quota_callback_set(pWebNativeNode, null, null);
ewk_view_exceeded_local_file_system_quota_callback_set(pWebNativeNode, null, null);
+ ewk_view_password_confirm_popup_callback_set(pWebNativeNode, null, null);
+
evas_object_event_callback_del(pWebNativeNode, EVAS_CALLBACK_FOCUS_IN, OnWebNativeNodeFocusGained);
evas_object_event_callback_del(pWebNativeNode, EVAS_CALLBACK_FOCUS_OUT, OnWebNativeNodeFocusLost);
}
case ID_USER_SCRIPT_CONFIRM_CLOSE:
__pScriptConfirmPopup.reset();
break;
+ case ID_USER_CONFIRM_SAVE_PASSWORD_CLOSE:
+ __pSavePasswordConfirmPopup.reset();
+ break;
default:
break;
}
ID_USER_CONFIRM_GEOLOCATION_CLOSE,
ID_USER_CONFIRM_NOTIFICATION_CLOSE,
ID_USER_SCRIPT_ALERT_CLOSE,
- ID_USER_SCRIPT_CONFIRM_CLOSE
+ ID_USER_SCRIPT_CONFIRM_CLOSE,
+ ID_USER_CONFIRM_SAVE_PASSWORD_CLOSE
};
class _OSP_EXPORT_ _WebImpl
std::unique_ptr<_UserConfirmPopup> __pDbQuotaConfirmPopup;
std::unique_ptr<_UserConfirmPopup> __pLocalFsQuotaConfirmPopup;
std::unique_ptr<_UserConfirmPopup> __pIndexedDbQuotaConfirmPopup;
+ std::unique_ptr<_UserConfirmPopup> __pSavePasswordConfirmPopup;
std::unique_ptr< _PromptPopup > __pPromptPopup;
std::unique_ptr<_CertificateConfirmPopup> __pCertConfirmPopup;