From bf791c110ff3d6ae9290c9437b536df212b75087 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 14 Jun 2016 09:37:55 -0700 Subject: [PATCH] Tweak type check to consider windows and webviews --- atom/browser/api/atom_api_render_process_preferences.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/atom/browser/api/atom_api_render_process_preferences.cc b/atom/browser/api/atom_api_render_process_preferences.cc index 4781f0603ae5..3d9495d932af 100644 --- a/atom/browser/api/atom_api_render_process_preferences.cc +++ b/atom/browser/api/atom_api_render_process_preferences.cc @@ -26,7 +26,9 @@ bool IsWebContents(v8::Isolate* isolate, content::RenderProcessHost* process) { return false; auto api_web_contents = WebContents::CreateFrom(isolate, web_contents); - return api_web_contents->GetType() != WebContents::Type::REMOTE; + auto type = api_web_contents->GetType(); + return type == WebContents::Type::BROWSER_WINDOW || + type == WebContents::Type::WEB_VIEW; } } // namespace