, __pWebEvent(null)
, __pAuthChallenge(null)
, __pAuthPopup(null)
- , __pUserConfirmPopup(null)
+ , __pUserMediaConfirmPopup(null)
+ , __pContentHandlerConfirmPopup(null)
+ , __pProtocolHandlerConfirmPopup(null)
+ , __pGeolocationConfirmPopup(null)
+ , __pNotificationConfirmPopup(null)
+ , __pScriptAlertConfirmPopup(null)
+ , __pAppCacheConfirmPopup(null)
+ , __pDbQuotaConfirmPopup(null)
+ , __pLocalFsQuotaConfirmPopup(null)
+ , __pIndexedDbQuotaConfirmPopup(null)
, __pPromptPopup(null)
, __pCertConfirmPopup(null)
, __pSelectBox(null)
r = pUserConfirmPopup->Construct(userConfirmMode, pPolicy, true, msg);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- __pUserConfirmPopup = std::move(pUserConfirmPopup);
+ pUserConfirmPopup->SetOwner(&GetPublic());
int modalResult = 0;
- __pUserConfirmPopup->SetOwner(&GetPublic());
-
- r = __pUserConfirmPopup->ShowAndWait(modalResult);
- SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-
-CATCH:
- __pUserConfirmPopup.reset();
+ switch(userConfirmMode)
+ {
+ case USER_CONTENT_HANDLER:
+ {
+ __pContentHandlerConfirmPopup.reset();
- return r;
+ __pContentHandlerConfirmPopup = std::move(pUserConfirmPopup);
+
+ r = __pContentHandlerConfirmPopup->ShowAndWait(modalResult);
+ SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, __pContentHandlerConfirmPopup.reset(), r, "[%s] Propagating.", GetErrorMessage(r));
+ break;
+ }
+ case USER_PROTOCOL_HANDLER:
+ {
+ __pProtocolHandlerConfirmPopup.reset();
+
+ __pProtocolHandlerConfirmPopup = std::move(pUserConfirmPopup);
+
+ r = __pProtocolHandlerConfirmPopup->ShowAndWait(modalResult);
+ SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, __pProtocolHandlerConfirmPopup.reset(), r, "[%s] Propagating.", GetErrorMessage(r));
+ break;
+ }
+ case USER_CONFIRM_APP_CACHE:
+ {
+ __pAppCacheConfirmPopup.reset();
+
+ __pAppCacheConfirmPopup = std::move(pUserConfirmPopup);
+
+ r = __pAppCacheConfirmPopup->ShowAndWait(modalResult);
+ SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, __pAppCacheConfirmPopup.reset(), r, "[%s] Propagating.", GetErrorMessage(r));
+ break;
+ }
+ case USER_CONFIRM_DB_QUOTA_EXCEDED:
+ {
+ __pDbQuotaConfirmPopup.reset();
+
+ __pDbQuotaConfirmPopup = std::move(pUserConfirmPopup);
+
+ r = __pDbQuotaConfirmPopup->ShowAndWait(modalResult);
+ SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, __pDbQuotaConfirmPopup.reset(), r, "[%s] Propagating.", GetErrorMessage(r));
+ break;
+ }
+ case USER_CONFIRM_LOCAL_FS_QUOTA_EXCEDED:
+ {
+ __pLocalFsQuotaConfirmPopup.reset();
+
+ __pLocalFsQuotaConfirmPopup = std::move(pUserConfirmPopup);
+
+ r = __pLocalFsQuotaConfirmPopup->ShowAndWait(modalResult);
+ SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, __pLocalFsQuotaConfirmPopup.reset(), r, "[%s] Propagating.", GetErrorMessage(r));
+ break;
+ }
+ case USER_CONFIRM_INDEXED_DB_QUOTA_EXCEDED:
+ {
+ __pIndexedDbQuotaConfirmPopup.reset();
+
+ __pIndexedDbQuotaConfirmPopup = std::move(pUserConfirmPopup);
+
+ r = __pIndexedDbQuotaConfirmPopup->ShowAndWait(modalResult);
+ SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, __pIndexedDbQuotaConfirmPopup.reset(), r, "[%s] Propagating.", GetErrorMessage(r));
+ break;
+ }
+ }
+CATCH:
+ return r;
}
r = pUserConfirmPopup->Construct(userConfirmMode, pPolicy, false, msg);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- __pUserConfirmPopup = std::move(pUserConfirmPopup);
+ pUserConfirmPopup->SetOwner(&GetPublic());
- __pUserConfirmPopup->SetOwner(&GetPublic());
+ switch(userConfirmMode)
+ {
+ case USER_CONFIRM_USERMEDIA:
+ {
+ __pUserMediaConfirmPopup.reset();
- r = __pUserConfirmPopup->ShowPopup();
- SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ __pUserMediaConfirmPopup = std::move(pUserConfirmPopup);
+
+ r = __pUserMediaConfirmPopup->ShowPopup();
+ SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, __pUserMediaConfirmPopup.reset(), r, "[%s] Propagating.", GetErrorMessage(r));
+
+ __pUserMediaConfirmPopup.release();
+ break;
+ }
+ case USER_CONFIRM_GEOLOCATION:
+ {
+ __pGeolocationConfirmPopup.reset();
+
+ __pGeolocationConfirmPopup = std::move(pUserConfirmPopup);
+
+ r = __pGeolocationConfirmPopup->ShowPopup();
+ SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, __pGeolocationConfirmPopup.reset(), r, "[%s] Propagating.", GetErrorMessage(r));
+
+ __pGeolocationConfirmPopup.release();
+ break;
+ }
+ case USER_CONFIRM_NOTIFICATION:
+ {
+ __pNotificationConfirmPopup.reset();
+
+ __pNotificationConfirmPopup = std::move(pUserConfirmPopup);
+
+ r = __pNotificationConfirmPopup->ShowPopup();
+ SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, __pNotificationConfirmPopup.reset(), r, "[%s] Propagating.", GetErrorMessage(r));
+
+ __pNotificationConfirmPopup.release();
+ break;
+ }
+ case USER_SCRIPT_ALERT:
+ {
+ __pScriptAlertConfirmPopup.reset();
+
+ __pScriptAlertConfirmPopup = std::move(pUserConfirmPopup);
- __pUserConfirmPopup.release();
+ r = __pScriptAlertConfirmPopup->ShowPopup();
+ SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, __pScriptAlertConfirmPopup.reset(), r, "[%s] Propagating.", GetErrorMessage(r));
+
+ __pScriptAlertConfirmPopup.release();
+ break;
+ }
+ }
return E_SUCCESS;
CATCH:
- __pUserConfirmPopup.reset();
-
return r;
}
case ID_PROMPT_POPUP_CLOSE:
__pPromptPopup.reset();
break;
- case ID_USER_CONFIRM_POPUP_CLOSE:
- __pUserConfirmPopup.reset();
+ case ID_USER_CONFIRM_USERMEDIA_CLOSE:
+ __pUserMediaConfirmPopup.reset();
+ break;
+ case ID_USER_CONFIRM_GEOLOCATION_CLOSE:
+ __pGeolocationConfirmPopup.reset();
+ break;
+ case ID_USER_CONFIRM_NOTIFICATION_CLOSE:
+ __pNotificationConfirmPopup.reset();
+ break;
+ case ID_USER_SCRIPT_ALERT_CLOSE:
+ __pScriptAlertConfirmPopup.reset();
break;
default:
break;