在browser中打开news.google.com,点击网页中的新闻链接,无法跳转到新闻页面,...
时间:10-02
整理:3721RD
点击:
[DESCRIPTION]
在browser中打开news.google.com,点击网页中的新闻链接,无法跳转到新闻页面,显示空白
[SOLUTION]
請如下修改
在external\chROMium_org\content\browser\web_contents\web_contents_impl.cc
當中的void WebContentSIMpl::CreateNewWindow
在WebContentsImpl* new_contents =
new WebContentsImpl(GetBrowserContext(),
params.opener_suppressed ? NULL : this);
之下, 加上一行new_contents->SetDelegate(delegate_);
之後 mm external/chromium_org
將 libwebviewchromium.so push到/system/lib中
重啟手機之後測試看看
root cause為再開啟新視窗的時候
會建立新的WebContentsImpl
但是沒有創建delegate
當後續要用新的WebContentsImpl load url時
會由於沒有delegate而失敗
這行代碼就是設定delegate
在browser中打开news.google.com,点击网页中的新闻链接,无法跳转到新闻页面,显示空白
[SOLUTION]
請如下修改
在external\chROMium_org\content\browser\web_contents\web_contents_impl.cc
當中的void WebContentSIMpl::CreateNewWindow
在WebContentsImpl* new_contents =
new WebContentsImpl(GetBrowserContext(),
params.opener_suppressed ? NULL : this);
之下, 加上一行new_contents->SetDelegate(delegate_);
之後 mm external/chromium_org
將 libwebviewchromium.so push到/system/lib中
重啟手機之後測試看看
root cause為再開啟新視窗的時候
會建立新的WebContentsImpl
但是沒有創建delegate
當後續要用新的WebContentsImpl load url時
會由於沒有delegate而失敗
這行代碼就是設定delegate