diff --git a/ohos_interface/include/ohos_nweb/nweb.h b/ohos_interface/include/ohos_nweb/nweb.h index cac2ae80f05cadae1f9e625dbc361cdfc6dd7238..36289f700cca6931d6de9ed4a4b3db3cdfeefdd4 100644 --- a/ohos_interface/include/ohos_nweb/nweb.h +++ b/ohos_interface/include/ohos_nweb/nweb.h @@ -2150,6 +2150,18 @@ public: */ /*--ark web()--*/ virtual void SetForceEnableZoom(bool forceEnableZoom) const {} + + /** + * @brief Notify is pc window or not. + * @param True means pc window, false means the opposite. + */ + virtual void NotifyIsPcWindow(bool result) {} + + /** + * @brief Notify whether the free multi window mode is enabled or not. + * @param true means the free multi window mode is enabled, false means the opposite. + */ + virtual void NotifyFreeMultiWindowModeEnabled(bool result) {} }; } // namespace OHOS::NWeb diff --git a/ohos_interface/ohos_glue/ohos_nweb/bridge/webcore/ark_web_nweb_impl.cpp b/ohos_interface/ohos_glue/ohos_nweb/bridge/webcore/ark_web_nweb_impl.cpp index 62180b83eb09546b7ba03045f036b00ac614b991..f41cb3f8331d1db6c0b4362017f10105c72eccad 100644 --- a/ohos_interface/ohos_glue/ohos_nweb/bridge/webcore/ark_web_nweb_impl.cpp +++ b/ohos_interface/ohos_glue/ohos_nweb/bridge/webcore/ark_web_nweb_impl.cpp @@ -1599,4 +1599,14 @@ void ArkWebNWebImpl::SetForceEnableZoom(bool forceEnableZoom) nweb_nweb_->SetForceEnableZoom(forceEnableZoom); } +void ArkWebNWebImpl::NotifyIsPcWindow(bool result) +{ + nweb_nweb_->NotifyIsPcWindow(result); +} + +void ArkWebNWebImpl::NotifyFreeMultiWindowModeEnabled(bool result) +{ + nweb_nweb_->NotifyFreeMultiWindowModeEnabled(result); +} + } // namespace OHOS::ArkWeb diff --git a/ohos_interface/ohos_glue/ohos_nweb/bridge/webcore/ark_web_nweb_impl.h b/ohos_interface/ohos_glue/ohos_nweb/bridge/webcore/ark_web_nweb_impl.h index 313f99ee51270829765e68eb9e70a9ca0a9404f2..99c82a0a0427182cffedfae85379224a416dc064 100644 --- a/ohos_interface/ohos_glue/ohos_nweb/bridge/webcore/ark_web_nweb_impl.h +++ b/ohos_interface/ohos_glue/ohos_nweb/bridge/webcore/ark_web_nweb_impl.h @@ -1806,6 +1806,18 @@ public: */ /*--ark web()--*/ void SetForceEnableZoom(bool forceEnableZoom) override; + + /** + * @brief Notify is pc window or not. + * @param True means pc window, false means the opposite. + */ + void NotifyIsPcWindow(bool result) override; + + /** + * @brief Notify whether the free multi window mode is enabled or not. + * @param true means the free multi window mode is enabled, false means the opposite. + */ + void NotifyFreeMultiWindowModeEnabled(bool result) override; private: std::shared_ptr nweb_nweb_; }; diff --git a/ohos_interface/ohos_glue/ohos_nweb/bridge/webview/ark_web_nweb_wrapper.cpp b/ohos_interface/ohos_glue/ohos_nweb/bridge/webview/ark_web_nweb_wrapper.cpp index 18e95b4b77c08dc7ebc4346ca9bc3b57d6c87b27..63b776bfe9f978fd606d50519a4b8c81bddc75a1 100644 --- a/ohos_interface/ohos_glue/ohos_nweb/bridge/webview/ark_web_nweb_wrapper.cpp +++ b/ohos_interface/ohos_glue/ohos_nweb/bridge/webview/ark_web_nweb_wrapper.cpp @@ -1885,4 +1885,14 @@ void ArkWebNWebWrapper::SetForceEnableZoom(bool forceEnableZoom) const WVLOG_E("forceEnableZoom = %{public}d", forceEnableZoom); ark_web_nweb_->SetForceEnableZoom(forceEnableZoom); } + +void ArkWebNWebWrapper::NotifyIsPcWindow(bool result) +{ + ark_web_nweb_->NotifyIsPcWindow(result); +} + +void ArkWebNWebWrapper::NotifyFreeMultiWindowModeEnabled(bool result) +{ + ark_web_nweb_->NotifyFreeMultiWindowModeEnabled(result); +} } // namespace OHOS::ArkWeb diff --git a/ohos_interface/ohos_glue/ohos_nweb/bridge/webview/ark_web_nweb_wrapper.h b/ohos_interface/ohos_glue/ohos_nweb/bridge/webview/ark_web_nweb_wrapper.h index f73a7069085b66de6d68a6f7c7e1ddb694fdce00..b609dc39f99062f0b35c4aba6d117717f08fe08e 100644 --- a/ohos_interface/ohos_glue/ohos_nweb/bridge/webview/ark_web_nweb_wrapper.h +++ b/ohos_interface/ohos_glue/ohos_nweb/bridge/webview/ark_web_nweb_wrapper.h @@ -1819,6 +1819,18 @@ public: * @brief Set web should ignore zoom limit. */ void SetForceEnableZoom(bool forceEnableZoom) const override; + + /** + * @brief Notify is pc window or not. + * @param True means pc window, false means the opposite. + */ + void NotifyIsPcWindow(bool result) override; + + /** + * @brief Notify whether the free multi window mode is enabled or not. + * @param true means the free multi window mode is enabled, false means the opposite. + */ + void NotifyFreeMultiWindowModeEnabled(bool result) override; private: ArkWebRefPtr ark_web_nweb_; }; diff --git a/ohos_interface/ohos_glue/ohos_nweb/include/ark_web_nweb.h b/ohos_interface/ohos_glue/ohos_nweb/include/ark_web_nweb.h index b57dbd943ff049bac96e025aa1c288baa5719fd7..697a09b660d8a12a8bf75e0434983c7cbaba679d 100644 --- a/ohos_interface/ohos_glue/ohos_nweb/include/ark_web_nweb.h +++ b/ohos_interface/ohos_glue/ohos_nweb/include/ark_web_nweb.h @@ -2052,6 +2052,20 @@ public: */ /*--ark web()--*/ virtual void SetForceEnableZoom(bool forceEnableZoom) {} + + /** + * @brief Notify is pc window or not. + * @param True means pc window, false means the opposite. + */ + /*--ark web()--*/ + virtual void NotifyIsPcWindow(bool result) = 0; + + /** + * @brief Notify whether the free multi window mode is enabled or not. + * @param true means the free multi window mode is enabled, false means the opposite. + */ + /*--ark web()--*/ + virtual void NotifyFreeMultiWindowModeEnabled(bool result) = 0; }; } // namespace OHOS::ArkWeb