diff --git a/ohos_interface/include/ohos_nweb/nweb_handler.h b/ohos_interface/include/ohos_nweb/nweb_handler.h index 72c5f908cdbbe3237c605d1e75d3ccc92a1c9d68..94ad316f4112726da5c424183e01922086695f03 100644 --- a/ohos_interface/include/ohos_nweb/nweb_handler.h +++ b/ohos_interface/include/ohos_nweb/nweb_handler.h @@ -1353,6 +1353,13 @@ public: * @param isMainFrame true if the request is for the main frame. */ virtual void OnRefreshAccessedHistoryV2(const std::string& url, bool isReload, bool isMainFrame) {} + + /** + * brief Notify the web client to remove blankless frame with animation. + * + * @param delayTime The delayTime for web client to remove blankless frame. + */ + virtual void OnRemoveBlanklessFrameWithAnimation(int delayTime) {} }; } // namespace OHOS::NWeb diff --git a/ohos_interface/ohos_glue/ohos_nweb/bridge/webcore/ark_web_handler_wrapper.cpp b/ohos_interface/ohos_glue/ohos_nweb/bridge/webcore/ark_web_handler_wrapper.cpp index aac710daf7e38d531a420afd9282782fe3815e07..c15cc558b85652406b6b4f5183ce07ae7e523955 100644 --- a/ohos_interface/ohos_glue/ohos_nweb/bridge/webcore/ark_web_handler_wrapper.cpp +++ b/ohos_interface/ohos_glue/ohos_nweb/bridge/webcore/ark_web_handler_wrapper.cpp @@ -1334,4 +1334,9 @@ void ArkWebHandlerWrapper::OnRefreshAccessedHistoryV2(const std::string& url, bo ArkWebStringStructRelease(stUrl); } + +void ArkWebHandlerWrapper::OnRemoveBlanklessFrameWithAnimation(int delayTime) +{ + ark_web_handler_->OnRemoveBlanklessFrameWithAnimation(delayTime); +} } // namespace OHOS::ArkWeb diff --git a/ohos_interface/ohos_glue/ohos_nweb/bridge/webcore/ark_web_handler_wrapper.h b/ohos_interface/ohos_glue/ohos_nweb/bridge/webcore/ark_web_handler_wrapper.h index 9251648d645cb1e643be8cd1795996ef073ce24e..40b35685a60751d2329d53a7e1ca1adae5178db3 100644 --- a/ohos_interface/ohos_glue/ohos_nweb/bridge/webcore/ark_web_handler_wrapper.h +++ b/ohos_interface/ohos_glue/ohos_nweb/bridge/webcore/ark_web_handler_wrapper.h @@ -801,6 +801,13 @@ public: * @param isMainFrame true if the request is for the main frame. */ void OnRefreshAccessedHistoryV2(const std::string& url, bool isReload, bool isMainFrame) override; + + /** + * brief Notify the web client to remove blankless frame with animation. + * + * @param delayTime The delayTime for web client to remove blankless frame. + */ + void OnRemoveBlanklessFrameWithAnimation(int delayTime) override; private: ArkWebRefPtr ark_web_handler_; }; diff --git a/ohos_interface/ohos_glue/ohos_nweb/bridge/webview/ark_web_handler_impl.cpp b/ohos_interface/ohos_glue/ohos_nweb/bridge/webview/ark_web_handler_impl.cpp index dac01339dad3a9c27b733ab3ea6da8168f225a78..3fb2105a60b56e0fc1bcc91fd70e07a7d06228aa 100644 --- a/ohos_interface/ohos_glue/ohos_nweb/bridge/webview/ark_web_handler_impl.cpp +++ b/ohos_interface/ohos_glue/ohos_nweb/bridge/webview/ark_web_handler_impl.cpp @@ -1158,4 +1158,9 @@ void ArkWebHandlerImpl::OnRefreshAccessedHistoryV2(const ArkWebString& url, bool { nweb_handler_->OnRefreshAccessedHistoryV2(ArkWebStringStructToClass(url), isReload, isMainFrame); } + +void ArkWebHandlerImpl::OnRemoveBlanklessFrameWithAnimation(int delayTime) +{ + nweb_handler_->OnRemoveBlanklessFrameWithAnimation(delayTime); +} } // namespace OHOS::ArkWeb diff --git a/ohos_interface/ohos_glue/ohos_nweb/bridge/webview/ark_web_handler_impl.h b/ohos_interface/ohos_glue/ohos_nweb/bridge/webview/ark_web_handler_impl.h index 12c2cd5d4927196a820764f1b8b7923f0b20c452..34cb16132c1647e2618338111de0cebb78941e22 100644 --- a/ohos_interface/ohos_glue/ohos_nweb/bridge/webview/ark_web_handler_impl.h +++ b/ohos_interface/ohos_glue/ohos_nweb/bridge/webview/ark_web_handler_impl.h @@ -763,6 +763,13 @@ public: * @param isMainFrame true if the request is for the main frame. */ void OnRefreshAccessedHistoryV2(const ArkWebString& url, bool isReload, bool isMainFrame) override; + + /** + * brief Notify the web client to remove blankless frame with animation. + * + * @param delayTime The delayTime for web client to remove blankless frame. + */ + void OnRemoveBlanklessFrameWithAnimation(int delayTime) override; private: std::shared_ptr nweb_handler_; }; diff --git a/ohos_interface/ohos_glue/ohos_nweb/include/ark_web_handler.h b/ohos_interface/ohos_glue/ohos_nweb/include/ark_web_handler.h index 7ed308d50130b87ee6f34593e68fdf90bf347205..e0d85dd348f1a0501363cadba70ff8fe51b0ae61 100644 --- a/ohos_interface/ohos_glue/ohos_nweb/include/ark_web_handler.h +++ b/ohos_interface/ohos_glue/ohos_nweb/include/ark_web_handler.h @@ -1101,6 +1101,14 @@ public: */ /*--ark web()--*/ virtual void OnRefreshAccessedHistoryV2(const ArkWebString& url, bool isReload, bool isMainFrame) = 0; + + /** + * brief Notify the web client to remove blankless frame with animation. + * + * @param delayTime The delayTime for web client to remove blankless frame. + */ + /*--ark web()--*/ + virtual void OnRemoveBlanklessFrameWithAnimation(int delayTime) = 0; }; } // namespace OHOS::ArkWeb