pass on web_contents to properly handle devtools

This commit is contained in:
Heilig Benedek 2017-11-03 03:01:26 +01:00 committed by Cheng Zhao
parent 573f664899
commit 276e12ce71
5 changed files with 28 additions and 7 deletions

View file

@ -1358,15 +1358,16 @@ void NativeWindowViews::HandleKeyboardEvent(
void NativeWindowViews::ShowAutofillPopup(
content::RenderFrameHost* frame_host,
content::WebContents* web_contents,
const gfx::RectF& bounds,
const std::vector<base::string16>& values,
const std::vector<base::string16>& labels) {
WebContentsPreferences* web_preferences =
WebContentsPreferences::FromWebContents(web_contents());
WebContentsPreferences::FromWebContents(web_contents);
bool isOffsceen = web_preferences->IsOffScreen(web_contents());
bool isEmbedderOffscreen = web_preferences->IsGuest(web_contents()) &&
web_preferences->IsOffScreen(web_preferences->Embedder(web_contents()));
bool isOffsceen = web_preferences->IsOffScreen(web_contents);
bool isEmbedderOffscreen = web_preferences->IsGuest(web_contents) &&
web_preferences->IsOffScreen(web_preferences->Embedder(web_contents));
autofill_popup_->CreateView(
frame_host,