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.h
20 * @brief The file contains the definition of _UserConfirmPopup class.
22 #ifndef _FWEB_CTRL_INTERNAL_USER_CONFIRM_POPUP_H_
23 #define _FWEB_CTRL_INTERNAL_USER_CONFIRM_POPUP_H_
25 #include <unique_ptr.h>
27 #include <FBaseString.h>
28 #include <FUiIPropagatedKeyEventListener.h>
29 #include "FWebCtrl_WebPopup.h"
31 namespace Tizen { namespace Ui { namespace Controls
36 namespace Tizen { namespace Web { namespace Controls
39 enum _UserConfirmPopupButtonId
42 ID_BUTTON_USER_CANCEL,
43 ID_BUTTON_USER_CERT_VIEW
48 USER_CONFIRM_USERMEDIA,
49 USER_PROTOCOL_HANDLER,
51 USER_CONFIRM_GEOLOCATION,
52 USER_CONFIRM_NOTIFICATION,
54 USER_CONFIRM_APP_CACHE,
55 USER_CONFIRM_DB_QUOTA_EXCEDED,
56 USER_CONFIRM_LOCAL_FS_QUOTA_EXCEDED,
57 USER_CONFIRM_INDEXED_DB_QUOTA_EXCEDED
60 class _UserConfirmPopup
62 , public Tizen::Ui::IPropagatedKeyEventListener
69 _UserConfirmPopup(void);
74 virtual ~_UserConfirmPopup(void);
76 result Construct(_UserConfirmMode userConfirmMode, void* pEventInfo, bool sync = false, Tizen::Base::String msg = L"");
78 virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
80 virtual bool OnKeyPressed (Tizen::Ui::Control &source, const Tizen::Ui::KeyEventInfo &keyEventInfo);
81 virtual bool OnKeyReleased (Tizen::Ui::Control &source, const Tizen::Ui::KeyEventInfo &keyEventInfo);
82 virtual bool OnPreviewKeyPressed (Tizen::Ui::Control &source, const Tizen::Ui::KeyEventInfo &keyEventInfo);
83 virtual bool OnPreviewKeyReleased (Tizen::Ui::Control &source, const Tizen::Ui::KeyEventInfo &keyEventInfo);
84 virtual bool TranslateKeyEventInfo (Tizen::Ui::Control &source, Tizen::Ui::KeyEventInfo &keyEventInfo);
87 _UserConfirmPopup(const _UserConfirmPopup&);
89 _UserConfirmPopup& operator =(const _UserConfirmPopup&);
91 Tizen::Base::String GetMessageFromPolicy(void);
93 void HandleUserAction(Eina_Bool allow);
95 void RegisterHandler(bool checkhandler, Eina_Bool allow);
96 result AddGeolocationDb(Ewk_Geolocation_Permission_Request* pPolicy, bool enable);
99 void* __pUserPolicyData;
100 _UserConfirmMode __userConfirmMode;
101 Tizen::Ui::Controls::CheckButton* __pCheckButton;
104 }; // _UserConfirmPopup
106 }}} // Tizen::Web::Controls
107 #endif // _FWEB_CTRL_INTERNAL_USER_CONFIRM_POPUP_H_