mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
Don't rely on process_id to search for NativeWindow
This commit is contained in:
@@ -85,7 +85,7 @@ v8::Persistent<v8::ObjectTemplate> template_;
|
||||
// Get the window that has the |guest| embedded.
|
||||
NativeWindow* GetWindowFromGuest(const content::WebContents* guest) {
|
||||
WebViewManager::WebViewInfo info;
|
||||
if (WebViewManager::GetInfoForProcess(guest->GetRenderProcessHost(), &info))
|
||||
if (WebViewManager::GetInfoForWebContents(guest, &info))
|
||||
return NativeWindow::FromWebContents(info.embedder);
|
||||
else
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user