fe2f5e393e920f9eb834ddf076728fa8a962d138
[framework/osp/web.git] / src / controls / FWebCtrl_UserConfirmPopup.cpp
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
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.
16 //
17
18 /**
19  * @file                FWebCtrl_UserConfirmPopup.cpp
20  * @brief               The file contains the definition of _UserConfirmPopup class.
21  */
22 #include <FAppApp.h>
23 #include <FBaseColArrayList.h>
24 #include <FBaseSysLog.h>
25 #include <FBaseUtilUri.h>
26 #include <FGrpDimension.h>
27 #include <FGrpRectangle.h>
28 #include <FIoDbEnumerator.h>
29 #include <FIoDbStatement.h>
30 #include <FSecCertX509Certificate.h>
31 #include <FUiCtrlButton.h>
32 #include <FUiCtrlLabel.h>
33 #include <FUiCtrlPanel.h>
34 #include <FUiKeyEventInfo.h>
35 #include <FUiLayout.h>
36 #include <FUiVerticalBoxLayout.h>
37 #include <FIo_DatabaseImpl.h>
38 #include <FSys_SystemResource.h>
39 #include <FUi_ControlManager.h>
40 #include <FUi_ResourceManager.h>
41 #include "FWebCtrl_EflWebkit.h"
42 #include "FWebCtrl_UserConfirmPopup.h"
43 #include "FWebCtrl_Utility.h"
44 #include "FWebCtrl_WebImpl.h"
45
46
47 using namespace Tizen::Base;
48 using namespace Tizen::Base::Collection;
49 using namespace Tizen::Base::Utility;
50 using namespace Tizen::Graphics;
51 using namespace Tizen::Io;
52 using namespace Tizen::Security::Cert;
53 using namespace Tizen::System;
54 using namespace Tizen::Ui;
55 using namespace Tizen::Ui::Controls;
56
57
58 namespace Tizen { namespace Web { namespace Controls
59 {
60
61
62 _UserConfirmPopup::_UserConfirmPopup(void)
63         : __pUserPolicyData(null)
64         , __userConfirmMode(USER_CONFIRM_USERMEDIA)
65         , __pCheckButton(null)
66         , __sync(false)
67 {
68 }
69
70
71 _UserConfirmPopup::~_UserConfirmPopup(void)
72 {
73 }
74
75
76 result
77 _UserConfirmPopup::Construct(_UserConfirmMode userConfirmMode, void* pEventInfo, bool sync, String msg)
78 {
79         result r = E_SUCCESS;
80         SysTryReturnResult(NID_WEB_CTRL, pEventInfo, E_INVALID_ARG, "Invalid argument(s) is used. pPolicy is null.");
81         SysTryReturnResult(NID_WEB_CTRL, userConfirmMode >= USER_CONFIRM_USERMEDIA && userConfirmMode <= USER_CONFIRM_INDEXED_DB_QUOTA_EXCEDED, E_INVALID_ARG,
82                                         "Invalid userConfirmMode is used. [%d]", userConfirmMode);
83
84         _SystemResource* pSysResource = _SystemResource::GetInstance();
85         SysAssertf(pSysResource != null, "Failed to get _SystemResource instance");
86
87         _WebPopupData* pPopupData = _WebPopup::GetPopupData();
88         SysTryReturn(NID_WEB_CTRL, pPopupData, r = GetLastResult(), r, "[%s] Propagating.", GetErrorMessage(r));
89
90         __pUserPolicyData = pEventInfo;
91         __userConfirmMode = userConfirmMode;
92         __sync = sync;
93
94         bool hasTitle = true;
95         int popupMaxHeight = 2*pPopupData->labelDim.height + pPopupData->btnDim.height + 2*pPopupData->sideMargin;
96
97         if (__userConfirmMode == USER_CONFIRM_GEOLOCATION)
98         {
99                 popupMaxHeight +=  pPopupData->checkDim.height;
100         }
101
102         if (__userConfirmMode == USER_SCRIPT_ALERT)
103         {
104                 popupMaxHeight -=  2*pPopupData->sideMargin;
105                 hasTitle = false;
106         }
107
108         r = _WebPopup::Construct(hasTitle, Dimension(pPopupData->popupDim.width, popupMaxHeight));
109         SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
110
111         if (userConfirmMode != USER_SCRIPT_ALERT)
112         {
113                 SetTitleText(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_HEADER_SECURITY_WARNING"));
114         }
115
116         Rectangle rect(0, 0, 0, 0);
117
118         //label
119         rect.height = 2*pPopupData->labelDim.height;
120         rect.width = pPopupData->labelDim.width;
121
122         std::unique_ptr<Label> pLabel(new (std::nothrow) Label());
123         SysTryReturnResult(NID_WEB_CTRL, pLabel.get(), E_OUT_OF_MEMORY, "Memory Allocation failed.");
124
125         String message = L"";
126         if (userConfirmMode >= USER_SCRIPT_ALERT && userConfirmMode <= USER_CONFIRM_INDEXED_DB_QUOTA_EXCEDED)
127         {
128                 message = msg;
129         }
130         else
131         {
132                 message = GetMessageFromPolicy();
133         }
134         r = pLabel->Construct(rect, message);
135         SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
136
137         pLabel->SetTextConfig(pPopupData->labelFontSize, LABEL_TEXT_STYLE_NORMAL);
138
139         r = AddControl(*pLabel);
140         SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
141
142         Label* pInfoLabel = pLabel.release();
143         //checkbutton
144         if (__userConfirmMode == USER_CONFIRM_GEOLOCATION)
145         {
146                 rect.y = 0;
147                 rect.height = pPopupData->checkDim.height;
148
149                 std::unique_ptr<CheckButton> pCheckButton (new (std::nothrow) CheckButton());
150                 SysTryReturnResult(NID_WEB_CTRL, pCheckButton.get(), E_OUT_OF_MEMORY, "Memory Allocation failed.");
151
152                 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"));
153                 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
154
155                 r = AddControl(*pCheckButton);
156                 SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
157
158                 __pCheckButton = pCheckButton.release();
159         }
160
161         Panel* pButtonPanel = CreateAndAddPanel();
162         SysTryReturn(NID_WEB_CTRL, pButtonPanel, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
163
164         ArrayList idList;
165         r = idList.Construct();
166         SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
167
168         ArrayList titleList;
169         r = titleList.Construct();
170         SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
171
172         idList.Add(*(new Integer(ID_BUTTON_USER_ALLOW)));
173         if (userConfirmMode == USER_SCRIPT_ALERT)
174         {
175                 titleList.Add(*(new String(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BUTTON_OK"))));
176         }
177         else
178         {
179                 idList.Add(*(new Integer(ID_BUTTON_USER_CANCEL)));
180                 titleList.Add(*(new String(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_OPT_ALLOW"))));
181                 titleList.Add(*(new String(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_OPT_CANCEL"))));
182         }
183
184         r = CreateAndAddButtons(idList, titleList, pButtonPanel);
185         SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
186
187         std::unique_ptr<VerticalBoxLayout> pLayout(dynamic_cast< VerticalBoxLayout* >(GetLayoutN()));
188         SysTryReturn(NID_WEB_CTRL, pLayout.get(), r = GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
189
190         pLayout->SetHorizontalAlignment(*pInfoLabel, LAYOUT_HORIZONTAL_ALIGN_CENTER);
191         if (__userConfirmMode == USER_CONFIRM_GEOLOCATION)
192         {
193                 pLayout->SetHorizontalAlignment(*__pCheckButton, LAYOUT_HORIZONTAL_ALIGN_CENTER);
194         }
195         pLayout->SetHorizontalAlignment(*pButtonPanel, LAYOUT_HORIZONTAL_ALIGN_CENTER);
196
197         if ( __userConfirmMode != USER_SCRIPT_ALERT )
198         {
199                 pLayout->SetSpacing(*pButtonPanel, 2*pPopupData->sideMargin);
200         }
201
202         SetPropagatedKeyEventListener(this);
203         return E_SUCCESS;
204 }
205
206
207 void
208 _UserConfirmPopup::OnActionPerformed(const Control& source, int actionId)
209 {
210         result r = E_SUCCESS;
211
212         switch (actionId)
213         {
214         case ID_BUTTON_USER_ALLOW:
215                 HandleUserAction(EINA_TRUE);
216                 break;
217
218         case ID_BUTTON_USER_CANCEL:
219                 HandleUserAction(EINA_FALSE);
220                 break;
221
222         default:
223                 break;
224         }
225
226         r = HidePopup();
227         if (IsFailed(r))
228         {
229                 SysLogException(NID_WEB_CTRL, r, "[%s] Propagating.", GetErrorMessage(r));
230         }
231
232         if (!__sync)
233         {
234                 switch(__userConfirmMode)
235                 {
236                 case USER_CONFIRM_USERMEDIA:
237                 {
238                         GetOwner()->SendUserEvent(ID_USER_CONFIRM_USERMEDIA_CLOSE, null);
239                         break;
240                 }
241                 case USER_CONFIRM_GEOLOCATION:
242                 {
243                         GetOwner()->SendUserEvent(ID_USER_CONFIRM_GEOLOCATION_CLOSE, null);
244                         break;
245                 }
246                 case USER_CONFIRM_NOTIFICATION:
247                 {
248                         GetOwner()->SendUserEvent(ID_USER_CONFIRM_NOTIFICATION_CLOSE, null);
249                         break;
250                 }
251                 case USER_SCRIPT_ALERT:
252                 {
253                         GetOwner()->SendUserEvent(ID_USER_SCRIPT_ALERT_CLOSE, null);
254                         break;
255                 }
256                 default:
257                         SysAssert(false);
258                 }
259         }
260 }
261
262
263 String
264 _UserConfirmPopup::GetMessageFromPolicy(void)
265 {
266         _SystemResource* pSysResource = _SystemResource::GetInstance();
267         SysAssertf(pSysResource != null, "Failed to get _SystemResource instance");
268
269         String message;
270
271         switch(__userConfirmMode)
272         {
273         case USER_CONFIRM_USERMEDIA:
274         {
275                 message = L"Do you want to allow acccess to media?\n";
276                 break;
277         }
278         case USER_PROTOCOL_HANDLER:
279         {
280                 Ewk_Custom_Handlers_Data* pHandlerData = reinterpret_cast< Ewk_Custom_Handlers_Data* >(__pUserPolicyData);
281                 SysAssertf(pHandlerData, "Failed to request");
282
283                 String target(ewk_custom_handlers_data_target_get(pHandlerData));
284                 String baseUri(ewk_custom_handlers_data_base_url_get(pHandlerData));
285
286                 message = baseUri + String(L" is asking to register ") + target + String(L" protocol handler.");
287                 break;
288         }
289         case USER_CONTENT_HANDLER:
290         {
291                 Ewk_Custom_Handlers_Data* pHandlerData = reinterpret_cast< Ewk_Custom_Handlers_Data* >(__pUserPolicyData);
292                 SysAssertf(pHandlerData, "Failed to request");
293
294                 String target(ewk_custom_handlers_data_target_get(pHandlerData));
295                 String baseUri(ewk_custom_handlers_data_base_url_get(pHandlerData));
296
297                 message = String(baseUri) + String(L" is asking to register ") + String(target) + String(L" content handler.");
298                 break;
299         }
300         case USER_CONFIRM_GEOLOCATION:
301         {
302                 Ewk_Geolocation_Permission_Request* pGeoLocPermReq = reinterpret_cast< Ewk_Geolocation_Permission_Request* >(__pUserPolicyData);
303                 const Ewk_Security_Origin* pSecurityOrigin = ewk_geolocation_permission_request_origin_get(pGeoLocPermReq);
304
305                 message = _Utility::CreateOrigin(pSecurityOrigin);
306                 message.Append(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_BODY_PS_REQUESTS_YOUR_LOCATION"));
307                 break;
308         }
309         case USER_CONFIRM_NOTIFICATION:
310         {
311                 Ewk_Notification_Permission_Request* pPermissionRequest = reinterpret_cast< Ewk_Notification_Permission_Request* >(__pUserPolicyData);
312                 const Ewk_Security_Origin* pSecurityOrigin = ewk_notification_permission_request_origin_get(pPermissionRequest);
313                 message = _Utility::CreateOrigin(pSecurityOrigin);
314                 message.Append(L" wants to display notifications");
315                 break;
316         }
317         default:
318                 SysAssert(false);
319         }
320
321         return message;
322 }
323
324
325 void
326 _UserConfirmPopup::HandleUserAction(Eina_Bool allow)
327 {
328         switch (__userConfirmMode)
329         {
330         case USER_CONFIRM_USERMEDIA:
331         {
332                 Ewk_User_Media_Permission_Request* pPolicy = reinterpret_cast< Ewk_User_Media_Permission_Request* >(__pUserPolicyData);
333                 ewk_user_media_permission_request_set(pPolicy, allow);
334                 break;
335         }
336         case USER_PROTOCOL_HANDLER:
337         {
338                 RegisterHandler(false, allow);
339                 break;
340         }
341         case USER_CONTENT_HANDLER:
342         {
343                 RegisterHandler(true, allow);
344                 break;
345         }
346         case USER_CONFIRM_GEOLOCATION:
347         {
348                 Ewk_Geolocation_Permission_Request* pPolicy =  reinterpret_cast< Ewk_Geolocation_Permission_Request* >(__pUserPolicyData);
349                 if (__pCheckButton->IsSelected())
350                 {
351                         result r = AddGeolocationDb(pPolicy, static_cast < bool >(allow));
352                         SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
353                 }
354 CATCH:
355                 ewk_geolocation_permission_request_set(pPolicy, allow);
356                 break;
357         }
358         case USER_CONFIRM_NOTIFICATION:
359         {
360                 Ewk_Notification_Permission_Request* pPermissionRequest = reinterpret_cast< Ewk_Notification_Permission_Request* >(__pUserPolicyData);
361                 ewk_notification_permission_request_set(pPermissionRequest, allow);
362                 break;
363         }
364         case USER_SCRIPT_ALERT:
365         {
366                 Evas_Object* pView = reinterpret_cast< Evas_Object* >(__pUserPolicyData);
367                 ewk_view_javascript_alert_reply(pView);
368                 break;
369         }
370         case USER_CONFIRM_APP_CACHE:
371         {
372                 Evas_Object *pObj = reinterpret_cast< Evas_Object* >(__pUserPolicyData);
373                 ewk_view_application_cache_permission_reply(pObj, allow);
374                 break;
375         }
376         case USER_CONFIRM_DB_QUOTA_EXCEDED:
377         {
378                 Evas_Object *pObj = reinterpret_cast< Evas_Object* >(__pUserPolicyData);
379                 ewk_view_exceeded_database_quota_reply(pObj, allow);
380                 break;
381         }
382         case USER_CONFIRM_LOCAL_FS_QUOTA_EXCEDED:
383         {
384                 Evas_Object *pObj = reinterpret_cast< Evas_Object* >(__pUserPolicyData);
385                 ewk_view_exceeded_local_file_system_quota_reply(pObj, allow);
386                 break;
387         }
388         case USER_CONFIRM_INDEXED_DB_QUOTA_EXCEDED:
389         {
390                 Evas_Object *pObj = reinterpret_cast< Evas_Object* >(__pUserPolicyData);
391                 ewk_view_exceeded_indexed_database_quota_reply(pObj, allow);
392                 break;
393         }
394         default:
395                 SysAssert(false);
396         }
397 }
398
399
400 result
401 _UserConfirmPopup::AddGeolocationDb(Ewk_Geolocation_Permission_Request* pPolicy, bool enable)
402 {
403         _DatabaseImpl db;
404         String geolocationPath(Tizen::App::App::GetInstance()->GetAppRootPath() + CUSTOM_DB_DIRECTORY_PATH + USER_CONFIRM_DB_NAME);
405         String table(GEOLOCATION_TABLE_NAME);
406
407         const Ewk_Security_Origin* pSecurityOrigin = ewk_geolocation_permission_request_origin_get(pPolicy);
408         String origin = _Utility::CreateOrigin(pSecurityOrigin);
409
410         result r = db.Construct(geolocationPath, "r+", null);
411         SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
412
413         std::unique_ptr<DbStatement> pStmt(db.CreateStatementN(L"Insert Into " + table + L" (origin, permission) Values (?, ?)"));
414         SysTryReturn(NID_WEB_CTRL, pStmt.get(), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
415
416         SysLog(NID_WEB_CTRL, "The current value of stmt is %u, host is %ls", pStmt.get(), origin.GetPointer());
417
418         pStmt->BindString(0, origin);
419         pStmt->BindInt(1, static_cast < int >(enable));
420
421         db.BeginTransaction();
422
423         std::unique_ptr<DbEnumerator> pEnum(db.ExecuteStatementN(*pStmt));
424
425         db.CommitTransaction();
426
427         return E_SUCCESS;
428 }
429
430
431 void
432 _UserConfirmPopup::RegisterHandler(bool checkHandler, Eina_Bool allow)
433 {
434         _DatabaseImpl db;
435         String handlerPath(Tizen::App::App::GetInstance()->GetAppRootPath() + CUSTOM_DB_DIRECTORY_PATH + USER_CONFIRM_DB_NAME);
436         String table;
437         int checkId = 0;
438
439         if(checkHandler == true)
440         {
441                 table = CUSTOM_CONTENT_TABLE_NAME;
442         }
443         else
444         {
445                 table = CUSTOM_PROTOCOL_TABLE_NAME;
446         }
447         Ewk_Custom_Handlers_Data* pHandlerData = reinterpret_cast< Ewk_Custom_Handlers_Data* >(__pUserPolicyData);
448         SysAssertf(pHandlerData, "Failed to request");
449
450         String baseUri(ewk_custom_handlers_data_base_url_get(pHandlerData));
451         String uri = ewk_custom_handlers_data_url_get(pHandlerData);
452         String target = ewk_custom_handlers_data_target_get(pHandlerData);
453
454         result r = db.Construct(handlerPath, "r+", null);
455         SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
456
457         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"'"));
458
459         if(pEnum.get())
460         {
461                 pEnum->MoveNext();
462                 pEnum->GetIntAt(0, checkId);
463
464                 std::unique_ptr<DbStatement> pUpdateStmt(db.CreateStatementN(L"Update " + table + L" Set allow = (?) Where id = (?)"));
465                 SysTryReturnVoidResult(NID_WEB_CTRL, pUpdateStmt.get(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
466
467                 pUpdateStmt->BindInt(0, static_cast < int >(allow));
468                 pUpdateStmt->BindInt(1, checkId);
469
470                 db.BeginTransaction();
471
472                 std::unique_ptr<DbEnumerator> pEnum(db.ExecuteStatementN(*pUpdateStmt));
473
474                 db.CommitTransaction();
475
476         }
477         else
478         {
479                 std::unique_ptr<DbStatement> pStmt(db.CreateStatementN(L"Insert Into " + table + L" (baseUrl, url, mime, allow) Values (?, ?, ?, ?)"));
480                 SysTryReturnVoidResult(NID_WEB_CTRL, pStmt.get(),  GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
481
482                 pStmt->BindString(0, baseUri);
483                 pStmt->BindString(1, uri);
484                 pStmt->BindString(2, target);
485                 pStmt->BindInt(3, static_cast < int >(allow));
486
487                 db.BeginTransaction();
488
489                 std::unique_ptr<DbEnumerator> pRegisterEnum(db.ExecuteStatementN(*pStmt));
490
491                 db.CommitTransaction();
492         }
493 }
494
495 bool
496 _UserConfirmPopup::OnKeyPressed(Control& source, const KeyEventInfo& keyEventInfo)
497 {
498         return true;
499 }
500
501 bool
502 _UserConfirmPopup::OnKeyReleased(Control& source, const KeyEventInfo& keyEventInfo)
503 {
504         result r = E_SUCCESS;
505         if ((keyEventInfo.GetKeyCode() == KEY_ESC || keyEventInfo.GetKeyCode() == KEY_BACK) && source.GetShowState() == true)
506         {
507                 HandleUserAction(EINA_FALSE);
508                 r = HidePopup();
509
510                 if (IsFailed(r))
511                 {
512                         SysLogException(NID_WEB_CTRL, r, "[%s] Propagating.", GetErrorMessage(r));
513                 }
514                 
515                 switch (__userConfirmMode)
516                 {
517                 case USER_CONFIRM_USERMEDIA:
518                 {
519                         GetOwner()->SendUserEvent(ID_USER_CONFIRM_USERMEDIA_CLOSE, null);
520                         break;
521                 }
522                 case USER_CONFIRM_GEOLOCATION:
523                 {
524                         GetOwner()->SendUserEvent(ID_USER_CONFIRM_GEOLOCATION_CLOSE, null);
525                         break;
526                 }
527                 case USER_CONFIRM_NOTIFICATION:
528                 {
529                         GetOwner()->SendUserEvent(ID_USER_CONFIRM_NOTIFICATION_CLOSE, null);
530                         break;
531                 }
532                 case USER_SCRIPT_ALERT:
533                 {
534                         GetOwner()->SendUserEvent(ID_USER_SCRIPT_ALERT_CLOSE, null);
535                         break;
536                 }
537                 case USER_PROTOCOL_HANDLER:
538                 case USER_CONTENT_HANDLER:
539                 case USER_CONFIRM_APP_CACHE:
540                 case USER_CONFIRM_DB_QUOTA_EXCEDED:
541                 case USER_CONFIRM_LOCAL_FS_QUOTA_EXCEDED:
542                 case USER_CONFIRM_INDEXED_DB_QUOTA_EXCEDED:
543                         break;
544                 default:
545                         SysAssert(false);
546                 }
547         }
548         return true;
549 }
550
551 bool
552 _UserConfirmPopup::OnPreviewKeyPressed(Control& source, const KeyEventInfo& keyEventInfo)
553 {
554         return false;
555 }
556
557 bool
558 _UserConfirmPopup::OnPreviewKeyReleased(Control& source, const KeyEventInfo& keyEventInfo)
559 {
560         return false;
561 }
562
563 bool
564 _UserConfirmPopup::TranslateKeyEventInfo(Control& source, KeyEventInfo& keyEventInfo)
565 {
566         return false;
567 }
568
569
570 }}} // Tizen::Web::Controls