[Tizen] Add WebView DeviceListGet,SetDefaultAudio 11/317011/1
authordongsug.song <dongsug.song@samsung.com>
Mon, 23 Dec 2024 05:38:30 +0000 (14:38 +0900)
committerdongsug.song <dongsug.song@samsung.com>
Mon, 23 Dec 2024 05:39:11 +0000 (14:39 +0900)
Change-Id: I091e24086b2afe3176f13d406b10c54a18e6a66e

dali-toolkit/devel-api/controls/web-view/web-settings.cpp
dali-toolkit/devel-api/controls/web-view/web-settings.h
dali-toolkit/devel-api/controls/web-view/web-view.cpp
dali-toolkit/devel-api/controls/web-view/web-view.h
dali-toolkit/internal/controls/web-view/web-view-impl.cpp
dali-toolkit/internal/controls/web-view/web-view-impl.h

index a4178e72fa56f60211f5bc3a9e53855936e6cc9d..e0ab251f8dc3522d69ca4b4e25be3867063a65cb 100755 (executable)
@@ -279,6 +279,12 @@ int WebSettings::GetImeStyle() const
   return mWebEngineSettings.GetImeStyle();
 }
 
+void WebSettings::SetDefaultAudioInputDevice(const std::string& deviceId) const
+{
+  mWebEngineSettings.SetDefaultAudioInputDevice(deviceId);
+}
+
+
 } // namespace Toolkit
 
 } // namespace Dali
index 1708a8ad0acbdb6ca41a07a16568d83ffc8155e8..607c4ec0b5aad896f99071e09fe7c9f603c0034e 100755 (executable)
@@ -426,6 +426,14 @@ public:
    */
   int GetImeStyle() const;
 
+  /**
+   * @brief Sets default audio input device
+   *
+   * @param[in] deviceId default device ID
+   */
+  void SetDefaultAudioInputDevice(const std::string& deviceId) const;
+
+
 private:
   Dali::WebEngineSettings& mWebEngineSettings;
 };
index 4c3556fa381b5a495f5d67fede46853c2c3022ac..065e8717bc5da197531f57360c88b7877cc0dca6 100755 (executable)
@@ -484,6 +484,16 @@ void WebView::RegisterUserMediaPermissionRequestCallback(Dali::WebEnginePlugin::
   Dali::Toolkit::GetImpl(*this).RegisterUserMediaPermissionRequestCallback(callback);
 }
 
+void WebView::RegisterDeviceConnectionChangedCallback(Dali::WebEnginePlugin::WebEngineDeviceConnectionChangedCallback callback)
+{
+  Dali::Toolkit::GetImpl(*this).RegisterDeviceConnectionChangedCallback(callback);
+}
+
+void WebView::RegisterDeviceListGetCallback(Dali::WebEnginePlugin::WebEngineDeviceListGetCallback callback)
+{
+  Dali::Toolkit::GetImpl(*this).RegisterDeviceListGetCallback(callback);
+}
+
 void WebView::FeedMouseWheel(bool yDirection, int step, int x, int y)
 {
   Dali::Toolkit::GetImpl(*this).FeedMouseWheel(yDirection, step, x, y);
index 62a68a0d8e7e28ece1950abef892e9e48c78459c..8b2e7c7be61b12564c41f012779a76afa1bd6840 100755 (executable)
@@ -864,6 +864,20 @@ public:
    */
   void FeedMouseWheel(bool yDirection, int step, int x, int y);
 
+  /**
+   * @brief Register DeviceConnectionChanged callback.
+   *
+   * @param[in] callback The callback to be called for handling device connection changed event.
+   */
+  void RegisterDeviceConnectionChangedCallback(Dali::WebEnginePlugin::WebEngineDeviceConnectionChangedCallback callback);
+
+  /**
+   * @brief Register DeviceListGet callback.
+   *
+   * @param[in] callback The callback to be called for getting device list.
+   */
+  void RegisterDeviceListGetCallback(Dali::WebEnginePlugin::WebEngineDeviceListGetCallback callback);
+
 
 public: // Not intended for application developers
   /// @cond internal
index 549423f97573176d850d0dca9963153bad0feb6d..f37a00cc7b1a6b50bc8d7c3f8adb6d2bd9a4658c 100644 (file)
@@ -990,6 +990,22 @@ void WebView::RegisterUserMediaPermissionRequestCallback(Dali::WebEnginePlugin::
   }
 }
 
+void WebView::RegisterDeviceConnectionChangedCallback(Dali::WebEnginePlugin::WebEngineDeviceConnectionChangedCallback callback)
+{
+  if(mWebEngine)
+  {
+    mWebEngine.RegisterDeviceConnectionChangedCallback(std::move(callback));
+  }
+}
+
+void WebView::RegisterDeviceListGetCallback(Dali::WebEnginePlugin::WebEngineDeviceListGetCallback callback)
+{
+  if(mWebEngine)
+  {
+    mWebEngine.RegisterDeviceListGetCallback(std::move(callback));
+  }
+}
+
 void WebView::FeedMouseWheel(bool yDirection, int step, int x, int y)
 {
   if(mWebEngine)
index 559ac5db2c3ddcb1085ebe7224b2acec2c4fc231..8cf453c3a41d020f183b72aef7a5b35f64190a1f 100644 (file)
@@ -482,6 +482,16 @@ public:
    */
   void RegisterUserMediaPermissionRequestCallback(Dali::WebEnginePlugin::WebEngineUserMediaPermissionRequestCallback callback);
 
+  /**
+   * @copydoc Dali::Toolkit::WebView::RegisterDeviceConnectionChangedCallback()
+   */
+  void RegisterDeviceConnectionChangedCallback(Dali::WebEnginePlugin::WebEngineDeviceConnectionChangedCallback callback);
+
+  /**
+   * @copydoc Dali::Toolkit::WebView::RegisterDeviceListGetCallback()
+   */
+  void RegisterDeviceListGetCallback(Dali::WebEnginePlugin::WebEngineDeviceListGetCallback callback);
+
   /**
    * @copydoc Dali::Toolkit::WebView::FeedMouseWheel()
    */