2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FWebCtrl_UserConfirmPopup.cpp
20 * @brief The file contains the definition of _UserConfirmPopup class.
24 #include <FBaseColArrayList.h>
25 #include <FBaseSysLog.h>
26 #include <FBaseUtilUri.h>
27 #include <FGrpDimension.h>
29 #include <FGrpRectangle.h>
30 #include <FIoDbEnumerator.h>
31 #include <FIoDbStatement.h>
32 #include <FSecCertX509Certificate.h>
33 #include <FUiCtrlButton.h>
34 #include <FUiCtrlLabel.h>
35 #include <FUiCtrlPanel.h>
36 #include <FUiCtrlScrollPanel.h>
37 #include <FUiKeyEventInfo.h>
38 #include <FUiLayout.h>
39 #include <FUiVerticalBoxLayout.h>
40 #include <FGrp_TextTextObject.h>
41 #include <FGrp_TextTextSimple.h>
42 #include <FIo_DatabaseImpl.h>
43 #include <FSys_SystemResource.h>
44 #include <FUi_ControlManager.h>
45 #include <FUi_ResourceManager.h>
46 #include "FWebCtrl_EflWebkit.h"
47 #include "FWebCtrl_UserConfirmPopup.h"
48 #include "FWebCtrl_Utility.h"
49 #include "FWebCtrl_WebImpl.h"
52 using namespace Tizen::Base;
53 using namespace Tizen::Base::Collection;
54 using namespace Tizen::Base::Utility;
55 using namespace Tizen::Graphics;
56 using namespace Tizen::Graphics::_Text;
57 using namespace Tizen::Io;
58 using namespace Tizen::Security::Cert;
59 using namespace Tizen::System;
60 using namespace Tizen::Ui;
61 using namespace Tizen::Ui::Controls;
64 namespace Tizen { namespace Web { namespace Controls
68 static const int TEXT_SIZE_ADJUST = 1;
71 _UserConfirmPopup::_UserConfirmPopup(void)
72 : __pUserPolicyData(null)
73 , __userConfirmMode(USER_CONFIRM_USERMEDIA)
74 , __pCheckButton(null)
75 , __isUserActionNeeded(false)
82 _UserConfirmPopup::~_UserConfirmPopup(void)
84 if (__isUserActionNeeded == true)
86 HandleUserAction(EINA_FALSE);
87 __isUserActionNeeded = false;
93 _UserConfirmPopup::Construct(_UserConfirmMode userConfirmMode, void* pEventInfo, Tizen::Web::Controls::_WebImpl* pImpl, bool sync, String msg)
96 SysTryReturnResult(NID_WEB_CTRL, pEventInfo, E_INVALID_ARG, "Invalid argument(s) is used. pPolicy is null.");
97 SysTryReturnResult(NID_WEB_CTRL, userConfirmMode >= USER_CONFIRM_USERMEDIA && userConfirmMode <= USER_CONFIRM_INDEXED_DB_QUOTA_EXCEDED, E_INVALID_ARG,
98 "Invalid userConfirmMode is used. [%d]", userConfirmMode);
100 _SystemResource* pSysResource = _SystemResource::GetInstance();
101 SysAssertf(pSysResource != null, "Failed to get _SystemResource instance");
103 _WebPopupData* pPopupData = _WebPopup::GetPopupData();
104 SysTryReturn(NID_WEB_CTRL, pPopupData, r = GetLastResult(), r, "[%s] Propagating.", GetErrorMessage(r));
106 __pUserPolicyData = pEventInfo;
107 __userConfirmMode = userConfirmMode;
110 __isUserActionNeeded = true;
112 bool hasTitle = true;
113 int popupMaxHeight = 2*pPopupData->labelDim.height + pPopupData->panelHeight;
116 SysAssertf(__pImpl != null, "Failed to get _WebImpl");
118 if (__userConfirmMode == USER_CONFIRM_GEOLOCATION)
120 popupMaxHeight += pPopupData->checkDim.height;
123 if (__userConfirmMode == USER_SCRIPT_ALERT)
128 r = _WebPopup::Construct(hasTitle, Dimension(pPopupData->popupDim.width, popupMaxHeight));
129 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
131 if (userConfirmMode != USER_SCRIPT_ALERT)
133 SetTitleText(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_HEADER_SECURITY_WARNING_ABB"));
136 String message = L"";
137 if (userConfirmMode >= USER_SCRIPT_ALERT && userConfirmMode <= USER_CONFIRM_INDEXED_DB_QUOTA_EXCEDED)
143 message = GetMessageFromPolicy();
146 Rectangle rect(0, 0, 0, 0);
149 rect.height = 2*pPopupData->labelDim.height;
150 rect.width = pPopupData->labelDim.width;
152 //With the font of label and width of label, required height is calculated
153 // using textobject. TEXT_SIZE_ADJUST is used to increase font size and get bigger height
154 // as the accurate height is not fitting text in some cases.
156 r = font.Construct(FONT_STYLE_PLAIN, pPopupData->labelFontSize + TEXT_SIZE_ADJUST);
157 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
159 std::unique_ptr<TextObject> pTextObject(new (std::nothrow) TextObject());
160 SysTryReturnResult(NID_WEB_CTRL, pTextObject.get(), E_OUT_OF_MEMORY, "Memory Allocation failed.");
162 r = pTextObject->Construct();
163 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
165 std::unique_ptr<TextSimple> pSimpleText(new (std::nothrow) TextSimple(message.GetPointer(), message.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL, &font));
166 SysTryReturnResult(NID_WEB_CTRL, pSimpleText.get(), E_OUT_OF_MEMORY, "Memory Allocation failed.");
168 r = pTextObject->AppendElement(*pSimpleText);
169 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
171 pSimpleText.release();
173 r = pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD);
174 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
176 r = pTextObject->SetBounds(rect);
177 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
179 r = pTextObject->SetFont(&font, 0, message.GetLength());
180 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
182 r = pTextObject->Compose();
183 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
185 int labelHeight = pTextObject->GetTotalHeight();
187 std::unique_ptr<Label> pLabel(new (std::nothrow) Label());
188 SysTryReturnResult(NID_WEB_CTRL, pLabel.get(), E_OUT_OF_MEMORY, "Memory Allocation failed.");
190 r = pLabel->Construct(rect, message);
191 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
193 pLabel->SetTextConfig(pPopupData->labelFontSize, LABEL_TEXT_STYLE_NORMAL);
195 Control* pInfoLabel = null;
197 if (rect.height < labelHeight)
199 //message text is bigger than label, scroll is created to accomodate it.
200 std::unique_ptr<ScrollPanel> pScrollPanel(new (std::nothrow) ScrollPanel());
201 SysTryReturnResult(NID_WEB_CTRL, pScrollPanel.get(), E_OUT_OF_MEMORY, "Memory Allocation failed.");
203 r = pScrollPanel->Construct(rect);
204 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
206 r = AddControl(*pScrollPanel);
207 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
209 ScrollPanel* pSPanel = pScrollPanel.release();
211 r = pLabel->SetSize(Dimension(rect.width, labelHeight));
212 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
214 r = pSPanel->AddControl(*pLabel);
215 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
218 pInfoLabel = pSPanel;
222 r = AddControl(*pLabel);
223 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
225 pInfoLabel = pLabel.release();
229 if (__userConfirmMode == USER_CONFIRM_GEOLOCATION)
232 rect.height = pPopupData->checkDim.height;
234 std::unique_ptr<CheckButton> pCheckButton (new (std::nothrow) CheckButton());
235 SysTryReturnResult(NID_WEB_CTRL, pCheckButton.get(), E_OUT_OF_MEMORY, "Memory Allocation failed.");
237 r = pCheckButton->Construct(Rectangle(0, 0, rect.width, rect.height), CHECK_BUTTON_STYLE_MARK, BACKGROUND_STYLE_NONE, false, pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_BODY_REMEMBER_PREFERENCE"));
238 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
240 r = AddControl(*pCheckButton);
241 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
243 __pCheckButton = pCheckButton.release();
246 Panel* pButtonPanel = CreateAndAddPanel();
247 SysTryReturn(NID_WEB_CTRL, pButtonPanel, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
250 r = idList.Construct();
251 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
254 r = titleList.Construct();
255 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
257 if (userConfirmMode == USER_SCRIPT_ALERT)
259 idList.Add(*(new Integer(ID_BUTTON_USER_ALLOW)));
260 titleList.Add(*(new String(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BUTTON_OK"))));
264 idList.Add(*(new Integer(ID_BUTTON_USER_CANCEL)));
265 idList.Add(*(new Integer(ID_BUTTON_USER_ALLOW)));
266 titleList.Add(*(new String(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BUTTON_CANCEL_ABB"))));
267 titleList.Add(*(new String(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BUTTON_CONTINUE_ABB"))));
270 r = CreateAndAddButtons(idList, titleList, pButtonPanel);
271 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
273 std::unique_ptr<VerticalBoxLayout> pLayout(dynamic_cast< VerticalBoxLayout* >(GetLayoutN()));
274 SysTryReturn(NID_WEB_CTRL, pLayout.get(), r = GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
276 pLayout->SetHorizontalAlignment(*pInfoLabel, LAYOUT_HORIZONTAL_ALIGN_CENTER);
277 if (__userConfirmMode == USER_CONFIRM_GEOLOCATION)
279 pLayout->SetHorizontalAlignment(*__pCheckButton, LAYOUT_HORIZONTAL_ALIGN_CENTER);
282 SetPropagatedKeyEventListener(this);
288 _UserConfirmPopup::OnActionPerformed(const Control& source, int actionId)
290 result r = E_SUCCESS;
294 case ID_BUTTON_USER_ALLOW:
295 HandleUserAction(EINA_TRUE);
298 case ID_BUTTON_USER_CANCEL:
299 HandleUserAction(EINA_FALSE);
309 SysLogException(NID_WEB_CTRL, r, "[%s] Propagating.", GetErrorMessage(r));
314 switch(__userConfirmMode)
316 case USER_CONFIRM_USERMEDIA:
318 __pImpl->SendUserEvent(ID_USER_CONFIRM_USERMEDIA_CLOSE, null);
321 case USER_CONFIRM_GEOLOCATION:
323 __pImpl->SendUserEvent(ID_USER_CONFIRM_GEOLOCATION_CLOSE, null);
326 case USER_CONFIRM_NOTIFICATION:
328 __pImpl->SendUserEvent(ID_USER_CONFIRM_NOTIFICATION_CLOSE, null);
331 case USER_SCRIPT_ALERT:
333 __pImpl->SendUserEvent(ID_USER_SCRIPT_ALERT_CLOSE, null);
336 case USER_SCRIPT_CONFIRM:
338 __pImpl->SendUserEvent(ID_USER_SCRIPT_CONFIRM_CLOSE, null);
349 _UserConfirmPopup::GetMessageFromPolicy(void)
351 _SystemResource* pSysResource = _SystemResource::GetInstance();
352 SysAssertf(pSysResource != null, "Failed to get _SystemResource instance");
356 switch(__userConfirmMode)
358 case USER_CONFIRM_USERMEDIA:
360 message = L"Do you want to allow acccess to media?\n";
363 case USER_PROTOCOL_HANDLER:
365 Ewk_Custom_Handlers_Data* pHandlerData = reinterpret_cast< Ewk_Custom_Handlers_Data* >(__pUserPolicyData);
366 SysAssertf(pHandlerData, "Failed to request");
368 String target(ewk_custom_handlers_data_target_get(pHandlerData));
369 String baseUri(ewk_custom_handlers_data_base_url_get(pHandlerData));
371 message = baseUri + String(L" is asking to register ") + target + String(L" protocol handler.");
374 case USER_CONTENT_HANDLER:
376 Ewk_Custom_Handlers_Data* pHandlerData = reinterpret_cast< Ewk_Custom_Handlers_Data* >(__pUserPolicyData);
377 SysAssertf(pHandlerData, "Failed to request");
379 String target(ewk_custom_handlers_data_target_get(pHandlerData));
380 String baseUri(ewk_custom_handlers_data_base_url_get(pHandlerData));
382 message = String(baseUri) + String(L" is asking to register ") + String(target) + String(L" content handler.");
385 case USER_CONFIRM_GEOLOCATION:
387 Ewk_Geolocation_Permission_Request* pGeoLocPermReq = reinterpret_cast< Ewk_Geolocation_Permission_Request* >(__pUserPolicyData);
388 const Ewk_Security_Origin* pSecurityOrigin = ewk_geolocation_permission_request_origin_get(pGeoLocPermReq);
390 message = _Utility::CreateOrigin(pSecurityOrigin);
391 message.Append(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_BODY_PS_REQUESTS_YOUR_LOCATION"));
394 case USER_CONFIRM_NOTIFICATION:
396 Ewk_Notification_Permission_Request* pPermissionRequest = reinterpret_cast< Ewk_Notification_Permission_Request* >(__pUserPolicyData);
397 const Ewk_Security_Origin* pSecurityOrigin = ewk_notification_permission_request_origin_get(pPermissionRequest);
398 message = _Utility::CreateOrigin(pSecurityOrigin);
399 message.Append(L" wants to display notifications");
411 _UserConfirmPopup::HandleUserAction(Eina_Bool allow)
413 switch (__userConfirmMode)
415 case USER_CONFIRM_USERMEDIA:
417 Ewk_User_Media_Permission_Request* pPolicy = reinterpret_cast< Ewk_User_Media_Permission_Request* >(__pUserPolicyData);
418 ewk_user_media_permission_request_set(pPolicy, allow);
421 case USER_PROTOCOL_HANDLER:
423 RegisterHandler(false, allow);
426 case USER_CONTENT_HANDLER:
428 RegisterHandler(true, allow);
431 case USER_CONFIRM_GEOLOCATION:
433 Ewk_Geolocation_Permission_Request* pPolicy = reinterpret_cast< Ewk_Geolocation_Permission_Request* >(__pUserPolicyData);
434 if (__pCheckButton->IsSelected())
436 result r = AddGeolocationDb(pPolicy, static_cast < bool >(allow));
437 SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
440 ewk_geolocation_permission_request_set(pPolicy, allow);
443 case USER_CONFIRM_NOTIFICATION:
445 Ewk_Notification_Permission_Request* pPermissionRequest = reinterpret_cast< Ewk_Notification_Permission_Request* >(__pUserPolicyData);
446 ewk_notification_permission_request_set(pPermissionRequest, allow);
449 case USER_SCRIPT_ALERT:
451 Evas_Object* pView = reinterpret_cast< Evas_Object* >(__pUserPolicyData);
452 ewk_view_javascript_alert_reply(pView);
455 case USER_SCRIPT_CONFIRM:
457 Evas_Object* pView = reinterpret_cast< Evas_Object* >(__pUserPolicyData);
458 ewk_view_javascript_confirm_reply(pView, allow);
461 case USER_CONFIRM_APP_CACHE:
463 Evas_Object *pObj = reinterpret_cast< Evas_Object* >(__pUserPolicyData);
464 ewk_view_application_cache_permission_reply(pObj, allow);
467 case USER_CONFIRM_DB_QUOTA_EXCEDED:
469 Evas_Object *pObj = reinterpret_cast< Evas_Object* >(__pUserPolicyData);
470 ewk_view_exceeded_database_quota_reply(pObj, allow);
473 case USER_CONFIRM_LOCAL_FS_QUOTA_EXCEDED:
475 Evas_Object *pObj = reinterpret_cast< Evas_Object* >(__pUserPolicyData);
476 ewk_view_exceeded_local_file_system_quota_reply(pObj, allow);
479 case USER_CONFIRM_INDEXED_DB_QUOTA_EXCEDED:
481 Evas_Object *pObj = reinterpret_cast< Evas_Object* >(__pUserPolicyData);
482 ewk_view_exceeded_indexed_database_quota_reply(pObj, allow);
488 __isUserActionNeeded = false;
493 _UserConfirmPopup::AddGeolocationDb(Ewk_Geolocation_Permission_Request* pPolicy, bool enable)
496 String geolocationPath(Tizen::App::App::GetInstance()->GetAppRootPath() + CUSTOM_DB_DIRECTORY_PATH + USER_CONFIRM_DB_NAME);
497 String table(GEOLOCATION_TABLE_NAME);
499 const Ewk_Security_Origin* pSecurityOrigin = ewk_geolocation_permission_request_origin_get(pPolicy);
500 String origin = _Utility::CreateOrigin(pSecurityOrigin);
502 result r = db.Construct(geolocationPath, "r+", null);
503 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
505 std::unique_ptr<DbStatement> pStmt(db.CreateStatementN(L"Insert Into " + table + L" (origin, permission) Values (?, ?)"));
506 SysTryReturn(NID_WEB_CTRL, pStmt.get(), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
508 SysLog(NID_WEB_CTRL, "The current value of stmt is %u, host is %ls", pStmt.get(), origin.GetPointer());
510 pStmt->BindString(0, origin);
511 pStmt->BindInt(1, static_cast < int >(enable));
513 db.BeginTransaction();
515 std::unique_ptr<DbEnumerator> pEnum(db.ExecuteStatementN(*pStmt));
517 db.CommitTransaction();
524 _UserConfirmPopup::RegisterHandler(bool checkHandler, Eina_Bool allow)
527 String handlerPath(Tizen::App::App::GetInstance()->GetAppRootPath() + CUSTOM_DB_DIRECTORY_PATH + USER_CONFIRM_DB_NAME);
531 if(checkHandler == true)
533 table = CUSTOM_CONTENT_TABLE_NAME;
537 table = CUSTOM_PROTOCOL_TABLE_NAME;
539 Ewk_Custom_Handlers_Data* pHandlerData = reinterpret_cast< Ewk_Custom_Handlers_Data* >(__pUserPolicyData);
540 SysAssertf(pHandlerData, "Failed to request");
542 String baseUri(ewk_custom_handlers_data_base_url_get(pHandlerData));
543 String uri = ewk_custom_handlers_data_url_get(pHandlerData);
544 String target = ewk_custom_handlers_data_target_get(pHandlerData);
546 result r = db.Construct(handlerPath, "r+", null);
547 SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
549 std::unique_ptr<DbEnumerator> pEnum(db.QueryN(L"Select id From " + table + L" Where baseUrl = '" + baseUri + L"' AND url = '" + uri + L"' AND mime = '" + target + L"'"));
554 pEnum->GetIntAt(0, checkId);
556 std::unique_ptr<DbStatement> pUpdateStmt(db.CreateStatementN(L"Update " + table + L" Set allow = (?) Where id = (?)"));
557 SysTryReturnVoidResult(NID_WEB_CTRL, pUpdateStmt.get(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
559 pUpdateStmt->BindInt(0, static_cast < int >(allow));
560 pUpdateStmt->BindInt(1, checkId);
562 db.BeginTransaction();
564 std::unique_ptr<DbEnumerator> pEnum(db.ExecuteStatementN(*pUpdateStmt));
566 db.CommitTransaction();
571 std::unique_ptr<DbStatement> pStmt(db.CreateStatementN(L"Insert Into " + table + L" (baseUrl, url, mime, allow) Values (?, ?, ?, ?)"));
572 SysTryReturnVoidResult(NID_WEB_CTRL, pStmt.get(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
574 pStmt->BindString(0, baseUri);
575 pStmt->BindString(1, uri);
576 pStmt->BindString(2, target);
577 pStmt->BindInt(3, static_cast < int >(allow));
579 db.BeginTransaction();
581 std::unique_ptr<DbEnumerator> pRegisterEnum(db.ExecuteStatementN(*pStmt));
583 db.CommitTransaction();
588 _UserConfirmPopup::OnKeyPressed(Control& source, const KeyEventInfo& keyEventInfo)
594 _UserConfirmPopup::OnKeyReleased(Control& source, const KeyEventInfo& keyEventInfo)
596 result r = E_SUCCESS;
597 if ((keyEventInfo.GetKeyCode() == KEY_ESC || keyEventInfo.GetKeyCode() == KEY_BACK) && source.GetShowState() == true)
599 HandleUserAction(EINA_FALSE);
604 SysLogException(NID_WEB_CTRL, r, "[%s] Propagating.", GetErrorMessage(r));
607 switch (__userConfirmMode)
609 case USER_CONFIRM_USERMEDIA:
611 __pImpl->SendUserEvent(ID_USER_CONFIRM_USERMEDIA_CLOSE, null);
614 case USER_CONFIRM_GEOLOCATION:
616 __pImpl->SendUserEvent(ID_USER_CONFIRM_GEOLOCATION_CLOSE, null);
619 case USER_CONFIRM_NOTIFICATION:
621 __pImpl->SendUserEvent(ID_USER_CONFIRM_NOTIFICATION_CLOSE, null);
624 case USER_SCRIPT_ALERT:
626 __pImpl->SendUserEvent(ID_USER_SCRIPT_ALERT_CLOSE, null);
629 case USER_SCRIPT_CONFIRM:
631 __pImpl->SendUserEvent(ID_USER_SCRIPT_CONFIRM_CLOSE, null);
634 case USER_PROTOCOL_HANDLER:
635 case USER_CONTENT_HANDLER:
636 case USER_CONFIRM_APP_CACHE:
637 case USER_CONFIRM_DB_QUOTA_EXCEDED:
638 case USER_CONFIRM_LOCAL_FS_QUOTA_EXCEDED:
639 case USER_CONFIRM_INDEXED_DB_QUOTA_EXCEDED:
649 _UserConfirmPopup::OnPreviewKeyPressed(Control& source, const KeyEventInfo& keyEventInfo)
655 _UserConfirmPopup::OnPreviewKeyReleased(Control& source, const KeyEventInfo& keyEventInfo)
661 _UserConfirmPopup::TranslateKeyEventInfo(Control& source, KeyEventInfo& keyEventInfo)
667 }}} // Tizen::Web::Controls