Simplify how we find NativeWindow from WebContents

This commit is contained in:
Cheng Zhao 2015-05-20 10:27:16 +08:00
parent cda8b119e2
commit 7c69c2846b
4 changed files with 8 additions and 16 deletions

View file

@ -124,8 +124,7 @@ void AtomBrowserClient::OverrideWebkitPrefs(
return;
}
NativeWindow* window = NativeWindow::FromRenderView(
process->GetID(), render_view_host->GetRoutingID());
NativeWindow* window = NativeWindow::FromWebContents(web_contents);
if (window)
window->OverrideWebkitPrefs(prefs);
}