*
* The following example demonstrates how to use the %Web class.
* @code
-// Sample code for WebSample.h
+// Sample code using Form for WebSample.h
#include <FUi.h>
#include <FWeb.h>
virtual result OnInitializing(void);
};
-// Sample code for WebSample.cpp
+// Sample code using Form for WebSample.cpp
#include "WebSample.h"
using namespace Tizen::Ui;
{
result r = E_SUCCESS;
+ // Constucts a Form
+ ...
+
__pWeb = new Web();
__pWeb->Construct(GetClientAreaBounds());
AddControl(__pWeb);
+
LoadUrl();
return r;
}
* @endcode
*
+ * @code
+// Sample code using Window for WebSample.h
+#include <FApp.h>
+#include <FUi.h>
+#include <FWeb.h>
+
+class WebSample :
+ public Tizen::Ui::Window
+{
+public:
+ WebSample(void) {};
+ virtual ~WebSample(void) {};
+
+protected:
+ void LoadUrl(void);
+
+private:
+ Tizen::Web::Controls::Web *__pWeb;
+
+public:
+ virtual result OnInitializing(void);
+};
+
+// Sample code using Window for WebSample.cpp
+#include "WebSample.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Web::Controls;
+
+result
+WebSample::OnInitializing(void)
+{
+ result r = E_SUCCESS;
+
+ // Constucts a Window
+ ...
+
+ Frame *pFrame = UiApp::GetInstance()->GetAppFrame()->GetFrame();
+ SetOwner(pFrame->GetCurrentForm());
+
+ __pWeb = new Web();
+ __pWeb->Construct(GetClientAreaBounds());
+ AddControl(__pWeb);
+
+ Show();
+ LoadUrl();
+
+ return r;
+}
+
+// Calls LoadUrl() with the URL of the Web content to display it on the Web control
+void
+WebSample::LoadUrl(void)
+{
+ Tizen::Base::String url(L"http://www.tizen.org");
+
+ __pWeb->LoadUrl(url);
+}
+ * @endcode
*/
class _OSP_EXPORT_ Web
: public Tizen::Ui::Container
+%define debug_package %{nil}
%define __strip /bin/true
Name: osp-web
_WebBookmarkImpl::~_WebBookmarkImpl(void)
{
+ __bookmarkList.RemoveAll(true);
}
Evas_Object* pIcon = null;
- Bitmap& temp = const_cast< Bitmap& >(favicon);;
+ Bitmap& temp = const_cast< Bitmap& >(favicon);
Evas* pEvas = _Utility::GetEvasFromUiApp(pFrame);
SysTryCatch(NID_WEB, pEvas, r = GetLastResult(), r, "[%s] Propagating.", GetErrorMessage(r));
*
* The file contains the definition of GeolocationPermissionManager class.
*/
+#include <pthread.h>
#include <unique_ptr.h>
#include <FBaseColIList.h>
#include <FBaseSysLog.h>
*
* The file contains the definition of FWebCtrlWebStorageManager class.
*/
+#include <pthread.h>
#include <unique_ptr.h>
#include <FBaseColIList.h>
#include <FBaseSysLog.h>
void
_MediaSelectionListener::OnAppControlCompleteResponseReceived(const Tizen::App::AppId& providerId, const Tizen::Base::String& operationId, Tizen::App::AppCtrlResult appControlResult, const Tizen::Base::Collection::IMap* pAppData)
{
- SysTryReturnVoidResult(NID_WEB_CTRL, pAppData, E_INVALID_ARG, "[E_INVALID_ARG] Invalid arguments to _MediaSelectionListener::OnAppControlCompleted");
-
Eina_List* pSelectedFileNames = null;
+ ArrayList* pSelectedFiles = null;
int fileCount = 0;
- ArrayList *pSelectedFiles = dynamic_cast< ArrayList* >(const_cast< Object* >(pAppData->GetValue(String("http://tizen.org/appcontrol/data/selected"))));
+ SysTryCatch(NID_WEB_CTRL, pAppData, , E_INVALID_ARG, "[E_INVALID_ARG] Invalid arguments to _MediaSelectionListener::OnAppControlCompleted");
+ pSelectedFiles = dynamic_cast< ArrayList* >(const_cast< Object* >(pAppData->GetValue(String("http://tizen.org/appcontrol/data/selected"))));
SysTryCatch(NID_WEB_CTRL, pSelectedFiles, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
fileCount = pSelectedFiles->GetCount();
r = _WebPopup::Construct(true, Dimension(rect.width, rect.height));
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- SetTitleText(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_BODY_DESTINATIONS_AUTHENTICATION_REQUIRED"));
+ SetTitleText(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_HEADER_ENTER_CREDENTIALS_ABB"));
//host realm label
rect.height = 2*pPopupData->labelDim.height;
r = pIdEditField->Construct(rect, EDIT_FIELD_STYLE_NORMAL);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- pIdEditField->SetGuideText(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_BODY_AUTHUSERNAME"));
+ pIdEditField->SetGuideText(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_WIFI_BODY_ENTER_YOUR_ID"));
pIdEditField->SetGuideTextColor(Color::GetColor(COLOR_ID_GREY));
pIdEditField->SetTextSize(EDIT_TEXT_SIZE);;
r = pPwdEditField->Construct(rect, EDIT_FIELD_STYLE_PASSWORD);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- pPwdEditField->SetGuideText(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_BODY_AUTHPASSWORD"));
+ pPwdEditField->SetGuideText(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BODY_ENTER_YOUR_PASSWORD_ABB"));
pPwdEditField->SetGuideTextColor(Color::GetColor(COLOR_ID_GREY));
pPwdEditField->SetTextSize(EDIT_TEXT_SIZE);;
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_COM_SK_CANCEL"))));
- titleList.Add(*(new String(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_COM_BUTTON_LOGIN"))));
+ 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));
bool
_AuthConfirmPopup::OnKeyPressed(Control& source, const KeyEventInfo& keyEventInfo)
{
- return true;
+ return false;
}
bool
}
}
- return true;
+ return false;
}
bool
: __certPopupMode(CERTIFICATE_POPUP_MODE_USER_CONFIRM)
, __confirm(false)
, __pCertificatePolicyData(null)
+ , __pParent(null)
+ , __pCertificatePopup(null)
{
}
result
-_CertificateConfirmPopup::Construct(_CertificatePopupMode certPopupMode, Ewk_Certificate_Policy_Decision* pPolicy)
+_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);
+ __pParent = pParent;
+
ArrayList idList;
r = idList.Construct();
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
if( __certPopupMode == CERTIFICATE_POPUP_MODE_VIEW )
{
- titleText = pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_BODY_CERTIFICATES");
+ titleText = pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_HEADER_SECURITY_CERTIFICATE_ABB");
popupMaxHeight = 4*pPopupData->labelDim.height + pPopupData->btnDim.height + 2*pPopupData->sideMargin;
rect.height = 4*pPopupData->labelDim.height;
rect.width = pPopupData->labelDim.width;
idList.Add(*(new Integer(ID_BUTTON_CERTIFICATE_CLOSE)));
- titleList.Add(*(new String(pSysResource->GetString("sys_string", "IDS_COM_BODY_DONE"))));
+ titleList.Add(*(new String(pSysResource->GetString("sys_string", "IDS_TPLATFORM_BUTTON_OK"))));
}
else // CERTIFICATE_POPUP_MODE_CONFIRM
{
- titleText = pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_HEADER_SECURITY_WARNING");
+ titleText = pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_HEADER_SECURITY_WARNING_ABB");
popupMaxHeight = 2*pPopupData->labelDim.height + pPopupData->btnDim.height + 2*pPopupData->sideMargin;
rect.height = 2*pPopupData->labelDim.height;
idList.Add(*(new Integer(ID_BUTTON_CERTIFICATE_VIEW)));
idList.Add(*(new Integer(ID_BUTTON_CERTIFICATE_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_VIEW"))));
- 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_BUTTON2_VIEW_CERTIFICATE"))));
+ titleList.Add(*(new String(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BUTTON_CONTINUE_ABB"))));
}
r = _WebPopup::Construct(true, Dimension(pPopupData->popupDim.width, popupMaxHeight));
SysTryReturnResult(NID_WEB_CTRL, pLabel.get(), E_OUT_OF_MEMORY, "Memory Allocation failed.");
String message = L"";
- message = pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_BODY_SECURITY_CERTIFICATE_PROBLEM_MSG");
+ message = pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BODY_THERE_ARE_PROBLEMS_WITH_THE_SECURITY_CERTIFICATE_FOR_THIS_SITE_C");
message.Append(L"\n");
message.Append(ewk_certificate_policy_decision_url_get(__pCertificatePolicyData));
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);
+ 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;
}
{
SysLogException(NID_WEB_CTRL, r, "[%s] Propagating.", GetErrorMessage(r));
}
- if (__certPopupMode == CERTIFICATE_POPUP_MODE_VIEW )
+ if (__certPopupMode == CERTIFICATE_POPUP_MODE_VIEW)
{
- GetOwner()->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)
{
- return true;
+ return false;
}
bool
{
SysLogException(NID_WEB_CTRL, r, "[%s] Propagating.", GetErrorMessage(r));
}
- if (__certPopupMode == CERTIFICATE_POPUP_MODE_VIEW )
+ if (__certPopupMode == CERTIFICATE_POPUP_MODE_VIEW)
{
- GetOwner()->SendUserEvent(ID_CERTIFICATE_CONFIRM_POPUP_CLOSE, null);
+ __pParent->SendUserEvent(ID_CERTIFICATE_CONFIRM_POPUP_CLOSE, null);
}
}
- return true;
+ return false;
}
bool
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
//Issued to
- certString.Append(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_HEADER_ISSUED_TO_C"));
+ certString.Append(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BODY_ISSUED_TO_C"));
certString.Append(L"\n\n");
String subject = certificate.GetSubject();
- certString.Append(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_HEADER_COMMON_NAME_C"));
+ certString.Append(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BODY_COMMON_NAME_C"));
certString.Append(L"\n");
certString.Append(GetStringOfToken(subject, L"/CN=") + L"\n");
- certString.Append(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_HEADER_ORGANIZATION_C"));
+ certString.Append(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BODY_ORGANISATION_C"));
certString.Append(L"\n");
certString.Append(GetStringOfToken(subject, L"/O=") + L"\n");
- certString.Append(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP ,"IDS_BR_HEADER_ORGANIZATIONAL_UNIT_C"));
+ certString.Append(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP ,"IDS_TPLATFORM_BODY_ORGANISATIONAL_UNIT_C"));
certString.Append(L"\n");
certString.Append(GetStringOfToken(subject, L"/OU=") + L"\n");
- certString.Append(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_BODY_CERTIFICATE_SERIAL_NUMBER"));
+ certString.Append(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BODY_SERIAL_NUMBER_C"));
certString.Append(L":\n");
certString.Append(certificate.GetSerialNumber() + L"\n\n\n");
//Issued by
- certString.Append(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_HEADER_ISSUED_BY_C"));
+ certString.Append(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BODY_ISSUED_BY_C"));
certString.Append(L"\n\n");
String issuer = certificate.GetIssuer();
- certString.Append(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_HEADER_COMMON_NAME_C"));
+ certString.Append(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BODY_COMMON_NAME_C"));
certString.Append(L"\n");
certString.Append(GetStringOfToken(issuer, L"/CN=") + L"\n");
- certString.Append(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_HEADER_ORGANIZATION_C"));
+ certString.Append(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BODY_ORGANISATION_C"));
certString.Append(L"\n");
certString.Append(GetStringOfToken(issuer, L"/O=") + L"\n");
- certString.Append(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_HEADER_ORGANIZATIONAL_UNIT_C"));
+ certString.Append(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BODY_ORGANISATIONAL_UNIT_C"));
certString.Append(L"\n");
certString.Append(GetStringOfToken(issuer, L"/OU=") + L"\n\n");
//Validity
- certString.Append(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_HEADER_VALIDITY_C"));
+ certString.Append(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BODY_VALIDITY_C"));
certString.Append(L"\n\n");
certString.Append(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_POP_CERTI_VALID_FROM_C"));
certString.Append(L"\n");
certString.Append(certificate.GetNotAfter() + L"\n\n\n");
//FingerPrints
- certString.Append(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_BODY_ROOTCERTIFICATES_FINGER_PRINT"));
+ certString.Append(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BODY_FINGERPRINTS_C"));
certString.Append(L":\n\n");
certString.Append(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_BODY_SIGNATURE_ALGORITHM_VODA"));
certString.Append(L":\n");
pPoint->id = 0;
pPoint->x = absPoint.x;
pPoint->y = absPoint.y;
- pPoint->state = EVAS_TOUCH_POINT_UP;
+ pPoint->state = EVAS_TOUCH_POINT_CANCEL;
Eina_List* pPointList = null;
pPointList = eina_list_append(pPointList, pPoint);
- ewk_view_feed_touch_event(__pWebCore->GetWebNativeNode(), EWK_TOUCH_END, pPointList, null);
+ ewk_view_feed_touch_event(__pWebCore->GetWebNativeNode(), EWK_TOUCH_CANCEL, pPointList, null);
void* pData = null;
EINA_LIST_FREE(pPointList, pData)
_SystemResource* pSysResource = _SystemResource::GetInstance();
SysAssertf(pSysResource != null, "Failed to get _SystemResource instance");
- buttonStr = pSysResource->GetString("sys_string", "IDS_COM_SK_OK");
+ buttonStr = pSysResource->GetString("sys_string", "IDS_TPLATFORM_BUTTON_OK");
std::unique_ptr<Button> pSelectionBtn(new (std::nothrow) Button());
SysTryReturnResult(NID_WEB_CTRL, pSelectionBtn.get(), E_OUT_OF_MEMORY, "Memory Allocation Failed.");
bool
_InputPickerPopup::OnKeyPressed(Control& source, const KeyEventInfo& keyEventInfo)
{
- return true;
+ return false;
}
bool
HidePopup();
}
- return true;
+ return false;
}
bool
ArrayList titleList;
r = titleList.Construct();
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- titleList.Add(*(new String(pSysResource->GetString("sys_string", "IDS_COM_POP_CANCEL"))));
- titleList.Add(*(new String(pSysResource->GetString("sys_string", "IDS_COM_SK_OK"))));
+ titleList.Add(*(new String(pSysResource->GetString("sys_string", "IDS_TPLATFORM_BUTTON_CANCEL_ABB"))));
+ titleList.Add(*(new String(pSysResource->GetString("sys_string", "IDS_TPLATFORM_BUTTON_OK"))));
r = CreateAndAddButtons(idList, titleList, pButtonPanel);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
bool
_PromptPopup::OnKeyPressed(Control& source, const KeyEventInfo& keyEventInfo)
{
- return true;
+ return false;
}
bool
__pImpl->SendUserEvent(ID_PROMPT_POPUP_CLOSE, null);
}
- return true;
+ return false;
}
bool
#include <unique_ptr.h>
#include <FBaseColAllElementsDeleter.h>
#include <FBaseSysLog.h>
+#include <FCntDownloadRequest.h>
#include <FGrpDimension.h>
#include <FGrpRectangle.h>
#include <FUiCtrlButton.h>
#include <FUiIActionEventListener.h>
#include <FUiKeyEventInfo.h>
#include <FUiVerticalBoxLayout.h>
+#include <FCnt_DownloadManagerImpl.h>
#include <FSys_SystemResource.h>
#include <FUi_ResourceManager.h>
#include "FWebCtrl_SelectBox.h"
using namespace Tizen::Base;
using namespace Tizen::Base::Collection;
+using namespace Tizen::Content;
using namespace Tizen::Graphics;
using namespace Tizen::System;
using namespace Tizen::Ui;
, __orientation(_CONTROL_ORIENTATION_PORTRAIT)
, __pWebView(null)
, __pToggledArray(null)
+ , __url(L"")
{
}
result
-_SelectBox::Construct(bool isMultiSelect, const String& title, int listCount, Evas_Object* pWebView)
+_SelectBox::Construct(bool isMultiSelect, const String& title, int listCount, Evas_Object* pWebView, const String& url)
{
result r = E_SUCCESS;
Rectangle rect;
int listViewHeight = 0;
__pWebView = pWebView;
+ __url = const_cast< String& >(url);
GET_SHAPE_CONFIG(CONTEXTMENU::LIST_ITEM_HEIGHT, __orientation, listItemHeight);
r = titleList.Construct();
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- titleList.Add(*(new String(pSysResource->GetString("sys_string", "IDS_COM_POP_CANCEL"))));
+ titleList.Add(*(new String(pSysResource->GetString("sys_string", "IDS_TPLATFORM_BUTTON_CANCEL_ABB"))));
if (__multiSelection)
{
- titleList.Add(*(new String(pSysResource->GetString("sys_string", "IDS_COM_BODY_DONE"))));
+ titleList.Add(*(new String(pSysResource->GetString("sys_string", "IDS_TPLATFORM_BUTTON_OK"))));
__pToggledArray = eina_inarray_new(sizeof(int), 0);
SysTryReturnResult(NID_WEB_CTRL, __pToggledArray, E_OUT_OF_MEMORY, "Memory Allocation failed.");
else
{
//In case of single selection ... update the index.
- __SelectedIndex = index;
- SysLog(NID_WEB_CTRL,"The current value of Update Selected index is %d",index);
- if (__pWebView)
+ if (__url.GetLength() == 0)
{
- ewk_view_popup_menu_select(__pWebView, __SelectedIndex);
+ __SelectedIndex = index;
+ SysLog(NID_WEB_CTRL,"The current value of Update Selected index is %d",index);
+ if (__pWebView)
+ {
+ ewk_view_popup_menu_select(__pWebView, __SelectedIndex);
+ }
+ }
+ else
+ {
+ result r = E_SUCCESS;
+
+ RequestId reqId = 0;
+ DownloadRequest request(__url);
+
+ _DownloadManagerImpl* pManagerImpl = _DownloadManagerImpl::GetInstance();
+ SysTryReturnVoidResult(NID_WEB_CTRL, pManagerImpl, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+
+ r = pManagerImpl->Start(request, reqId);
+ SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
- result r = HidePopup(__SelectedIndex);
+ result r = HidePopup();
SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
}
void
_SelectBox::OnActionPerformed(const Control& source, int actionId)
{
- switch (actionId)
- {
- case ID_BUTTON_SELECTION:
- {
- ewk_view_popup_menu_multiple_select(__pWebView, __pToggledArray);
- break;
- }
- case ID_BUTTON_CANCEL:
+ result r = HidePopup();
+ SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ if (__url.GetLength() == 0)
{
- if (__multiSelection)
+ switch (actionId)
{
- ewk_view_popup_menu_multiple_select(__pWebView, null);
+ case ID_BUTTON_SELECTION:
+ {
+ ewk_view_popup_menu_multiple_select(__pWebView, __pToggledArray);
+ break;
}
- else
+ case ID_BUTTON_CANCEL:
{
- ewk_view_popup_menu_select(__pWebView, __prevIndex);
+ if (__multiSelection)
+ {
+ ewk_view_popup_menu_multiple_select(__pWebView, null);
+ }
+ else
+ {
+ ewk_view_popup_menu_select(__pWebView, __prevIndex);
+ }
+ break;
+ }
+ default:
+ SysAssertf(false, "Invalid Action ID");
}
- break;
- }
- default:
- SysAssertf(false, "Invalid Action ID");
}
-
- result r = HidePopup(__SelectedIndex);
- SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
bool
_SelectBox::OnKeyPressed(Control& source, const KeyEventInfo& keyEventInfo)
{
- return true;
+ return false;
}
bool
{
if ((keyEventInfo.GetKeyCode() == KEY_ESC || keyEventInfo.GetKeyCode() == KEY_BACK) && source.GetShowState() == true)
{
- if (__multiSelection)
- {
- ewk_view_popup_menu_multiple_select(__pWebView, null);
- }
- else
- {
- ewk_view_popup_menu_select(__pWebView, __prevIndex);
- }
- result r = HidePopup(__SelectedIndex);
+ result r = HidePopup();
if (IsFailed(r))
{
SysLogException(NID_WEB_CTRL, r, "[%s] Propagating.", GetErrorMessage(r));
}
+
+ if (__url.GetLength() == 0)
+ {
+ if (__multiSelection)
+ {
+ ewk_view_popup_menu_multiple_select(__pWebView, null);
+ }
+ else
+ {
+ ewk_view_popup_menu_select(__pWebView, __prevIndex);
+ }
+ }
}
- return true;
+ return false;
}
bool
ID_BUTTON_CANCEL
};
-
class _SelectBox
: public _WebPopup
, public Tizen::Ui::Controls::IListViewItemEventListener
*/
virtual ~_SelectBox(void);
- result Construct(bool isMultiSelect, const Tizen::Base::String& title, int listItemCnt, Evas_Object* pWebView = null);
+ result Construct(bool isMultiSelect, const Tizen::Base::String& title, int listItemCnt, Evas_Object* pWebView = null, const Tizen::Base::String& url = L"");
Tizen::Base::Collection::IList* GetSelectedListN(void) const;
//IListViewItemProvider
Tizen::Ui::_ControlOrientation __orientation;
Evas_Object* __pWebView;
Eina_Inarray* __pToggledArray;
+ Tizen::Base::String __url;
}; // _SelectBox
}}} //Tizen::Web::Controls
* @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
#include <FUi_CoordinateSystemUtils.h>
#include <FUi_AccessibilityContainer.h>
#include <FUi_AccessibilityElement.h>
+#include <FUi_UiEventManager.h>
#include <FUi_IAccessibilityFocusHandler.h>
#include <FUi_IAccessibilityListener.h>
#include <FUi_Math.h>
, __edgeType(WEB_EDGE_NONE)
, __pTextElement(null)
, __previousTouchedPosition(0.0f, 0.0f)
+ , __isFullScreenEntered(false)
{
SetBackgroundColor(Color(0, 0, 0, 0));
}
_Web::~_Web(void)
{
+ _UiEventManager* pManager = _UiEventManager::GetInstance();
+ SysAssertf(pManager, "Failed to get ui evnet manager.");
+
+ pManager->RemoveKeyEventListener(*this);
+
RemoveGestureListener();
}
r = pWeb->InitializeGestureStates();
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
+ _UiEventManager* pManager = _UiEventManager::GetInstance();
+ SysAssertf(pManager, "Failed to get ui evnet manager.");
+
+ pManager->AddKeyEventListener(*pWeb.get());
+
return pWeb.release();
}
bool
_Web::OnTouchPressed(const _Control& source, const _TouchInfo& touchInfo)
{
+ evas_object_focus_set(GetWebNativeNode(), EINA_TRUE);
+
if (__pEflWebkit.get())
{
__edgeType = WEB_EDGE_NONE;
}
+void
+_Web::SetFullScreenEntered(bool isFullScreenEntered)
+{
+ __isFullScreenEntered = isFullScreenEntered;
+}
+
+
+bool
+_Web::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
+{
+ if (__isFullScreenEntered)
+ {
+ if (keyInfo.GetKeyCode() == _KEY_ESC || keyInfo.GetKeyCode() == _KEY_BACK)
+ {
+ __isFullScreenEntered = false;
+
+ ewk_view_fullscreen_exit(GetWebNativeNode());
+
+ return true;
+ }
+ }
+
+ return false;
+}
+
+
}}} // Tizen::Web::Controls
void SetEdgeReachedEvent(_WebEdgeType type);
+ void SetFullScreenEntered(bool isFullScreenEntered);
+
virtual result OnAttaching(const _Control* pParent);
virtual result OnBoundsChanging(const Tizen::Graphics::Rectangle& bounds);
virtual bool OnCaptureAcquire(Tizen::Graphics::BufferInfo& output);
virtual void OnCaptureReleased(void) {};
+ virtual bool OnKeyReleased(const Tizen::Ui::_Control& source, const Tizen::Ui::_KeyInfo& keyInfo);
+
private:
_Web(const _Web& value);
Tizen::Ui::_AccessibilityElement* __pTextElement;
Tizen::Graphics::FloatPoint __previousTouchedPosition;
+
+ bool __isFullScreenEntered;
}; // _Web
}}} // Tizen::Web::Controls
#include <FUiAnim_EflNode.h>
#include <FUiAnim_VisualElement.h>
#include <FUiCtrl_FooterImpl.h>
-#include <FUiCtrl_Form.h>
+#include <FUiCtrl_FormImpl.h>
#include "FWeb_HistoryItemImpl.h"
#include "FWebCtrl_AppControlListener.h"
#include "FWebCtrl_AuthConfirmPopup.h"
_WebImpl* pImpl = reinterpret_cast< _WebImpl* >(pUserData);
String msg(pMessage);
- MessageBox messageBox;
- r = messageBox.Construct(L"", msg, MSGBOX_STYLE_OKCANCEL);
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, EINA_FALSE, r, "[%s] Propagating.", GetErrorMessage(r));
-
- int modalResult = 0;
-
- r = messageBox.ShowAndWait(modalResult);
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, EINA_FALSE, r, "[%s] Propagating.", GetErrorMessage(r));
-
- if (modalResult == MSGBOX_RESULT_OK)
- {
- ewk_view_javascript_confirm_reply(pView, EINA_TRUE);
- }
- else
- {
- ewk_view_javascript_confirm_reply(pView, EINA_FALSE);
- }
+ r = pImpl->ShowUserConfirmPopupAsync(USER_SCRIPT_CONFIRM, pView, msg);
+ SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+ return EINA_TRUE;
+CATCH:
+ ewk_view_javascript_confirm_reply(pView, EINA_FALSE);
return EINA_TRUE;
}
Ewk_Certificate_Policy_Decision* pPolicy = reinterpret_cast< Ewk_Certificate_Policy_Decision* >(pEventInfo);
SysAssertf(pImpl && pPolicy, "Failed to request");
+ _Web* pWebCore = dynamic_cast< _Web* >(&(pImpl->GetCore()));
+
switch (pImpl->GetSetting().GetCertificateErrorHandlingMode())
{
case WEB_CERTIFICATE_ERROR_HANDLING_MODE_USER_CONFIRM:
{
r = pImpl->ShowCertificateConfirmPopup(CERTIFICATE_POPUP_MODE_USER_CONFIRM, pPolicy);
SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+ ewk_view_resume(pWebCore->GetWebNativeNode());
}
if (pImpl)
ewk_certificate_policy_decision_allowed_set(pPolicy, EINA_FALSE);
pImpl->SetCertificateConfirmed(false);
pImpl->SetCertificateRequested(true);
+
+ ewk_view_resume(pWebCore->GetWebNativeNode());
}
OnFullScreenEntered(void* pUserData, Evas_Object* pView, void* pEventInfo)
{
_WebImpl* pImpl = reinterpret_cast<_WebImpl*>(pUserData);
+ bool* pIsHandleNeeded = reinterpret_cast< bool* >(pEventInfo);
SysAssertf(pImpl, "Failed to request");
- SysLog(NID_WEB_CTRL, "Enter.");
+ _Web* pWebCore = dynamic_cast< _Web* >(&(pImpl->GetCore()));
+ SysAssertf(pWebCore, "Failed to get Web core object");
+
+ if (pIsHandleNeeded && *pIsHandleNeeded)
+ {
+ pWebCore->SetFullScreenEntered(true);
+ }
}
_WebImpl* pImpl = reinterpret_cast<_WebImpl*>(pUserData);
SysAssertf(pImpl, "Failed to request");
- SysLog(NID_WEB_CTRL, "Exit.");
+ _Web* pWebCore = dynamic_cast< _Web* >(&(pImpl->GetCore()));
+ SysAssertf(pWebCore, "Failed to get Web core object");
+
+ pWebCore->SetFullScreenEntered(false);
}
if (pImpl->GetLoadingListener() && ewk_frame_is_main_frame(ewk_policy_decision_frame_get(pPolicy))
&& !pImpl->IsRedirectRequested())
{
+ _Web* pWebCore = dynamic_cast< _Web* >(&(pImpl->GetCore()));
+ SysAssertf(pWebCore, "Failed to get Web core object");
+
+ pWebCore->SetFullScreenEntered(false);
+
pImpl->SetCertificateRequested(false);
if (pImpl->GetTextSearchListener())
else
{
String operationId(L"http://tizen.org/appcontrol/operation/view");
- String mime(ewk_policy_decision_response_mime_get(pPolicy));
- r = _AppControlImpl::FindAndStart(operationId, &url, &mime, null, null, null);
+ r = _AppControlImpl::FindAndStart(operationId, &url, null, null, null, null);
}
SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
{
ewk_policy_decision_ignore(pPolicy);
- _SelectBox selectBox;
- int selectedIndex = 0;
String operationId(L"http://tizen.org/appcontrol/operation/view");
r = _AppControlImpl::FindAndStart(operationId, &url, &mime, null, null, null);
if (r == E_OBJ_NOT_FOUND)
{
- r = selectBox.Construct(false, L"Select application", 1); //+1 for Downloader
- SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ _SelectBox* pSelectBox = new (std::nothrow) _SelectBox;
+ SysTryReturnVoidResult(NID_WEB_CTRL, pSelectBox, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
- selectBox.AddListItem(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_BODY_DOWNLOAD"), _SelectBox::LIST_ITEM_TYPE_NORMAL, false);
- r = selectBox.ShowAndWait(selectedIndex);
+ r = pSelectBox->Construct(false, L"Select application", 1, null, url);
SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
- if (selectedIndex == 0) //download
- {
- RequestId reqId = 0;
- DownloadRequest request(pUrl);
-
- _DownloadManagerImpl* pManagerImpl = _DownloadManagerImpl::GetInstance();
- SysTryReturnVoidResult(NID_WEB_CTRL, pManagerImpl, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
-
- r = pManagerImpl->Start(request, reqId);
- SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
- }
+ pSelectBox->AddListItem(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BODY_DOWNLOAD_ABB"), _SelectBox::LIST_ITEM_TYPE_NORMAL, false);
+ r = pSelectBox->ShowPopup();
+ SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
return;
}
-Eina_Bool
-OnSelectUploadFile(Evas_Object* pView, Eina_Bool multipleFile, Eina_List* pAcceptTypes, const char* pCapture, void* pUserData)
-{
- std::unique_ptr<_MediaSelectionListener> pMediaListener(new (std::nothrow) _MediaSelectionListener());
- SysTryReturn(NID_WEB_CTRL, pMediaListener.get(), EINA_TRUE, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
-
- pMediaListener->Construct(pView);
-
- HashMap extraData;
- result r = extraData.Construct();
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, EINA_TRUE, r, "[%s] Propagating.", GetErrorMessage(r));
-
- String isMultipleSelection(L"single");
- String mode(L"selectionType");
- String type(L"type");
- String fileType = L"*/*";
- String operationId = L"http://tizen.org/appcontrol/operation/pick";
-
- if (multipleFile)
- {
- isMultipleSelection.Append(L"multiple");
- }
-
- if (eina_list_count(pAcceptTypes) == 1)
- {
- String item((char*)eina_list_nth(pAcceptTypes, 0));
- String captureString(pCapture);
-
- if (item.StartsWith("image/",0))
- {
- if (captureString == L"camera")
- {
- fileType = L"image/jpg";
- operationId = L"http://tizen.org/appcontrol/operation/create_content";
- String typeKey = L"http://tizen.org/appcontrol/data/camera/allow_switch";
- String typeVal = L"false";
- extraData.Add(&typeKey, &typeVal);
- }
- else
- {
- fileType = L"image/*";
- String selectKey = L"http://tizen.org/appcontrol/data/selection_mode";
- extraData.Add(&selectKey, &isMultipleSelection);
- }
- }
- else if (item.StartsWith("audio/",0))
- {
- fileType = L"audio/*";
- //TO DO: as microphone is not supported yet. suggest to throw an exception
- //if (captureString == L"microphone")
- //{
- //operationId = L"http://tizen.org/appcontrol/operation/create_content";
- //}
- //else
- //{
- String selectKey = L"http://tizen.org/appcontrol/data/selection_mode";
- extraData.Add(&selectKey, &isMultipleSelection);
- //}
- }
- else if (item.StartsWith("video/",0))
- {
- if (captureString == L"camcorder")
- {
- fileType = L"video/3gpp";
- operationId = L"http://tizen.org/appcontrol/operation/create_content";
- String typeKey = L"http://tizen.org/appcontrol/data/camera/allow_switch";
- String typeVal = L"false";
- extraData.Add(&typeKey, &typeVal);
- }
- else
- {
- fileType = L"video/*";
- String selectKey = L"http://tizen.org/appcontrol/data/selection_mode";
- extraData.Add(&selectKey, &isMultipleSelection);
- }
- }
- }
-
- r = _AppControlImpl::FindAndStart(operationId, null, &fileType, null, &extraData, pMediaListener.get());
- SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-
- pMediaListener.release();
-
- return EINA_TRUE;
-
-CATCH:
- ewk_view_open_panel_reply(pView, null, EINA_FALSE);
- return EINA_TRUE;
-}
-
-
void
OnHandleJavaScriptRequest(void* pUserData, Evas_Object* pView, void* pEventInfo)
{
return;
}
- _Form* pFormCore = pImpl->GetParentFormCore(dynamic_cast< _Control* >(&pImpl->GetCore()));
- if (pFormCore)
+ _FormImpl* pFormImpl = pImpl->GetParentFormImpl(dynamic_cast< _ControlImpl* >(pImpl));
+ if (pFormImpl)
{
- pFormCore->DeflateClientRectHeight(pXformer->TransformVertical(rect.height));
+ pFormImpl->DeflateClientRectHeight(pXformer->TransformVertical(rect.height));
- if (pFormCore->HasFooter())
+ if (pFormImpl->HasFooter())
{
- pFormCore->SetKeypadShowState(true);
- pFormCore->Draw();
+ pFormImpl->GetCore().SetKeypadShowState(true);
+ pFormImpl->Draw();
}
}
_WebImpl* pImpl = reinterpret_cast< _WebImpl* >(pUserData);
SysAssertf(pImpl, "Failed to request");
- _Form* pFormCore = pImpl->GetParentFormCore(dynamic_cast< _Control* >(&pImpl->GetCore()));
- if (pFormCore)
+ _FormImpl* pFormImpl = pImpl->GetParentFormImpl(dynamic_cast< _ControlImpl* >(pImpl));
+ if (pFormImpl)
{
- pFormCore->DeflateClientRectHeight(0);
+ pFormImpl->DeflateClientRectHeight(0);
- if (pFormCore->HasFooter())
+ if (pFormImpl->HasFooter())
{
- pFormCore->SetKeypadShowState(false);
- pFormCore->Draw();
+ pFormImpl->GetCore().SetKeypadShowState(false);
+ pFormImpl->Draw();
}
}
if (pImpl->IsKeypadOpened() == true)
{
- pImpl->SetKeypadOpened(false);
+ pImpl->SetKeypadOpened(false);
}
}
, __pGeolocationConfirmPopup(null)
, __pNotificationConfirmPopup(null)
, __pScriptAlertConfirmPopup(null)
+ , __pScriptConfirmPopup(null)
, __pAppCacheConfirmPopup(null)
, __pDbQuotaConfirmPopup(null)
, __pLocalFsQuotaConfirmPopup(null)
, __policy(WEB_DECISION_CONTINUE)
, __defaultUserAgent(L"")
, __pFormDataList(null)
+ , __popupClosed(false)
{
__textSearch.__searchAll = false;
__textSearch.__searchForward = true;
_WebImpl::~_WebImpl()
{
- _WebManager* pWebManager = _WebManager::GetInstance();
- pWebManager->RemoveWeb(reinterpret_cast< int >(this));
-
_DownloadManagerImpl* pManagerImpl = _DownloadManagerImpl::GetInstance();
pManagerImpl->SetDownloadListener(null);
+ _WebManager* pWebManager = _WebManager::GetInstance();
+ pWebManager->RemoveWeb(reinterpret_cast< int >(this));
+
RemoveEventListenerCallback();
+
ClearCertificateDb();
}
__pWebCore = dynamic_cast< _Web* >(&(GetCore()));
SysTryReturnResult(NID_WEB_CTRL, __pWebCore, E_SYSTEM, "A system error has been occurred. Failed to get web control");
- _WebManager* pWebManager = _WebManager::GetInstance();
- pWebManager->AddWeb(reinterpret_cast< int >(this));
-
return E_SUCCESS;
}
__pSelectBox.reset();
+ Resume();
+
return E_SUCCESS;
}
ewk_view_script_execute(pView, pScript.get(), OnScriptExecuted, pPresenter.get());
- std::unique_ptr<String> pResult(new (std::nothrow) String(L""));
- SysTryReturn(NID_WEB_CTRL, pResult.get(), null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+ String* pResult = new (std::nothrow) String(L"");
+ SysTryReturn(NID_WEB_CTRL, pResult, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
- pPresenter->WaitAsyncProcess(*pResult.get());
+ pPresenter->WaitAsyncProcess(*pResult);
- return pResult.release();
+ return pResult;
}
std::unique_ptr<char[]> pText(_StringConverter::CopyToCharArrayN(text));
SysTryReturn(NID_WEB_CTRL, pText.get(), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ Ewk_Settings* pSettings = ewk_view_settings_get(__pWebCore->GetWebNativeNode());
+ SysAssertf(pSettings, "Failed to get webkit instance.");
+ ewk_settings_clear_text_selection_automatically_set(pSettings, true);
+
switch (type)
{
case SEARCH_SYNC:
evas_object_smart_callback_add(pWebNativeNode, "fullscreen,enterfullscreen", OnFullScreenEntered, this);
evas_object_smart_callback_add(pWebNativeNode, "fullscreen,exitfullscreen", OnFullScreenExited, this);
- ewk_view_open_panel_callback_set(pWebNativeNode, OnSelectUploadFile, const_cast< _WebImpl* >(this));
Ewk_Context* pContext = ewk_view_context_get(pWebNativeNode);
SysAssertf(pContext, "Failed to get webkit instance.");
ewk_context_did_start_download_callback_set(pContext, OnDidStartDownloadCallback, const_cast< _WebImpl* >(this));
evas_object_smart_callback_del(pWebNativeNode, "geolocation,permission,request", OnGeolocationPermissionRequested);
- ewk_view_javascript_alert_callback_set(null, null, null);
- ewk_view_javascript_prompt_callback_set(null, null, null);
- ewk_view_javascript_confirm_callback_set(null, null, null);
+ ewk_view_javascript_alert_callback_set(pWebNativeNode, null, null);
+ ewk_view_javascript_prompt_callback_set(pWebNativeNode, null, null);
+ ewk_view_javascript_confirm_callback_set(pWebNativeNode, null, null);
evas_object_smart_callback_del(pWebNativeNode, "policy,response,decide", OnWebDataReceived);
evas_object_smart_callback_del(pWebNativeNode, "fullscreen,enterfullscreen", OnFullScreenEntered);
evas_object_smart_callback_del(pWebNativeNode, "fullscreen,exitfullscreen", OnFullScreenExited);
- ewk_view_open_panel_callback_set(null, null, null);
Ewk_Context* pContext = ewk_view_context_get(pWebNativeNode);
SysAssertf(pContext, "Failed to get webkit instance.");
ewk_context_vibration_client_callbacks_set(pContext, null, null, null);
{
Point absPoint( _CoordinateSystemUtils::ConvertToInteger(__pWebCore->GetAbsoluteCoordinate(startPoint)));
+ Ewk_Settings* pSettings = ewk_view_settings_get(__pWebCore->GetWebNativeNode());
+ SysAssertf(pSettings, "Failed to get webkit instance.");
+ ewk_settings_clear_text_selection_automatically_set(pSettings, true);
+
Eina_Bool ret = pSmartData->api->text_selection_down(pSmartData, absPoint.x, absPoint.y);
if (ret)
{
std::unique_ptr<_UserConfirmPopup> pUserConfirmPopup(new (std::nothrow) _UserConfirmPopup());
SysTryReturnResult(NID_WEB_CTRL, pUserConfirmPopup.get(), E_OUT_OF_MEMORY, "Memory Allocation failed.");
- r = pUserConfirmPopup->Construct(userConfirmMode, pPolicy, true, msg);
+ r = pUserConfirmPopup->Construct(userConfirmMode, pPolicy, this, true, msg);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
int modalResult = 0;
{
case USER_CONTENT_HANDLER:
{
- __pContentHandlerConfirmPopup.reset();
-
__pContentHandlerConfirmPopup = std::move(pUserConfirmPopup);
r = __pContentHandlerConfirmPopup->ShowAndWait(modalResult);
SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, __pContentHandlerConfirmPopup.reset(), r, "[%s] Propagating.", GetErrorMessage(r));
+
+ __pContentHandlerConfirmPopup.reset();
+
+ ewk_view_resume(__pWebCore->GetWebNativeNode());
+
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));
+
+ __pProtocolHandlerConfirmPopup.reset();
+
+ ewk_view_resume(__pWebCore->GetWebNativeNode());
+
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));
+
+ __pAppCacheConfirmPopup.reset();
+
+ ewk_view_resume(__pWebCore->GetWebNativeNode());
+
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));
+
+ __pDbQuotaConfirmPopup.reset();
+
+ ewk_view_resume(__pWebCore->GetWebNativeNode());
+
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));
+
+ __pLocalFsQuotaConfirmPopup.reset();
+
+ ewk_view_resume(__pWebCore->GetWebNativeNode());
+
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));
+
+ __pIndexedDbQuotaConfirmPopup.reset();
+
+ ewk_view_resume(__pWebCore->GetWebNativeNode());
+
break;
}
default:
std::unique_ptr<_UserConfirmPopup> pUserConfirmPopup(new (std::nothrow) _UserConfirmPopup());
SysTryReturnResult(NID_WEB_CTRL, pUserConfirmPopup.get(), E_OUT_OF_MEMORY, "Memory Allocation failed.");
- r = pUserConfirmPopup->Construct(userConfirmMode, pPolicy, false, msg);
+ r = pUserConfirmPopup->Construct(userConfirmMode, pPolicy, this, false, msg);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
switch(userConfirmMode)
{
case USER_CONFIRM_USERMEDIA:
- {
+ {
__pUserMediaConfirmPopup.reset();
__pUserMediaConfirmPopup = std::move(pUserConfirmPopup);
__pScriptAlertConfirmPopup.release();
break;
}
+ case USER_SCRIPT_CONFIRM:
+ {
+ __pScriptConfirmPopup.reset();
+
+ __pScriptConfirmPopup = std::move(pUserConfirmPopup);
+
+ r = __pScriptConfirmPopup->ShowPopup();
+ SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, __pScriptConfirmPopup.reset(), r, "[%s] Propagating.", GetErrorMessage(r));
+
+ __pScriptConfirmPopup.release();
+
+ break;
+ }
default:
break;
}
}
-_Form*
-_WebImpl::GetParentFormCore(_Control* pControlCore)
+_FormImpl*
+_WebImpl::GetParentFormImpl(_ControlImpl* pControlImpl)
{
String parentName;
- _Form* pFormCore = null;
+ _FormImpl* pFormImpl = null;
- _Control* pParentControlCore = dynamic_cast< _Control* >(pControlCore->GetParent());
- if (!pParentControlCore)
+ _ControlImpl* pParentControlImpl = dynamic_cast< _ControlImpl* >(pControlImpl->GetParent());
+ if (!pParentControlImpl)
{
return null;
}
- pFormCore = dynamic_cast< _Form* >(pParentControlCore);
- if (pFormCore)
+ pFormImpl = dynamic_cast< _FormImpl* >(pParentControlImpl);
+ if (pFormImpl)
{
- return pFormCore;
+ return pFormImpl;
}
- return GetParentFormCore(pParentControlCore);
+ return GetParentFormImpl(pParentControlImpl);
}
bool
_WebImpl::OnFocusGained(const _ControlImpl& source)
{
+ Ewk_Settings* pSettings = ewk_view_settings_get(__pWebCore->GetWebNativeNode());
+ SysAssertf(pSettings, "Failed to get webkit instance.");
+ ewk_settings_clear_text_selection_automatically_set(pSettings, true);
+
return false;
}
SetKeypadVisibleState(false);
}
+ Ewk_Settings* pSettings = ewk_view_settings_get(__pWebCore->GetWebNativeNode());
+ SysAssertf(pSettings, "Failed to get webkit instance.");
+ ewk_settings_clear_text_selection_automatically_set(pSettings, false);
+
evas_object_focus_set(__pWebCore->GetWebNativeNode(), EINA_FALSE);
return false;
{
result r = E_SUCCESS;
- r = __pWebCore->InitializeWebNativeNode();
- SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ if (IsVisible() == true)
+ {
+ _WebManager* pWebManager = _WebManager::GetInstance();
+ pWebManager->SetActiveWeb(this);
+ }
- r = InitializeSetting();
+ r = _ContainerImpl::OnPreAttachedToMainTree();
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- r = _ContainerImpl::OnPreAttachedToMainTree();
+ if (!HasValidNativeNode())
+ {
+ r = __pWebCore->InitializeWebNativeNode();
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ _ControlManager* pControlManager = _ControlManager::GetInstance();
+ SysTryReturnResult(NID_WEB_CTRL, pControlManager, E_SYSTEM, "Failed to get the ControlManager instance.");
+ OnChangeLayout(pControlManager->GetScreenRotation());
+
+ r = InitializeSetting();
+ SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+ _WebManager* pWebManager = _WebManager::GetInstance();
+ pWebManager->AddWeb(reinterpret_cast< int >(this));
+ }
+
+ return E_SUCCESS;
+}
+
+
+result
+_WebImpl::OnDetachingFromMainTree(void)
+{
+ result r = E_SUCCESS;
+
+ _WebManager* pWebManager = _WebManager::GetInstance();
+ pWebManager->RemoveActiveWeb(this);
+
+ r = _ContainerImpl::OnDetachingFromMainTree();
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
void
_WebImpl::OnAncestorVisibleStateChanged(const _Control& control)
{
+ _WebManager* pWebManager = _WebManager::GetInstance();
if (IsVisible() == true)
{
+ pWebManager->SetActiveWeb(this);
ewk_view_page_visibility_state_set(__pWebCore->GetWebNativeNode(), EWK_PAGE_VISIBILITY_STATE_VISIBLE, false);
}
else
{
+ pWebManager->RemoveActiveWeb(this);
ewk_view_page_visibility_state_set(__pWebCore->GetWebNativeNode(), EWK_PAGE_VISIBILITY_STATE_HIDDEN, false);
}
}
case ID_USER_SCRIPT_ALERT_CLOSE:
__pScriptAlertConfirmPopup.reset();
break;
+ case ID_USER_SCRIPT_CONFIRM_CLOSE:
+ __pScriptConfirmPopup.reset();
+ break;
default:
break;
}
+
+ Resume();
}
{
__pColorPicker.reset();
+ Resume();
+
return EINA_TRUE;
}
if (__pColorPicker)
{
__pColorPicker.reset();
+ Resume();
}
return r;
if (__pDatePicker)
{
__pDatePicker.reset();
+ Resume();
}
return r;
*/\r
\r
#include <FBaseSysLog.h>\r
+#include <FUiControl.h>\r
+#include <FUiCtrl_FormImpl.h>\r
#include "FWebCtrl_WebImpl.h"\r
#include "FWebCtrl_WebManager.h"\r
+#include "FWebCtrl_WebPopup.h"\r
\r
using namespace Tizen::Base;\r
using namespace Tizen::Base::Collection;\r
+using namespace Tizen::Ui;\r
+using namespace Tizen::Ui::Controls;\r
\r
namespace Tizen { namespace Web { namespace Controls\r
{\r
_WebManager::_WebManager(void)\r
: __pWebList(null)\r
, __pCallbackList(null)\r
+ , __pActiveWeb(null)\r
+ , __pActivePopup(null)\r
{\r
}\r
\r
return ret;\r
}\r
\r
+void\r
+_WebManager::SetActiveWeb(Tizen::Web::Controls::_WebImpl* pWebAddress)\r
+{\r
+ if (__pActiveWeb == null)\r
+ {\r
+ __pActiveWeb = pWebAddress;\r
+ }\r
+ else\r
+ {\r
+ if (__pActiveWeb->IsVisible() == true)\r
+ {\r
+ return;\r
+ }\r
+ __pActiveWeb = pWebAddress;\r
+ }\r
+\r
+ if (__pActivePopup != null)\r
+ {\r
+ __pActivePopup->SetShowState(false);\r
+\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
+ }\r
+}\r
+\r
+void\r
+_WebManager::RemoveActiveWeb(Tizen::Web::Controls::_WebImpl* pWebAddress)\r
+{\r
+ if (__pActiveWeb == pWebAddress)\r
+ {\r
+ __pActiveWeb = null;\r
+ }\r
+}\r
+\r
+void\r
+_WebManager::SetActivePopup(Tizen::Web::Controls::_WebPopup* pPopupAddress)\r
+{\r
+ __pActivePopup = pPopupAddress;\r
+}\r
+\r
+void\r
+_WebManager::RemoveActivePopup(Tizen::Web::Controls::_WebPopup* pPopupAddress)\r
+{\r
+ if (__pActivePopup == pPopupAddress)\r
+ {\r
+ __pActivePopup = null;\r
+ }\r
+}\r
+\r
} } }\r
namespace Tizen { namespace Web { namespace Controls\r
{\r
class _WebImpl;\r
+class _WebPopup;\r
\r
class _WebManager\r
: public Tizen::Base::Object\r
result RemoveCallback(int callerAdress, int callbackAdress);\r
bool IsValidCallback(int callerAdress, int callbackAdress) const;\r
\r
+ void SetActiveWeb(Tizen::Web::Controls::_WebImpl* pWebAddress);\r
+ void RemoveActiveWeb(Tizen::Web::Controls::_WebImpl* pWebAddress);\r
+ void SetActivePopup(Tizen::Web::Controls::_WebPopup* pPopupAddress);\r
+ void RemoveActivePopup(Tizen::Web::Controls::_WebPopup* pPopupAddress);\r
+\r
private:\r
_WebManager(void);\r
_WebManager(const _WebManager& rhs);\r
private:\r
std::unique_ptr<Tizen::Base::Collection::ArrayListT< int > > __pWebList;\r
std::unique_ptr<Tizen::Base::Collection::MultiHashMapT< int, int > > __pCallbackList;\r
+\r
+ _WebImpl* __pActiveWeb;\r
+ _WebPopup* __pActivePopup;\r
};\r
\r
} } }\r
#endif\r
\r
-
\ No newline at end of file
+ \r
#include <FUiCtrlPanel.h>
#include <FUiVerticalBoxLayout.h>
#include <FUi_ResourceManager.h>
+#include "FWebCtrl_WebManager.h"
#include "FWebCtrl_WebPopup.h"
_WebPopup::~_WebPopup(void)
{
- if (IsModalPopup() == true)
+ if (IsModalPopup())
{
- HidePopup(0);
+ HidePopup();
}
-
__pWebPopupData.reset();
}
{
result r = E_SUCCESS;
+ _WebManager* pWebManager = _WebManager::GetInstance();
+ pWebManager->SetActivePopup(this);
+
r = SetShowState(true);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
r = SetShowState(false);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ _WebManager* pWebManager = _WebManager::GetInstance();
+ pWebManager->RemoveActivePopup(this);
+
if (__isModal)
{
__modal = modalResult;
result
_WebPopup::ShowAndWait(int& modalResult)
{
+ _WebManager* pWebManager = _WebManager::GetInstance();
+ pWebManager->SetActivePopup(this);
+
__isModal = true;
return DoModal(modalResult);
}
+result
+_WebPopup::OnTerminating(void)
+{
+ return E_SUCCESS;
+}
+
+
}}} // Tizen::Web::Controls
#include <EWebKit2.h>
#include <unique_ptr.h>
+#include <FBaseColIList.h>
#include <FBaseString.h>
#include <FUiIPropagatedKeyEventListener.h>
#include "FWebCtrl_WebPopup.h"
namespace Tizen { namespace Web { namespace Controls
{
+class _WebImpl;
enum _IdButtonCertificatePopup
{
*/
virtual ~_CertificateConfirmPopup(void);
- result Construct(_CertificatePopupMode certPopupMode, Ewk_Certificate_Policy_Decision* pPolicy);
+ 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;
+ _CertificateConfirmPopup* __pParent;
+ std::unique_ptr<_CertificateConfirmPopup> __pCertificatePopup;
}; // _CertificateConfirmPopup
}}} // Tizen::Web::Controls
namespace Tizen { namespace Web { namespace Controls
{
+class _WebImpl;
enum _UserConfirmPopupButtonId
{
USER_CONFIRM_GEOLOCATION,
USER_CONFIRM_NOTIFICATION,
USER_SCRIPT_ALERT,
+ USER_SCRIPT_CONFIRM,
USER_CONFIRM_APP_CACHE,
USER_CONFIRM_DB_QUOTA_EXCEDED,
USER_CONFIRM_LOCAL_FS_QUOTA_EXCEDED,
*/
virtual ~_UserConfirmPopup(void);
- result Construct(_UserConfirmMode userConfirmMode, void* pEventInfo, bool sync = false, Tizen::Base::String msg = L"");
+ result Construct(_UserConfirmMode userConfirmMode, void* pEventInfo, Tizen::Web::Controls::_WebImpl* pImpl, bool sync = false, Tizen::Base::String msg = L"");
virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
Tizen::Ui::Controls::CheckButton* __pCheckButton;
bool __sync;
+ Tizen::Web::Controls::_WebImpl* __pImpl;
}; // _UserConfirmPopup
}}} // Tizen::Web::Controls
namespace Tizen { namespace Ui
{
-class Contorl;
-class _Contorl;
-class _ContorlImpl;
+class Control;
+class _Control;
+class _ControlImpl;
}} // Tizen::Ui
namespace Tizen { namespace Ui { namespace Controls
{
class Keypad;
-class _Form;
+class _FormImpl;
}}} // Tizen::Ui::Controls
namespace Tizen { namespace Web { namespace Json
ID_USER_CONFIRM_USERMEDIA_CLOSE,
ID_USER_CONFIRM_GEOLOCATION_CLOSE,
ID_USER_CONFIRM_NOTIFICATION_CLOSE,
- ID_USER_SCRIPT_ALERT_CLOSE
+ ID_USER_SCRIPT_ALERT_CLOSE,
+ ID_USER_SCRIPT_CONFIRM_CLOSE
};
class _OSP_EXPORT_ _WebImpl
result ShowUserConfirmPopup(_UserConfirmMode userConfirmMode, void* pPolicy, Tizen::Base::String msg = L"");
result ShowUserConfirmPopupAsync(_UserConfirmMode userConfirmMode, void* pPolicy, Tizen::Base::String msg = L"");
- Tizen::Ui::Controls::_Form* GetParentFormCore(Tizen::Ui::_Control* pControlCore);
+ Tizen::Ui::Controls::_FormImpl* GetParentFormImpl(Tizen::Ui::_ControlImpl* pControlImpl);
result ShowSelectBoxPopup(bool isMultiSelect, const Tizen::Base::String& title, Eina_List* pItems, Evas_Object* pWebView, int selectedIndex);
result UpdateSelectBoxPopup(Eina_List* pItems, int selectedIndex, bool isGroupedList);
virtual result OnPreAttachedToMainTree(void);
+ virtual result OnDetachingFromMainTree(void);
+
virtual void OnChangeLayout(Tizen::Ui::_ControlRotation rotation);
virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation);
std::unique_ptr<_UserConfirmPopup> __pGeolocationConfirmPopup;
std::unique_ptr<_UserConfirmPopup> __pNotificationConfirmPopup;
std::unique_ptr<_UserConfirmPopup> __pScriptAlertConfirmPopup;
+ std::unique_ptr<_UserConfirmPopup> __pScriptConfirmPopup;
std::unique_ptr<_UserConfirmPopup> __pAppCacheConfirmPopup;
std::unique_ptr<_UserConfirmPopup> __pDbQuotaConfirmPopup;
std::unique_ptr<_UserConfirmPopup> __pLocalFsQuotaConfirmPopup;
Tizen::Base::String __defaultUserAgent;
Eina_List* __pFormDataList;
+
+ bool __popupClosed;
}; // _WebImpl
}}} // Tizen::Web::Controls
_WebPopup& operator =(const _WebPopup& source);
+ virtual result OnTerminating(void);
+
private:
static std::unique_ptr<_WebPopupData> __pWebPopupData;
bool __isModal;