Tizen 2.2.1 accepted/tizen/2.2/main tizen_2.2 2.2.1_release accepted/tizen/2.2/main/20140102.100224 submit/tizen_2.2/20140102.100117
authorSehong Na <sehong.na@samsung.com>
Thu, 2 Jan 2014 09:35:40 +0000 (18:35 +0900)
committerSehong Na <sehong.na@samsung.com>
Thu, 2 Jan 2014 09:35:40 +0000 (18:35 +0900)
13 files changed:
src/controls/FWebCtrl_AuthConfirmPopup.cpp
src/controls/FWebCtrl_AuthConfirmPopup.h
src/controls/FWebCtrl_CertificateConfirmPopup.cpp
src/controls/FWebCtrl_InputPickerPopup.cpp
src/controls/FWebCtrl_PromptPopup.cpp
src/controls/FWebCtrl_SelectBox.cpp
src/controls/FWebCtrl_SelectBox.h
src/controls/FWebCtrl_UserConfirmPopup.cpp
src/controls/FWebCtrl_WebImpl.cpp
src/controls/FWebCtrl_WebManager.cpp
src/controls/FWebCtrl_WebManager.h
src/controls/FWebCtrl_WebPopup.cpp
src/controls/inc/FWebCtrl_WebImpl.h

index 9b3108b..eeaa139 100755 (executable)
@@ -31,6 +31,7 @@
 #include <FUiKeyEventInfo.h>
 #include <FUiLayout.h>
 #include <FUiVerticalBoxLayout.h>
+#include <FWebCtrlAuthenticationChallenge.h>
 #include <FSys_SystemResource.h>
 #include <FSys_VibratorImpl.h>
 #include <FUi_ControlManager.h>
@@ -57,22 +58,27 @@ static const int EDIT_TEXT_SIZE = 35;
 _AuthConfirmPopup::_AuthConfirmPopup(void)
        : __pIdEditField(null)
        , __pPwdEditField(null)
-       , __pImpl(null)
+       , __pAuthHandler(null)
 {
 }
 
 
 _AuthConfirmPopup::~_AuthConfirmPopup(void)
 {
+       if (IsModalPopup())
+       {
+               __pAuthHandler->Cancel();
+       }
 }
 
 
 // Authentication popup
 result
-_AuthConfirmPopup::Construct(const String& host, const String& realm, _WebImpl* pImpl)
+_AuthConfirmPopup::Construct(const String& host, const String& realm, AuthenticationChallenge* pAuth)
 {
-       __pImpl = pImpl;
-       SysAssertf(__pImpl != null, "Failed to get _WebImpl");
+       SysTryReturnResult(NID_WEB_CTRL, pAuth != null, E_INVALID_ARG, "invalid argument(s) is used. The AuthenticationChallenge is null.");
+
+       __pAuthHandler = pAuth;
 
        _SystemResource* pSysResource = _SystemResource::GetInstance();
        SysAssertf(pSysResource != null, "Failed to get _SystemResource instance");
@@ -143,26 +149,23 @@ _AuthConfirmPopup::Construct(const String& host, const String& realm, _WebImpl*
        SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
        __pPwdEditField = pPwdEditField.release();
-
        __pIdEditField->SetFocus();
 
        Panel* pButtonPanel = CreateAndAddPanel();
        SysTryReturn(NID_WEB_CTRL, pButtonPanel, r = GetLastResult(), r, "[%s] Propagating.", GetErrorMessage(r));
 
        //Add Buttons
-       ArrayList idList(SingleObjectDeleter);
+       ArrayList idList;
        r = idList.Construct();
        SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+       idList.Add(*(new Integer(ID_BUTTON_AUTH_CANCEL)));
+       idList.Add(*(new Integer(ID_BUTTON_AUTH_PROCESS)));
 
-       idList.Add(new Integer(ID_BUTTON_AUTH_CANCEL));
-       idList.Add(new Integer(ID_BUTTON_AUTH_PROCESS));
-
-
-       ArrayList titleList(SingleObjectDeleter);
+       ArrayList titleList;
        r = titleList.Construct();
        SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-       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")));
+       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);
        SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
@@ -191,21 +194,14 @@ _AuthConfirmPopup::OnActionPerformed(const Control& source, int actionId)
        r = HidePopup();
        SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
 
-       ArrayList* pAuthValueList = null;
-
        switch (actionId)
        {
        case ID_BUTTON_AUTH_PROCESS:
-
-               pAuthValueList = new (std::nothrow) ArrayList();
-               pAuthValueList->Construct();
-               pAuthValueList->Add(new String(__pIdEditField->GetText()));
-               pAuthValueList->Add(new String(__pPwdEditField->GetText()));
-               __pImpl->SendUserEvent(ID_AUTHENTICATION_CONFIRM_POPUP_PROCESS, pAuthValueList);
+               __pAuthHandler->Process(__pIdEditField->GetText(), __pPwdEditField->GetText());
                break;
 
        case ID_BUTTON_AUTH_CANCEL:
-               __pImpl->SendUserEvent(ID_AUTHENTICATION_CONFIRM_POPUP_CANCEL, null);
+               __pAuthHandler->Cancel();
                break;
 
        default:
@@ -225,13 +221,12 @@ _AuthConfirmPopup::OnKeyReleased(Control& source, const KeyEventInfo& keyEventIn
        result r = E_SUCCESS;
        if ((keyEventInfo.GetKeyCode() == KEY_ESC || keyEventInfo.GetKeyCode() == KEY_BACK) && source.GetShowState() == true)
        {
+               __pAuthHandler->Cancel();
                r = HidePopup();
                if (IsFailed(r))
                {
                        SysLogException(NID_WEB_CTRL, r, "[%s] Propagating.", GetErrorMessage(r));
                }
-
-               __pImpl->SendUserEvent(ID_AUTHENTICATION_CONFIRM_POPUP_CANCEL, null);
        }
 
        return false;
index 8678e61..8913901 100755 (executable)
@@ -40,7 +40,7 @@ class EditField;
 
 namespace Tizen { namespace Web { namespace Controls
 {
-class _WebImpl;
+class AuthenticationChallenge;
 
 
 enum _AuthPopupButtonId
@@ -66,7 +66,7 @@ public:
         */
        virtual ~_AuthConfirmPopup(void);
 
-       result Construct(const Tizen::Base::String& host, const Tizen::Base::String& realm, _WebImpl* pImpl);
+       result Construct(const Tizen::Base::String& host, const Tizen::Base::String& realm, AuthenticationChallenge* pAuth);
 
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
@@ -84,8 +84,7 @@ private:
 private:
        Tizen::Ui::Controls::EditField* __pIdEditField;
        Tizen::Ui::Controls::EditField* __pPwdEditField;
-       _WebImpl* __pImpl;
-
+       AuthenticationChallenge* __pAuthHandler;
 }; // _AuthConfirmPopup
 
 }}} // Tizen::Web::Controls
index d933c0f..0ef39ae 100755 (executable)
@@ -106,11 +106,11 @@ _CertificateConfirmPopup::Construct(_CertificatePopupMode certPopupMode, Ewk_Cer
 
        __pParent = pParent;
 
-       ArrayList idList(SingleObjectDeleter);
+       ArrayList idList;
        r = idList.Construct();
        SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
-       ArrayList titleList(SingleObjectDeleter);
+       ArrayList titleList;
        r = titleList.Construct();
        SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
index fbc50e1..1b83049 100755 (executable)
@@ -213,11 +213,11 @@ _InputPickerPopup::Construct(const String& strDate, Ewk_Input_Type inputType, Ti
        __pButtonPanel = CreateAndAddPanel();
        SysTryReturn(NID_WEB_CTRL, __pButtonPanel, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
 
-       ArrayList idList(SingleObjectDeleter);
+       ArrayList idList;
        r = idList.Construct();
        SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
-       ArrayList titleList(SingleObjectDeleter);
+       ArrayList titleList;
        r = titleList.Construct();
        SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
@@ -296,11 +296,11 @@ _InputPickerPopup::Construct(const Color& color, Tizen::Web::Controls::_WebImpl*
        __pButtonPanel = CreateAndAddPanel();
        SysTryReturn(NID_WEB_CTRL, __pButtonPanel, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
 
-       ArrayList idList(SingleObjectDeleter);
+       ArrayList idList;
        r = idList.Construct();
        SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
-       ArrayList titleList(SingleObjectDeleter);
+       ArrayList titleList;
        r = titleList.Construct();
        SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
index 2fc1aa8..9a6ab1a 100755 (executable)
@@ -140,13 +140,13 @@ _PromptPopup::Construct(const String& message, const String& defaultVale,  Evas_
        _SystemResource* pSysResource = _SystemResource::GetInstance();
        SysAssertf(pSysResource != null, "Failed to get _SystemResource instance");
 
-       ArrayList idList(SingleObjectDeleter);
+       ArrayList idList;
        r = idList.Construct();
        SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
        idList.Add(*(new Integer(ID_BUTTON_PROMPT_CANCEL)));
        idList.Add(*(new Integer(ID_BUTTON_PROMPT_OK)));
 
-       ArrayList titleList(SingleObjectDeleter);
+       ArrayList titleList;
        r = titleList.Construct();
        SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
        titleList.Add(*(new String(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BUTTON_CANCEL_ABB"))));
index 737bb5e..ac80e60 100755 (executable)
@@ -148,7 +148,6 @@ _SelectBox::_SelectBox(void)
        , __multiSelection(false)
        , __SelectedIndex(-1)
        , __prevIndex(-1)
-       , __panelHeight(0)
        , __orientation(_CONTROL_ORIENTATION_PORTRAIT)
        , __pWebView(null)
        , __pToggledArray(null)
@@ -230,18 +229,16 @@ _SelectBox::Construct(Tizen::Web::Controls::_WebImpl* pImpl, bool isMultiSelect,
                Panel* pButtonPanel = CreateAndAddPanel();
                SysTryReturn(NID_WEB_CTRL, pButtonPanel, r = GetLastResult(), r, "[%s] Propagating.", GetErrorMessage(r));
 
-               __panelHeight = pButtonPanel->GetHeight();
-
                _SystemResource* pSysResource = _SystemResource::GetInstance();
                SysAssertf(pSysResource != null, "Failed to get _SystemResource instance");
 
-               ArrayList idList(SingleObjectDeleter);
+               ArrayList idList;
                r = idList.Construct();
                SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
                idList.Add(*(new Integer(ID_BUTTON_SELECTION)));
 
-               ArrayList titleList(SingleObjectDeleter);
+               ArrayList titleList;
                r = titleList.Construct();
                SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
@@ -252,8 +249,6 @@ _SelectBox::Construct(Tizen::Web::Controls::_WebImpl* pImpl, bool isMultiSelect,
 
                r = CreateAndAddButtons(idList, titleList, pButtonPanel);
                SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
-               SetSize(GetSize().width,GetSize().height + __panelHeight);
        }
 
        SetPropagatedKeyEventListener(this);
@@ -603,23 +598,6 @@ _SelectBox::UpdateList(Eina_List* pItems, int prevIndex, bool clearPrevList, boo
                }
        }
 
-       int listItemHeight = 0;
-       GET_SHAPE_CONFIG(CONTEXTMENU::LIST_ITEM_HEIGHT, __orientation, listItemHeight);
-       int prevCount = (__pListView->GetSize()).height / listItemHeight;
-       int defaultCount = __multiSelection ? DEFAULT_LIST_ITEM_COUNT -1 : DEFAULT_LIST_ITEM_COUNT;
-
-       if ((prevCount != itemCount)
-               && ((prevCount < defaultCount && itemCount < defaultCount)
-               || (prevCount < defaultCount && itemCount >= defaultCount)
-               || (prevCount >= defaultCount && itemCount < defaultCount)))
-       {
-               int listViewNewHeight = ((itemCount < defaultCount) ? itemCount : defaultCount) * listItemHeight;
-               int popupHeight = __multiSelection ? (listViewNewHeight + __panelHeight) : listViewNewHeight;
-
-               __pListView->SetSize((__pListView->GetSize()).width, listViewNewHeight);
-               SetSize(GetSize().width, popupHeight);
-       }
-
        __pListView->UpdateList();
 
        return E_SUCCESS;
index 8d9c89f..00afe24 100755 (executable)
@@ -122,7 +122,6 @@ public:
        static const int LIST_ITEM_TYPE_GROUP = 2;
        static const int LIST_ITEM_TYPE_NORMAL = 1;
        static const int LIST_ITEM_TYPE_SUB = 0;
-       static const int DEFAULT_LIST_ITEM_COUNT = 5;
 
 private:
        Tizen::Base::Collection::ArrayList __listElementArray;
@@ -131,7 +130,6 @@ private:
        bool __multiSelection;
        int __SelectedIndex;
        int __prevIndex;
-       int __panelHeight;
        Tizen::Ui::_ControlOrientation __orientation;
        Evas_Object* __pWebView;
        Eina_Inarray* __pToggledArray;
index c23e93e..95ea782 100755 (executable)
@@ -246,11 +246,11 @@ _UserConfirmPopup::Construct(_UserConfirmMode userConfirmMode, void* pEventInfo,
        Panel* pButtonPanel = CreateAndAddPanel();
        SysTryReturn(NID_WEB_CTRL, pButtonPanel, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
 
-       ArrayList idList(SingleObjectDeleter);
+       ArrayList idList;
        r = idList.Construct();
        SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
-       ArrayList titleList(SingleObjectDeleter);
+       ArrayList titleList;
        r = titleList.Construct();
        SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
index 13673d9..4e0d109 100755 (executable)
@@ -2603,10 +2603,14 @@ _WebImpl::ShowSelectBoxPopup(bool isMultiSelect, const String& title, Eina_List*
        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);
@@ -4761,6 +4765,8 @@ _WebImpl::HttpAuthenticationRequested(Ewk_Auth_Challenge* pChallenge)
        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.");
 
@@ -4795,9 +4801,10 @@ _WebImpl::ShowAuthenticationPopup(const String& host, const String& realm, Authe
        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();
@@ -5295,22 +5302,6 @@ _WebImpl::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::ILi
        
        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;
index bb1a0eb..137a022 100755 (executable)
 #include <FBaseSysLog.h>\r
 #include <FIoDbEnumerator.h>\r
 #include <FUiControl.h>\r
-#include <FIo_DirectoryImpl.h>\r
-#include <FIo_DatabaseImpl.h>\r
+#include <FIo_DirectoryImpl.h>
+#include <FIo_DatabaseImpl.h>
 #include <FIo_FileImpl.h>\r
 #include <FUiCtrl_FormImpl.h>\r
-#include <FIo_DirectoryImpl.h>\r
-#include <FIo_DatabaseImpl.h>\r
-#include <FIo_FileImpl.h>\r
+#include <FIo_DirectoryImpl.h>
+#include <FIo_DatabaseImpl.h>
+#include <FIo_FileImpl.h>
 #include "FWebCtrl_EflWebkit.h"\r
 #include "FWebCtrl_Web.h"\r
 #include "FWebCtrl_WebImpl.h"\r
@@ -53,22 +53,22 @@ namespace Tizen { namespace Web { namespace Controls
 _WebManager* _WebManager::__pInstance = null;\r
 \r
 \r
-extern const wchar_t CUSTOM_DB_DIRECTORY_PATH[] = L"data/.webkit/customDatabase/";\r
-extern const wchar_t USER_CONFIRM_DB_NAME[] = L"userConfirm.db";\r
-extern const wchar_t GEOLOCATION_TABLE_NAME[] = L"geolocationPermission";\r
-extern const wchar_t CUSTOM_PROTOCOL_TABLE_NAME[] = L"customProtocol";\r
-extern const wchar_t CUSTOM_CONTENT_TABLE_NAME[] = L"customContent";\r
-extern const wchar_t CERTIFICATE_TABLE_NAME[] = L"certificate";\r
-\r
-\r
+extern const wchar_t CUSTOM_DB_DIRECTORY_PATH[] = L"data/.webkit/customDatabase/";
+extern const wchar_t USER_CONFIRM_DB_NAME[] = L"userConfirm.db";
+extern const wchar_t GEOLOCATION_TABLE_NAME[] = L"geolocationPermission";
+extern const wchar_t CUSTOM_PROTOCOL_TABLE_NAME[] = L"customProtocol";
+extern const wchar_t CUSTOM_CONTENT_TABLE_NAME[] = L"customContent";
+extern const wchar_t CERTIFICATE_TABLE_NAME[] = L"certificate";
+
+
 static const int CUSTOM_DB_TABLE_COUNT= 4;\r
 \r
 \r
 _WebManager::_WebManager(void)\r
        : __pWebList(null)\r
        , __pCallbackList(null)\r
-       , __pActivePopupList(null)\r
        , __pActiveWeb(null)\r
+       , __pActivePopup(null)\r
        , __pProxy(null)\r
 {\r
 }\r
@@ -138,11 +138,6 @@ _WebManager::Construct(void)
        r = pCallbackList->Construct();\r
        SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
 \r
-       std::unique_ptr<ArrayListT< int> > pActivePopupList(new (std::nothrow) ArrayListT< int >());\r
-       SysTryReturnResult(NID_WEB_CTRL, pActivePopupList.get(), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");\r
-       r = pActivePopupList->Construct();\r
-       SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
-\r
        r = InitializeProxyAddress();\r
        SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
 \r
@@ -154,35 +149,34 @@ _WebManager::Construct(void)
 \r
        __pWebList = std::move(pWebList);\r
        __pCallbackList = std::move(pCallbackList);\r
-       __pActivePopupList = std::move(pActivePopupList);\r
 \r
        return E_SUCCESS;\r
 }\r
 \r
 \r
-void\r
+void
 _WebManager::ClearCertificateDb(void)\r
-{\r
-       result r = E_SUCCESS;\r
-\r
-       String certificatePath(Tizen::App::App::GetInstance()->GetAppRootPath() + CUSTOM_DB_DIRECTORY_PATH + USER_CONFIRM_DB_NAME);\r
-       String table(CERTIFICATE_TABLE_NAME);\r
-       _DatabaseImpl db;\r
-\r
-       r = db.Construct(certificatePath, "r+", null);\r
-       SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));\r
-\r
-       db.BeginTransaction();\r
-\r
-       r = db.ExecuteSql(L"Delete From " + table, true);\r
-       SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));\r
-\r
-       db.CommitTransaction();\r
-\r
-       return;\r
-\r
-CATCH:\r
-       db.RollbackTransaction();\r
+{
+       result r = E_SUCCESS;
+
+       String certificatePath(Tizen::App::App::GetInstance()->GetAppRootPath() + CUSTOM_DB_DIRECTORY_PATH + USER_CONFIRM_DB_NAME);
+       String table(CERTIFICATE_TABLE_NAME);
+       _DatabaseImpl db;
+
+       r = db.Construct(certificatePath, "r+", null);
+       SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       db.BeginTransaction();
+
+       r = db.ExecuteSql(L"Delete From " + table, true);
+       SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+       db.CommitTransaction();
+
+       return;
+
+CATCH:
+       db.RollbackTransaction();
 }\r
 \r
 \r
@@ -193,15 +187,15 @@ _WebManager::InitializeProxyAddress(void)
        connection_h handle = null;\r
        char* pProxy = null;\r
 \r
-       ret = connection_create(&handle);\r
-       SysTryReturnResult(NID_WEB_CTRL, ret == CONNECTION_ERROR_NONE, E_SYSTEM, "A system error has been occurred. Failed to create connection.");\r
-\r
-       connection_address_family_e family = CONNECTION_ADDRESS_FAMILY_IPV4;\r
+       ret = connection_create(&handle);
+       SysTryReturnResult(NID_WEB_CTRL, ret == CONNECTION_ERROR_NONE, E_SYSTEM, "A system error has been occurred. Failed to create connection.");
 \r
-       ret = connection_get_proxy(handle, family, &pProxy);\r
+       connection_address_family_e family = CONNECTION_ADDRESS_FAMILY_IPV4;
+
+       ret = connection_get_proxy(handle, family, &pProxy);
        SysTryReturnResult(NID_WEB_CTRL, ret == CONNECTION_ERROR_NONE, E_SYSTEM, "A system error has been occurred. Failed to get proxy address.");\r
 \r
-       ret = connection_destroy(handle);\r
+       ret = connection_destroy(handle);
        SysTryReturnResult(NID_WEB_CTRL, ret == CONNECTION_ERROR_NONE, E_SYSTEM, "A system error has been occurred. Failed to destroy connection.");\r
 \r
        __pProxy = pProxy;\r
@@ -210,97 +204,97 @@ _WebManager::InitializeProxyAddress(void)
 }\r
 \r
 \r
-result\r
+result
 _WebManager::CreateResourceDirectory(void) const\r
-{\r
-       String html5FeaturesPath(Tizen::App::App::GetInstance()->GetAppRootPath() + CUSTOM_DB_DIRECTORY_PATH);\r
-\r
-       if (!_FileImpl::IsFileExist(html5FeaturesPath))\r
-       {\r
-               result r = E_SUCCESS;\r
-\r
-               r = _DirectoryImpl::Create(html5FeaturesPath, true);\r
-               SysTryReturnResult(NID_WEB_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has been occurred. create html5 features directory.");\r
-       }\r
-\r
-       return E_SUCCESS;\r
-}\r
-\r
-\r
-result\r
+{
+       String html5FeaturesPath(Tizen::App::App::GetInstance()->GetAppRootPath() + CUSTOM_DB_DIRECTORY_PATH);
+
+       if (!_FileImpl::IsFileExist(html5FeaturesPath))
+       {
+               result r = E_SUCCESS;
+
+               r = _DirectoryImpl::Create(html5FeaturesPath, true);
+               SysTryReturnResult(NID_WEB_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has been occurred. create html5 features directory.");
+       }
+
+       return E_SUCCESS;
+}
+
+
+result
 _WebManager::InitializeCustomDb(void) const\r
-{\r
-       result r = E_SUCCESS;\r
-\r
-       _DatabaseImpl db;\r
-       String path(Tizen::App::App::GetInstance()->GetAppRootPath() + CUSTOM_DB_DIRECTORY_PATH + USER_CONFIRM_DB_NAME);\r
-       String geolocationTable(GEOLOCATION_TABLE_NAME);\r
-       String protocolTable(CUSTOM_PROTOCOL_TABLE_NAME);\r
-       String contentTable(CUSTOM_CONTENT_TABLE_NAME);\r
-       String certificateTable(CERTIFICATE_TABLE_NAME);\r
-\r
-       r = db.Construct(path, "a+", null);\r
-       SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
-\r
-       std::unique_ptr<DbEnumerator>   pEnum(db.QueryN(L"Select count(name) from sqlite_master Where type='table' And name in ('" + geolocationTable + L"', '" + protocolTable + L"', '" + contentTable + L"', '" + certificateTable + L"')"));\r
-       if (pEnum.get())\r
-       {\r
-               int count = 0;\r
-\r
-               r = pEnum->MoveNext();\r
-               SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r));\r
-\r
-               r = pEnum->GetIntAt(0, count);\r
-               SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r));\r
-\r
-               if (count == CUSTOM_DB_TABLE_COUNT)\r
-               {\r
-                       return E_SUCCESS;\r
-               }\r
-       }\r
-\r
-       pEnum.reset();\r
-       pEnum = std::unique_ptr<DbEnumerator>(db.QueryN(L"Select name from sqlite_master Where type='table' And name = '" + geolocationTable + L"'"));\r
-       if (!pEnum.get())\r
-       {\r
-               r = db.ExecuteSql(\r
-                       L"CREATE TABLE IF NOT EXISTS " + geolocationTable + L"(id INTEGER PRIMARY KEY AUTOINCREMENT, origin TEXT, permission INTEGER)",\r
-                       true);\r
-               SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
-       }\r
-\r
-       pEnum.reset();\r
-       pEnum = std::unique_ptr<DbEnumerator>(db.QueryN(L"Select name from sqlite_master Where type='table' And name = '" + protocolTable + L"'"));\r
-       if (!pEnum.get())\r
-       {\r
-               r = db.ExecuteSql(\r
-                       L"CREATE TABLE IF NOT EXISTS " + protocolTable + L"(id INTEGER PRIMARY KEY AUTOINCREMENT, baseUrl TEXT, url TEXT, mime TEXT, allow INTEGER)",\r
-                       true);\r
-               SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
-       }\r
-\r
-       pEnum.reset();\r
-       pEnum = std::unique_ptr<DbEnumerator>(db.QueryN(L"Select name from sqlite_master Where type='table' And name = '" + contentTable + L"'"));\r
-       if (!pEnum.get())\r
-       {\r
-               r = db.ExecuteSql(\r
-                       L"CREATE TABLE IF NOT EXISTS " + contentTable + L"(id INTEGER PRIMARY KEY AUTOINCREMENT, baseUrl TEXT, url TEXT, mime TEXT, allow INTEGER)",\r
-                       true);\r
-               SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
-       }\r
-\r
-       pEnum.reset();\r
-       pEnum = std::unique_ptr<DbEnumerator>(db.QueryN(L"Select name from sqlite_master Where type='table' And name = '" + certificateTable + L"'"));\r
-       if (!pEnum.get())\r
-       {\r
-               r = db.ExecuteSql(\r
-                       L"CREATE TABLE IF NOT EXISTS " + certificateTable + L"(id INTEGER PRIMARY KEY AUTOINCREMENT, pem TEXT, allow INTEGER)",\r
-                       true);\r
-               SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
-       }\r
-\r
-       return E_SUCCESS;\r
-}\r
+{
+       result r = E_SUCCESS;
+
+       _DatabaseImpl db;
+       String path(Tizen::App::App::GetInstance()->GetAppRootPath() + CUSTOM_DB_DIRECTORY_PATH + USER_CONFIRM_DB_NAME);
+       String geolocationTable(GEOLOCATION_TABLE_NAME);
+       String protocolTable(CUSTOM_PROTOCOL_TABLE_NAME);
+       String contentTable(CUSTOM_CONTENT_TABLE_NAME);
+       String certificateTable(CERTIFICATE_TABLE_NAME);
+
+       r = db.Construct(path, "a+", null);
+       SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       std::unique_ptr<DbEnumerator>   pEnum(db.QueryN(L"Select count(name) from sqlite_master Where type='table' And name in ('" + geolocationTable + L"', '" + protocolTable + L"', '" + contentTable + L"', '" + certificateTable + L"')"));
+       if (pEnum.get())
+       {
+               int count = 0;
+
+               r = pEnum->MoveNext();
+               SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r));
+
+               r = pEnum->GetIntAt(0, count);
+               SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r));
+
+               if (count == CUSTOM_DB_TABLE_COUNT)
+               {
+                       return E_SUCCESS;
+               }
+       }
+
+       pEnum.reset();
+       pEnum = std::unique_ptr<DbEnumerator>(db.QueryN(L"Select name from sqlite_master Where type='table' And name = '" + geolocationTable + L"'"));
+       if (!pEnum.get())
+       {
+               r = db.ExecuteSql(
+                       L"CREATE TABLE IF NOT EXISTS " + geolocationTable + L"(id INTEGER PRIMARY KEY AUTOINCREMENT, origin TEXT, permission INTEGER)",
+                       true);
+               SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+       }
+
+       pEnum.reset();
+       pEnum = std::unique_ptr<DbEnumerator>(db.QueryN(L"Select name from sqlite_master Where type='table' And name = '" + protocolTable + L"'"));
+       if (!pEnum.get())
+       {
+               r = db.ExecuteSql(
+                       L"CREATE TABLE IF NOT EXISTS " + protocolTable + L"(id INTEGER PRIMARY KEY AUTOINCREMENT, baseUrl TEXT, url TEXT, mime TEXT, allow INTEGER)",
+                       true);
+               SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+       }
+
+       pEnum.reset();
+       pEnum = std::unique_ptr<DbEnumerator>(db.QueryN(L"Select name from sqlite_master Where type='table' And name = '" + contentTable + L"'"));
+       if (!pEnum.get())
+       {
+               r = db.ExecuteSql(
+                       L"CREATE TABLE IF NOT EXISTS " + contentTable + L"(id INTEGER PRIMARY KEY AUTOINCREMENT, baseUrl TEXT, url TEXT, mime TEXT, allow INTEGER)",
+                       true);
+               SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+       }
+
+       pEnum.reset();
+       pEnum = std::unique_ptr<DbEnumerator>(db.QueryN(L"Select name from sqlite_master Where type='table' And name = '" + certificateTable + L"'"));
+       if (!pEnum.get())
+       {
+               r = db.ExecuteSql(
+                       L"CREATE TABLE IF NOT EXISTS " + certificateTable + L"(id INTEGER PRIMARY KEY AUTOINCREMENT, pem TEXT, allow INTEGER)",
+                       true);
+               SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+       }
+
+       return E_SUCCESS;
+}
 \r
 \r
 result\r
@@ -394,30 +388,23 @@ _WebManager::SetActiveWeb(Tizen::Web::Controls::_WebImpl* pWebAddress)
                __pActiveWeb = pWebAddress;\r
        }\r
 \r
-       for (int i = 0; i < __pActivePopupList->GetCount(); i++)\r
+       if (__pActivePopup != null)\r
        {\r
-               int activePopupAddr = 0;\r
-               __pActivePopupList->GetAt(i, activePopupAddr);\r
-               _WebPopup* pActivePopup = reinterpret_cast< _WebPopup* >(activePopupAddr);\r
-\r
-               if (pActivePopup != null)\r
-               {\r
-                       pActivePopup->SetShowState(false);\r
+               __pActivePopup->SetShowState(false);\r
 \r
-                       _FormImpl* pFormImpl = __pActiveWeb->GetParentFormImpl(__pActiveWeb);\r
+               _FormImpl* pFormImpl = __pActiveWeb->GetParentFormImpl(__pActiveWeb);\r
 \r
-                       if (pFormImpl != null)\r
-                       {\r
-                               pActivePopup->SetOwner(&pFormImpl->GetPublic());\r
-                       }\r
-                       else\r
-                       {\r
-                               pActivePopup->SetOwner(&__pActiveWeb->GetPublic());\r
-                       }\r
-\r
-                       pActivePopup->SetShowState(true);\r
-                       pActivePopup->Show();\r
+               if (pFormImpl != null)\r
+               {\r
+                       __pActivePopup->SetOwner(&pFormImpl->GetPublic());\r
                }\r
+               else\r
+               {\r
+                       __pActivePopup->SetOwner(&__pActiveWeb->GetPublic());\r
+               }\r
+\r
+               __pActivePopup->SetShowState(true);\r
+               __pActivePopup->Show();\r
        }\r
 }\r
 \r
@@ -432,27 +419,20 @@ _WebManager::RemoveActiveWeb(Tizen::Web::Controls::_WebImpl* pWebAddress)
 }\r
 \r
 \r
-result\r
-_WebManager::SetActivePopup(int popupAddress)\r
+void\r
+_WebManager::SetActivePopup(Tizen::Web::Controls::_WebPopup* pPopupAddress)\r
 {\r
-       result r = E_SUCCESS;\r
-\r
-       r = __pActivePopupList->Add(popupAddress);\r
-       SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
-\r
-       return r;\r
+       __pActivePopup = pPopupAddress;\r
 }\r
 \r
 \r
-result\r
-_WebManager::RemoveActivePopup(int popupAddress)\r
+void\r
+_WebManager::RemoveActivePopup(Tizen::Web::Controls::_WebPopup* pPopupAddress)\r
 {\r
-       result r = E_SUCCESS;\r
-\r
-       r = __pActivePopupList->Remove(popupAddress);\r
-       SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));\r
-\r
-       return r;\r
+       if (__pActivePopup == pPopupAddress)\r
+       {\r
+               __pActivePopup = null;\r
+       }\r
 }\r
 \r
 \r
index 7f28f40..57061fd 100755 (executable)
 namespace Tizen { namespace Web { namespace Controls\r
 {\r
 \r
-_OSP_EXPORT_ extern const wchar_t CUSTOM_DB_DIRECTORY_PATH[];\r
-_OSP_EXPORT_ extern const wchar_t USER_CONFIRM_DB_NAME[];\r
-_OSP_EXPORT_ extern const wchar_t GEOLOCATION_TABLE_NAME[];\r
-_OSP_EXPORT_ extern const wchar_t CUSTOM_PROTOCOL_TABLE_NAME[];\r
-_OSP_EXPORT_ extern const wchar_t CUSTOM_CONTENT_TABLE_NAME[];\r
+_OSP_EXPORT_ extern const wchar_t CUSTOM_DB_DIRECTORY_PATH[];
+_OSP_EXPORT_ extern const wchar_t USER_CONFIRM_DB_NAME[];
+_OSP_EXPORT_ extern const wchar_t GEOLOCATION_TABLE_NAME[];
+_OSP_EXPORT_ extern const wchar_t CUSTOM_PROTOCOL_TABLE_NAME[];
+_OSP_EXPORT_ extern const wchar_t CUSTOM_CONTENT_TABLE_NAME[];
 _OSP_EXPORT_ extern const wchar_t CERTIFICATE_TABLE_NAME[];\r
 \r
 class _WebImpl;\r
@@ -57,8 +57,8 @@ public:
 \r
        void SetActiveWeb(Tizen::Web::Controls::_WebImpl* pWebAddress);\r
        void RemoveActiveWeb(Tizen::Web::Controls::_WebImpl* pWebAddress);\r
-       result SetActivePopup(int popupAddress);\r
-       result RemoveActivePopup(int popupAddress);\r
+       void SetActivePopup(Tizen::Web::Controls::_WebPopup* pPopupAddress);\r
+       void RemoveActivePopup(Tizen::Web::Controls::_WebPopup* pPopupAddress);\r
 \r
        static _WebManager* GetInstance(void);\r
 \r
@@ -73,7 +73,7 @@ private:
 \r
        void ClearCertificateDb(void);\r
        result InitializeProxyAddress(void);\r
-       result CreateResourceDirectory(void) const;\r
+       result CreateResourceDirectory(void) const;
        result InitializeCustomDb(void) const;\r
 \r
        _WebManager& operator=(const _WebManager& rhs);\r
@@ -81,9 +81,9 @@ private:
 private:\r
        std::unique_ptr<Tizen::Base::Collection::ArrayListT< int > > __pWebList;\r
        std::unique_ptr<Tizen::Base::Collection::MultiHashMapT< int, int > > __pCallbackList;\r
-       std::unique_ptr<Tizen::Base::Collection::ArrayListT< int > > __pActivePopupList;\r
 \r
        _WebImpl* __pActiveWeb;\r
+       _WebPopup* __pActivePopup;\r
        char* __pProxy;\r
 \r
        static _WebManager* __pInstance;\r
index 34c0f5b..c9b6769 100755 (executable)
@@ -53,7 +53,7 @@ _WebPopup::_WebPopup(void)
 _WebPopup::~_WebPopup(void)
 {
        _WebManager* pWebManager = _WebManager::GetInstance();
-       pWebManager->RemoveActivePopup(reinterpret_cast< int >(this));
+       pWebManager->RemoveActivePopup(this);
 
        if (IsModalPopup())
        {
@@ -108,7 +108,7 @@ _WebPopup::ShowPopup(void)
        result r = E_SUCCESS;
 
        _WebManager* pWebManager = _WebManager::GetInstance();
-       pWebManager->SetActivePopup(reinterpret_cast< int >(this));
+       pWebManager->SetActivePopup(this);
 
        r = SetShowState(true);
        SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
@@ -145,7 +145,7 @@ result
 _WebPopup::ShowAndWait(int& modalResult)
 {
        _WebManager* pWebManager = _WebManager::GetInstance();
-       pWebManager->SetActivePopup(reinterpret_cast< int >(this));
+       pWebManager->SetActivePopup(this);
 
        __isModal = true;
 
index 5a6fcb0..d96237c 100755 (executable)
@@ -131,8 +131,6 @@ enum _SearchType {
 
 enum _WebPopupCloseId
 {
-       ID_AUTHENTICATION_CONFIRM_POPUP_CANCEL,
-       ID_AUTHENTICATION_CONFIRM_POPUP_PROCESS,
        ID_CERTIFICATE_CONFIRM_POPUP_CLOSE,
        ID_PROMPT_POPUP_CLOSE,
        ID_USER_CONFIRM_USERMEDIA_CLOSE,