std::unique_ptr<_SelectBox> pSelectBox(new (std::nothrow) _SelectBox());
SysTryReturnResult(NID_WEB_CTRL, pSelectBox.get(), E_OUT_OF_MEMORY, "Memory allocation failed.");
- int itemCount = eina_list_count(pItems);
- int defaultCount = (itemCount < DEFAULT_LIST_ITEM_COUNT) ? itemCount : (isMultiSelect ? (DEFAULT_LIST_ITEM_COUNT - 1) : DEFAULT_LIST_ITEM_COUNT);
- r = pSelectBox->Construct(this, isMultiSelect, title, defaultCount, pWebView);
-
+ if (isMultiSelect)
+ {
+ r = pSelectBox->Construct(this, isMultiSelect, title, DEFAULT_LIST_ITEM_COUNT - 1, pWebView);
+ }
+ else
+ {
+ r = pSelectBox->Construct(this, isMultiSelect, title, DEFAULT_LIST_ITEM_COUNT, pWebView);
+ }
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
r = pSelectBox->UpdateList(pItems, selectedIndex, false, false);
String host(ewk_auth_challenge_url_get(pChallenge));
String realm(ewk_auth_challenge_realm_get(pChallenge));
+ __pAuthChallenge.reset();
+
std::unique_ptr<AuthenticationChallenge> pAuthChallenge(new (std::nothrow) AuthenticationChallenge());
SysTryReturnResult(NID_WEB_CTRL, pAuthChallenge, E_OUT_OF_MEMORY, "Memory Allocation failed.");
std::unique_ptr<_AuthConfirmPopup> pAuthPopup(new (std::nothrow) _AuthConfirmPopup());
SysTryReturnResult(NID_WEB_CTRL, pAuthPopup, E_OUT_OF_MEMORY, "Memory Allocation failed.");
- r = pAuthPopup->Construct(host, realm, this);
+ r = pAuthPopup->Construct(host, realm, pAuthChallenge);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ __pAuthPopup.reset();
__pAuthPopup = std::move(pAuthPopup);
r = __pAuthPopup->ShowPopup();
switch (requestId)
{
- case ID_AUTHENTICATION_CONFIRM_POPUP_CANCEL:
- __pAuthPopup->RemoveAllControls();
- __pAuthPopup.reset();
- __pAuthChallenge->Cancel();
- __pAuthChallenge.reset();
- break;
- case ID_AUTHENTICATION_CONFIRM_POPUP_PROCESS:
- __pAuthPopup->RemoveAllControls();
- __pAuthPopup.reset();
- if (pArgs)
- {
- std::unique_ptr<ArrayList, AllElementsDeleter> pAuthValue(reinterpret_cast< ArrayList* >(pArgs));
- __pAuthChallenge->Process(*reinterpret_cast< String* >(pAuthValue->GetAt(0)),*reinterpret_cast< String* >(pAuthValue->GetAt(1)));
- }
- __pAuthChallenge.reset();
- break;
case ID_CERTIFICATE_CONFIRM_POPUP_CLOSE:
__pCertConfirmPopup.reset();
break;