Don't rely on process_id to search for NativeWindow
This commit is contained in:
parent
6dfa7b5383
commit
d4be2da70e
7 changed files with 36 additions and 65 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue