Add callbacks for form repost decision and frame rendering.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / web-view / web-form-repost-decision.h
1 #ifndef DALI_TOOLKIT_WEB_FORM_REPOST_DECISION_H
2 #define DALI_TOOLKIT_WEB_FORM_REPOST_DECISION_H
3
4 /*
5  * Copyright (c) 2021 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <memory>
23 #include <string>
24
25 // INTERNAL INCLUDES
26 #include <dali-toolkit/public-api/dali-toolkit-common.h>
27
28 namespace Dali
29 {
30 class WebEngineFormRepostDecision;
31
32 namespace Toolkit
33 {
34 /**
35  * @addtogroup dali_toolkit_controls_web_view
36  * @{
37  */
38
39 /**
40  * @brief WebFormRepostDecision is a class for form repost decision of WebView.
41  *
42  *
43  * For working WebFormRepostDecision, a Dali::WebEngineFormRepostDecision should be provided.
44  *
45  */
46 class DALI_TOOLKIT_API WebFormRepostDecision
47 {
48 public:
49   /**
50    * @brief Creates a WebFormRepostDecision.
51    */
52   WebFormRepostDecision(std::shared_ptr<Dali::WebEngineFormRepostDecision> decision);
53
54   /**
55    * @brief Destructor.
56    */
57   virtual ~WebFormRepostDecision() final;
58
59   /**
60    * @brief Reply the result about form repost decision.
61    *
62    * @param[in] allowed Whether allow form repost decision request or not
63    */
64   void Reply(bool allowed);
65
66 private:
67   std::shared_ptr<Dali::WebEngineFormRepostDecision> mFormRepostDecision;
68 };
69
70 /**
71  * @}
72  */
73
74 } // namespace Toolkit
75
76 } // namespace Dali
77
78 #endif // DALI_TOOLKIT_WEB_FORM_REPOST_DECISION_H