* @file FWebCtrl_UserConfirmPopup.cpp
* @brief The file contains the definition of _UserConfirmPopup class.
*/
+#include <EWebKit2.h>
#include <FAppApp.h>
#include <FBaseColArrayList.h>
#include <FBaseSysLog.h>
, __userConfirmMode(USER_CONFIRM_USERMEDIA)
, __pCheckButton(null)
, __sync(false)
+ , __pImpl(null)
{
}
_UserConfirmPopup::~_UserConfirmPopup(void)
{
+
if (IsModalPopup())
{
HandleUserAction(EINA_FALSE);
result
-_UserConfirmPopup::Construct(_UserConfirmMode userConfirmMode, void* pEventInfo, bool sync, String msg)
+_UserConfirmPopup::Construct(_UserConfirmMode userConfirmMode, void* pEventInfo, Tizen::Web::Controls::_WebImpl* pImpl, bool sync, String msg)
{
result r = E_SUCCESS;
SysTryReturnResult(NID_WEB_CTRL, pEventInfo, E_INVALID_ARG, "Invalid argument(s) is used. pPolicy is null.");
bool hasTitle = true;
int popupMaxHeight = 2*pPopupData->labelDim.height + pPopupData->btnDim.height + 2*pPopupData->sideMargin;
+ __pImpl = pImpl;
+ SysAssertf(__pImpl != null, "Failed to get _WebImpl");
+
if (__userConfirmMode == USER_CONFIRM_GEOLOCATION)
{
popupMaxHeight += pPopupData->checkDim.height;
if (userConfirmMode != USER_SCRIPT_ALERT)
{
- SetTitleText(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_HEADER_SECURITY_WARNING"));
+ SetTitleText(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_HEADER_SECURITY_WARNING_ABB"));
}
Rectangle rect(0, 0, 0, 0);
{
idList.Add(*(new Integer(ID_BUTTON_USER_CANCEL)));
idList.Add(*(new Integer(ID_BUTTON_USER_ALLOW)));
- titleList.Add(*(new String(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_OPT_CANCEL"))));
- titleList.Add(*(new String(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_OPT_ALLOW"))));
+ titleList.Add(*(new String(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BUTTON_CANCEL_ABB"))));
+ titleList.Add(*(new String(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BUTTON_CONTINUE_ABB"))));
}
r = CreateAndAddButtons(idList, titleList, pButtonPanel);
{
case USER_CONFIRM_USERMEDIA:
{
- GetOwner()->SendUserEvent(ID_USER_CONFIRM_USERMEDIA_CLOSE, null);
+ __pImpl->SendUserEvent(ID_USER_CONFIRM_USERMEDIA_CLOSE, null);
break;
}
case USER_CONFIRM_GEOLOCATION:
{
- GetOwner()->SendUserEvent(ID_USER_CONFIRM_GEOLOCATION_CLOSE, null);
+ __pImpl->SendUserEvent(ID_USER_CONFIRM_GEOLOCATION_CLOSE, null);
break;
}
case USER_CONFIRM_NOTIFICATION:
{
- GetOwner()->SendUserEvent(ID_USER_CONFIRM_NOTIFICATION_CLOSE, null);
+ __pImpl->SendUserEvent(ID_USER_CONFIRM_NOTIFICATION_CLOSE, null);
break;
}
case USER_SCRIPT_ALERT:
{
- GetOwner()->SendUserEvent(ID_USER_SCRIPT_ALERT_CLOSE, null);
+ __pImpl->SendUserEvent(ID_USER_SCRIPT_ALERT_CLOSE, null);
+ break;
+ }
+ case USER_SCRIPT_CONFIRM:
+ {
+ __pImpl->SendUserEvent(ID_USER_SCRIPT_CONFIRM_CLOSE, null);
break;
}
default:
ewk_view_javascript_alert_reply(pView);
break;
}
+ case USER_SCRIPT_CONFIRM:
+ {
+ Evas_Object* pView = reinterpret_cast< Evas_Object* >(__pUserPolicyData);
+ ewk_view_javascript_confirm_reply(pView, allow);
+ break;
+ }
case USER_CONFIRM_APP_CACHE:
{
Evas_Object *pObj = reinterpret_cast< Evas_Object* >(__pUserPolicyData);
bool
_UserConfirmPopup::OnKeyPressed(Control& source, const KeyEventInfo& keyEventInfo)
{
- return true;
+ return false;
}
bool
{
case USER_CONFIRM_USERMEDIA:
{
- GetOwner()->SendUserEvent(ID_USER_CONFIRM_USERMEDIA_CLOSE, null);
+ __pImpl->SendUserEvent(ID_USER_CONFIRM_USERMEDIA_CLOSE, null);
break;
}
case USER_CONFIRM_GEOLOCATION:
{
- GetOwner()->SendUserEvent(ID_USER_CONFIRM_GEOLOCATION_CLOSE, null);
+ __pImpl->SendUserEvent(ID_USER_CONFIRM_GEOLOCATION_CLOSE, null);
break;
}
case USER_CONFIRM_NOTIFICATION:
{
- GetOwner()->SendUserEvent(ID_USER_CONFIRM_NOTIFICATION_CLOSE, null);
+ __pImpl->SendUserEvent(ID_USER_CONFIRM_NOTIFICATION_CLOSE, null);
break;
}
case USER_SCRIPT_ALERT:
{
- GetOwner()->SendUserEvent(ID_USER_SCRIPT_ALERT_CLOSE, null);
+ __pImpl->SendUserEvent(ID_USER_SCRIPT_ALERT_CLOSE, null);
+ break;
+ }
+ case USER_SCRIPT_CONFIRM:
+ {
+ __pImpl->SendUserEvent(ID_USER_SCRIPT_CONFIRM_CLOSE, null);
break;
}
case USER_PROTOCOL_HANDLER:
SysAssert(false);
}
}
- return true;
+ return false;
}
bool