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