[M120 Migration][VD] Add debug log for create new window process. 83/308383/2
authorfeifei08.liu <feifei08.liu@samsung.com>
Fri, 22 Mar 2024 10:45:49 +0000 (18:45 +0800)
committerYanqing Lu <yanqing.lu@samsung.com>
Mon, 25 Mar 2024 07:56:50 +0000 (07:56 +0000)
Add some debug logs in window create process.
Sometimes window.open()/target="_blank" will
create a new window in app. Currently wrt not
support this situation. Add some logs for
locating similar issue in furture.

Reference:
- https://review.tizen.org/gerrit/291159/

Change-Id: I15dba40f38522b42d5cda9eea0ecf406da111c1c
Signed-off-by: feifei08.liu <feifei08.liu@samsung.com>
content/browser/renderer_host/navigation_controller_impl.cc
content/renderer/render_frame_impl.cc
tizen_src/chromium_impl/content/browser/web_contents/web_contents_impl_efl.cc
tizen_src/ewk/efl_integration/eweb_view.cc

index 93ac168..8de75f8 100644 (file)
@@ -1275,6 +1275,10 @@ base::WeakPtr<NavigationHandle> NavigationControllerImpl::LoadURLWithParams(
   if (params.is_renderer_initiated)
     DCHECK(params.initiator_origin.has_value());
 
+#if BUILDFLAG(IS_TIZEN_TV)
+  LOG(ERROR) << "url: " << params.url.possibly_invalid_spec();
+#endif
+
   TRACE_EVENT1("browser,navigation",
                "NavigationControllerImpl::LoadURLWithParams", "url",
                params.url.possibly_invalid_spec());
index be31843..c9c6c3e 100644 (file)
@@ -6513,6 +6513,9 @@ WebView* RenderFrameImpl::CreateNewWindow(
     const absl::optional<blink::WebPictureInPictureWindowOptions>& pip_options,
     const blink::WebURL& base_url) {
   consumed_user_gesture = false;
+#if BUILDFLAG(IS_TIZEN_TV)
+  LOG(ERROR) << __FUNCTION__;
+#endif
   mojom::CreateNewWindowParamsPtr params = mojom::CreateNewWindowParams::New();
 
   // The user activation check is done at the browser process through
index be4ba5c..be6905d 100644 (file)
@@ -123,8 +123,7 @@ FrameTree* WebContentsImplEfl::CreateNewWindow(
     bool has_user_gesture,
     SessionStorageNamespace* session_storage_namespace) {
   // Added for EFL implementation
-  LOG(INFO) << __FUNCTION__ << ", opener:" << opener
-            << ", target url: " << params.target_url;
+  LOG(INFO) << "opener:" << opener << ", target url: " << params.target_url;
   WebContents* new_contents = nullptr;
   WebViewDelegate::WebContentsCreateCallback callback = base::BindRepeating(
       &WebContentsImplEfl::HandleNewWebContentsCreate, base::Unretained(this),
@@ -159,6 +158,9 @@ WebContents* WebContentsImplEfl::HandleNewWebContentsCreate(
     SessionStorageNamespace* session_storage_namespace,
     WebContents** new_contents_out,
     void* platform_data) {
+#if BUILDFLAG(IS_TIZEN_TV)
+  LOG(ERROR) << __FUNCTION__;
+#endif
   platform_data_for_new_window_ = platform_data;
   WebContentsImpl::CreateNewWindow(opener, params, is_new_browsing_instance,
                                    has_user_gesture, session_storage_namespace);
index 62823cf..22539f1 100644 (file)
@@ -633,6 +633,9 @@ bool EWebView::SetPageVisibility(
 
 bool EWebView::CreateNewWindow(
     content::WebViewDelegate::WebContentsCreateCallback cb) {
+#if BUILDFLAG(IS_TIZEN_TV)
+  LOG(INFO) << __FUNCTION__;
+#endif
   create_new_window_web_contents_cb_ = cb;
   Evas_Object* new_object = NULL;
   SmartCallback<EWebViewCallbacks::CreateNewWindow>().call(&new_object);