_WebBookmarkImpl::~_WebBookmarkImpl(void)
{
+ __bookmarkList.RemoveAll(true);
}
: __certPopupMode(CERTIFICATE_POPUP_MODE_USER_CONFIRM)
, __confirm(false)
, __pCertificatePolicyData(null)
- , __pImpl(null)
+ , __pParent(null)
+ , __pCertificatePopup(null)
{
}
result
-_CertificateConfirmPopup::Construct(_CertificatePopupMode certPopupMode, Ewk_Certificate_Policy_Decision* pPolicy, Tizen::Web::Controls::_WebImpl* pImpl)
+_CertificateConfirmPopup::Construct(_CertificatePopupMode certPopupMode, Ewk_Certificate_Policy_Decision* pPolicy, Tizen::Web::Controls::_CertificateConfirmPopup* pParent)
{
SysTryReturnResult(NID_WEB_CTRL, pPolicy, E_INVALID_ARG, "Certificate Policy pointer is null.");
result r = E_SUCCESS;
int popupMaxHeight = 0;
Rectangle rect(0, 0, 0, 0);
- if (pImpl == null)
- {
- __pImpl = pImpl;
- }
+ __pParent = pParent;
ArrayList idList;
r = idList.Construct();
std::unique_ptr<_CertificateConfirmPopup> pCertificatePopup(new (std::nothrow) _CertificateConfirmPopup());
SysTryReturnVoidResult(NID_WEB_CTRL, pCertificatePopup.get(), E_OUT_OF_MEMORY, "Memory Allocation failed.");
- r = pCertificatePopup->Construct(CERTIFICATE_POPUP_MODE_VIEW, __pCertificatePolicyData, __pImpl);
+ r = pCertificatePopup->Construct(CERTIFICATE_POPUP_MODE_VIEW, __pCertificatePolicyData, this);
SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
- r = pCertificatePopup->ShowPopup();
- SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ __pCertificatePopup = std::move(pCertificatePopup);
- pCertificatePopup.release();
+ r = __pCertificatePopup->ShowPopup();
+ SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ __pCertificatePopup.release();
return;
}
}
if (__certPopupMode == CERTIFICATE_POPUP_MODE_VIEW)
{
- __pImpl->SendUserEvent(ID_CERTIFICATE_CONFIRM_POPUP_CLOSE, null);
+ __pParent->SendUserEvent(ID_CERTIFICATE_CONFIRM_POPUP_CLOSE, null);
+ }
+}
+
+
+void
+_CertificateConfirmPopup::OnUserEventReceivedN(RequestId requestId, IList* pArgs)
+{
+ switch (requestId)
+ {
+ case ID_CERTIFICATE_CONFIRM_POPUP_CLOSE:
+ __pCertificatePopup.reset();
+ break;
+ default:
+ break;
}
+
}
+
bool
_CertificateConfirmPopup::OnKeyPressed(Control& source, const KeyEventInfo& keyEventInfo)
{
}
if (__certPopupMode == CERTIFICATE_POPUP_MODE_VIEW)
{
- __pImpl->SendUserEvent(ID_CERTIFICATE_CONFIRM_POPUP_CLOSE, null);
+ __pParent->SendUserEvent(ID_CERTIFICATE_CONFIRM_POPUP_CLOSE, null);
}
}
std::unique_ptr<_CertificateConfirmPopup> pCertConfirmPopup(new (std::nothrow) _CertificateConfirmPopup());
SysTryReturnResult(NID_WEB_CTRL, pCertConfirmPopup.get(), E_OUT_OF_MEMORY, "Memory Allocation failed.");
- r = pCertConfirmPopup->Construct(userConfirmMode, pPolicy, this);
+ r = pCertConfirmPopup->Construct(userConfirmMode, pPolicy);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
__pCertConfirmPopup = std::move(pCertConfirmPopup);
pWebManager->SetActiveWeb(this);
}
+ r = _ContainerImpl::OnPreAttachedToMainTree();
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
if (!HasValidNativeNode())
{
r = __pWebCore->InitializeWebNativeNode();
r = InitializeSetting();
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- r = _ContainerImpl::OnPreAttachedToMainTree();
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
_WebManager* pWebManager = _WebManager::GetInstance();
pWebManager->AddWeb(reinterpret_cast< int >(this));
}
result
_WebImpl::OnDetachingFromMainTree(void)
{
+ result r = E_SUCCESS;
+
_WebManager* pWebManager = _WebManager::GetInstance();
- pWebManager->RemoveActiveWeb(this);
+ pWebManager->RemoveActiveWeb(this);
+
+ r = _ContainerImpl::OnDetachingFromMainTree();
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
}
void
_WebImpl::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
{
- _ContainerImpl::OnUserEventReceivedN(requestId, pArgs);
-
switch (requestId)
{
case ID_CERTIFICATE_CONFIRM_POPUP_CLOSE:
#include <EWebKit2.h>
#include <unique_ptr.h>
+#include <FBaseColIList.h>
#include <FBaseString.h>
#include <FUiIPropagatedKeyEventListener.h>
#include "FWebCtrl_WebPopup.h"
*/
virtual ~_CertificateConfirmPopup(void);
- result Construct(_CertificatePopupMode certPopupMode, Ewk_Certificate_Policy_Decision* pPolicy, Tizen::Web::Controls::_WebImpl* pImpl);
+ result Construct(_CertificatePopupMode certPopupMode, Ewk_Certificate_Policy_Decision* pPolicy, Tizen::Web::Controls::_CertificateConfirmPopup* pParent = null);
void HandleUserAction(bool allow);
Tizen::Base::String GetStringOfToken(const Tizen::Base::String& parseString, const Tizen::Base::String& parseToken);
+ virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
+
private:
_CertificatePopupMode __certPopupMode;
bool __confirm;
Ewk_Certificate_Policy_Decision* __pCertificatePolicyData;
- Tizen::Web::Controls::_WebImpl* __pImpl;
+ _CertificateConfirmPopup* __pParent;
+ std::unique_ptr<_CertificateConfirmPopup> __pCertificatePopup;
}; // _CertificateConfirmPopup
}}} // Tizen::Web::Controls