namespace Dali
{
/**
- * @brief A class WebEngineCookieManager to wrap ewk cookie manager.
+ * @brief A class WebEngineCookieManager for cookie manager of web engine.
*/
class WebEngineCookieManager
{
--- /dev/null
+#ifndef DALI_WEB_ENGINE_FORM_REPOST_DECISION_H
+#define DALI_WEB_ENGINE_FORM_REPOST_DECISION_H
+
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Dali
+{
+/**
+ * @brief A class WebEngineFormRepostDecision for form repost decision.
+ */
+class WebEngineFormRepostDecision
+{
+public:
+ /**
+ * @brief Constructor.
+ */
+ WebEngineFormRepostDecision() = default;
+
+ /**
+ * @brief Destructor.
+ */
+ virtual ~WebEngineFormRepostDecision() = default;
+
+ /**
+ * @brief Reply the result about form repost decision.
+ *
+ * @param[in] allowed Whether allow form repost decision request or not
+ */
+ virtual void Reply(bool allowed) = 0;
+};
+
+} // namespace Dali
+
+#endif // DALI_WEB_ENGINE_FORM_REPOST_DECISION_H
#include <dali/public-api/math/rect.h>
#include <dali/public-api/signals/dali-signal.h>
#include <functional>
+#include <memory>
namespace Dali
{
class WebEngineBackForwardList;
class WebEngineContext;
class WebEngineCookieManager;
+class WebEngineFormRepostDecision;
class WebEngineSettings;
class HoverEvent;
class WheelEvent;
using JavaScriptPromptCallback = std::function<bool(const std::string&, const std::string&)>;
/**
+ * @brief WebView signal type related with form repost decision.
+ */
+ using WebEngineFormRepostDecisionSignalType = Signal<void(std::shared_ptr<Dali::WebEngineFormRepostDecision>)>;
+
+ /**
+ * @brief WebView signal type related with frame rendered.
+ */
+ using WebEngineFrameRenderedSignalType = Signal<void(void)>;
+
+ /**
* @brief Enumeration for the scroll edge.
*/
enum class ScrollEdge
* @return A signal object to connect with.
*/
virtual WebEngineUrlChangedSignalType& UrlChangedSignal() = 0;
+
+ /**
+ * @brief Connects to this signal to be notified when form repost decision is requested.
+ *
+ * @return A signal object to connect with.
+ */
+ virtual WebEngineFormRepostDecisionSignalType& FormRepostDecisionSignal() = 0;
+
+ /**
+ * @brief Connects to this signal to be notified when frame is rendered.
+ *
+ * @return A signal object to connect with.
+ */
+ virtual WebEngineFrameRenderedSignalType& FrameRenderedSignal() = 0;
};
} // namespace Dali
void WebEngine::ClearHistory()
{
- return GetImplementation(*this).ClearHistory();
+ GetImplementation(*this).ClearHistory();
}
void WebEngine::ClearAllTilesResources()
return GetImplementation(*this).UrlChangedSignal();
}
+Dali::WebEnginePlugin::WebEngineFormRepostDecisionSignalType& WebEngine::FormRepostDecisionSignal()
+{
+ return GetImplementation(*this).FormRepostDecisionSignal();
+}
+
+Dali::WebEnginePlugin::WebEngineFrameRenderedSignalType& WebEngine::FrameRenderedSignal()
+{
+ return GetImplementation(*this).FrameRenderedSignal();
+}
+
} // namespace Dali
/**
* @brief Reply for JavaScript confirm.
+ * @param[in] confirmed True if confirmed, false otherwise.
*/
void JavaScriptConfirmReply(bool confirmed);
/**
* @brief Reply for JavaScript prompt.
+ * @param[in] result The result returned from input-field in prompt popup.
*/
void JavaScriptPromptReply(const std::string& result);
*/
Dali::WebEnginePlugin::WebEngineUrlChangedSignalType& UrlChangedSignal();
+ /**
+ * @brief Connects to this signal to be notified when form repost decision is requested.
+ *
+ * @return A signal object to connect with.
+ */
+ Dali::WebEnginePlugin::WebEngineFormRepostDecisionSignalType& FormRepostDecisionSignal();
+
+ /**
+ * @brief Connects to this signal to be notified when frame is rendered.
+ *
+ * @return A signal object to connect with.
+ */
+ Dali::WebEnginePlugin::WebEngineFrameRenderedSignalType& FrameRenderedSignal();
+
private: // Not intended for application developers
/**
* @brief Internal constructor
${adaptor_devel_api_dir}/adaptor-framework/web-engine-back-forward-list.h
${adaptor_devel_api_dir}/adaptor-framework/web-engine-context.h
${adaptor_devel_api_dir}/adaptor-framework/web-engine-cookie-manager.h
+ ${adaptor_devel_api_dir}/adaptor-framework/web-engine-form-repost-decision.h
${adaptor_devel_api_dir}/adaptor-framework/web-engine-plugin.h
${adaptor_devel_api_dir}/adaptor-framework/web-engine-settings.h
${adaptor_devel_api_dir}/adaptor-framework/key-extension-plugin.h
return mPlugin->UrlChangedSignal();
}
+Dali::WebEnginePlugin::WebEngineFormRepostDecisionSignalType& WebEngine::FormRepostDecisionSignal()
+{
+ return mPlugin->FormRepostDecisionSignal();
+}
+
+Dali::WebEnginePlugin::WebEngineFrameRenderedSignalType& WebEngine::FrameRenderedSignal()
+{
+ return mPlugin->FrameRenderedSignal();
+}
+
} // namespace Adaptor
} // namespace Internal
} // namespace Dali
*/
Dali::WebEnginePlugin::WebEngineUrlChangedSignalType& UrlChangedSignal();
+ /**
+ * @copydoc Dali::WebEngine::FormRepostDecisionSignal()
+ */
+ Dali::WebEnginePlugin::WebEngineFormRepostDecisionSignalType& FormRepostDecisionSignal();
+
+ /**
+ * @copydoc Dali::WebEngine::FrameRenderedSignal()
+ */
+ Dali::WebEnginePlugin::WebEngineFrameRenderedSignalType& FrameRenderedSignal();
+
private:
/**
* @brief Constructor.