From e6222a5eb6f52e2da1f924f0a98a8163c249f232 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Artur=20=C5=9Awigo=C5=84?= Date: Thu, 17 Mar 2022 11:49:08 +0100 Subject: [PATCH] [AT-SPI] Add WebEngine::GetAccessibilityAddress() It is necessary to know the address of the root of the AT-SPI tree created by Chromium in order to be able to embed it as a subtree in a DALi application. Change-Id: I015d6ebbd0ccdad08a4d25889086d8b4bd0e42a2 --- dali/devel-api/adaptor-framework/web-engine-plugin.h | 7 +++++++ dali/devel-api/adaptor-framework/web-engine.cpp | 5 +++++ dali/devel-api/adaptor-framework/web-engine.h | 7 +++++++ dali/internal/web-engine/common/web-engine-impl.cpp | 5 +++++ dali/internal/web-engine/common/web-engine-impl.h | 6 ++++++ 5 files changed, 30 insertions(+) diff --git a/dali/devel-api/adaptor-framework/web-engine-plugin.h b/dali/devel-api/adaptor-framework/web-engine-plugin.h index 7a8aa63..2e30f8c 100644 --- a/dali/devel-api/adaptor-framework/web-engine-plugin.h +++ b/dali/devel-api/adaptor-framework/web-engine-plugin.h @@ -26,6 +26,7 @@ #include // INTERNAL INCLUDES +#include #include #include #include @@ -677,6 +678,12 @@ public: virtual void ActivateAccessibility(bool activated) = 0; /** + * @brief Get the accessibility address (bus and path) for embedding. + * @return Accessibility address of the root web content element. + */ + virtual Accessibility::Address GetAccessibilityAddress() = 0; + + /** * @brief Request to set the current page's visibility. * @param[in] visible Visible or not. * diff --git a/dali/devel-api/adaptor-framework/web-engine.cpp b/dali/devel-api/adaptor-framework/web-engine.cpp index 50812f6..badddf8 100755 --- a/dali/devel-api/adaptor-framework/web-engine.cpp +++ b/dali/devel-api/adaptor-framework/web-engine.cpp @@ -421,6 +421,11 @@ void WebEngine::ActivateAccessibility(bool activated) GetImplementation(*this).ActivateAccessibility(activated); } +Accessibility::Address WebEngine::GetAccessibilityAddress() +{ + return GetImplementation(*this).GetAccessibilityAddress(); +} + bool WebEngine::SetVisibility(bool visible) { return GetImplementation(*this).SetVisibility(visible); diff --git a/dali/devel-api/adaptor-framework/web-engine.h b/dali/devel-api/adaptor-framework/web-engine.h index d68920e..3d45c08 100755 --- a/dali/devel-api/adaptor-framework/web-engine.h +++ b/dali/devel-api/adaptor-framework/web-engine.h @@ -22,6 +22,7 @@ #include //INTERNAL INCLUDES +#include #include #include @@ -546,6 +547,12 @@ public: void ActivateAccessibility(bool activated); /** + * @brief Get the accessibility address (bus and path) for embedding. + * @return Accessibility address of the root web content element. + */ + Accessibility::Address GetAccessibilityAddress(); + + /** * @brief Request to set the current page's visibility. * @param[in] visible Visible or not. * diff --git a/dali/internal/web-engine/common/web-engine-impl.cpp b/dali/internal/web-engine/common/web-engine-impl.cpp index 75fe93f..808e9c9 100755 --- a/dali/internal/web-engine/common/web-engine-impl.cpp +++ b/dali/internal/web-engine/common/web-engine-impl.cpp @@ -515,6 +515,11 @@ void WebEngine::ActivateAccessibility(bool activated) mPlugin->ActivateAccessibility(activated); } +Accessibility::Address WebEngine::GetAccessibilityAddress() +{ + return mPlugin->GetAccessibilityAddress(); +} + bool WebEngine::SetVisibility(bool visible) { return mPlugin->SetVisibility(visible); diff --git a/dali/internal/web-engine/common/web-engine-impl.h b/dali/internal/web-engine/common/web-engine-impl.h index d68f3a4..0423b6b 100755 --- a/dali/internal/web-engine/common/web-engine-impl.h +++ b/dali/internal/web-engine/common/web-engine-impl.h @@ -22,6 +22,7 @@ #include // INTERNAL INCLUDES +#include #include #include @@ -400,6 +401,11 @@ public: void ActivateAccessibility(bool activated); /** + * @copydoc Dali::WebEngine::GetAccessibilityAddress() + */ + Accessibility::Address GetAccessibilityAddress(); + + /** * @copydoc Dali::WebEngine::SetVisibility() */ bool SetVisibility(bool visible); -- 2.7.4