Merge pull request #1732 from atom/web-preferences
Simplify how we find NativeWindow from WebContents
This commit is contained in:
commit
b558485394
4 changed files with 8 additions and 16 deletions
|
@ -51,9 +51,7 @@ v8::Persistent<v8::ObjectTemplate> template_;
|
|||
NativeWindow* GetWindowFromGuest(const content::WebContents* guest) {
|
||||
WebViewManager::WebViewInfo info;
|
||||
if (WebViewManager::GetInfoForProcess(guest->GetRenderProcessHost(), &info))
|
||||
return NativeWindow::FromRenderView(
|
||||
info.embedder->GetRenderProcessHost()->GetID(),
|
||||
info.embedder->GetRoutingID());
|
||||
return NativeWindow::FromWebContents(info.embedder);
|
||||
else
|
||||
return nullptr;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue