[WRTjs][VD][PPFWK] Set window ID for share 85/308585/6
authorDongHyun Song <dh81.song@samsung.com>
Thu, 28 Mar 2024 01:30:03 +0000 (10:30 +0900)
committerBot Blink <blinkbot@samsung.com>
Fri, 29 Mar 2024 11:27:57 +0000 (11:27 +0000)
WRT already get the wayland resource ID before SetWindowId.
So, EwkExtensionSystemDelegate::SetWindowId() don't need to work
same thing.
Getting wayland resource ID sometimes takes much time about 50~100ms
due to IPC with wayland server.

Change-Id: I9f6d2bc5faa1c82d3b1d84a4d90ea76f6ef08be8
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
tizen_src/ewk/efl_integration/ewk_extension_system_delegate.cc
tizen_src/ewk/efl_integration/ewk_extension_system_delegate.h
wrt/src/browser/tv/wrt_native_window_tv.cc

index 5fd389d..1eefb1a 100644 (file)
@@ -236,6 +236,10 @@ void EwkExtensionSystemDelegate::SetGenericSyncCallback(
   cb_data_ = data;
 }
 
+void EwkExtensionSystemDelegate::SetWindowId(const int window_id) {
+  window_id_ = window_id;
+}
+
 void EwkExtensionSystemDelegate::SetWindowId(const Evas_Object* main_window) {
 #if BUILDFLAG(IS_TIZEN_TV)
   Evas* evas = evas_object_evas_get(main_window);
index f84bec2..874163a 100644 (file)
@@ -31,6 +31,7 @@ class EwkExtensionSystemDelegate : public content::ExtensionSystemDelegate {
   void SetGenericSyncCallback(Generic_Sync_Call_Callback cb, void* data);
 
   void SetWindowId(const Evas_Object* main_window);
+  void SetWindowId(const int window_id);
 
  private:
   Ewk_Value info_;
index 298779f..3fe6bb8 100644 (file)
@@ -1319,7 +1319,10 @@ void WRTNativeWindowTV::SetWindowId() {
     LOG(ERROR) << "No delegate is available to set window id";
     return;
   }
-  delegate->SetWindowId(top_window_);
+  if (global_resource_id)
+    delegate->SetWindowId(global_resource_id);
+  else
+    delegate->SetWindowId(top_window_);
 }
 
 void WRTNativeWindowTV::RegisterPepperExtensionDelegate() {