Merge pull request #11233 from brenca/devtools-fix
Small devtools fixes
This commit is contained in:
commit
85ef42d99e
1 changed files with 18 additions and 14 deletions
|
@ -1369,22 +1369,26 @@ void NativeWindowViews::ShowAutofillPopup(
|
||||||
const gfx::RectF& bounds,
|
const gfx::RectF& bounds,
|
||||||
const std::vector<base::string16>& values,
|
const std::vector<base::string16>& values,
|
||||||
const std::vector<base::string16>& labels) {
|
const std::vector<base::string16>& labels) {
|
||||||
const auto* web_preferences =
|
|
||||||
WebContentsPreferences::FromWebContents(web_contents)->web_preferences();
|
|
||||||
|
|
||||||
bool is_offsceen = false;
|
bool is_offsceen = false;
|
||||||
web_preferences->GetBoolean("offscreen", &is_offsceen);
|
|
||||||
int guest_instance_id = 0;
|
|
||||||
web_preferences->GetInteger(options::kGuestInstanceID, &guest_instance_id);
|
|
||||||
|
|
||||||
bool is_embedder_offscreen = false;
|
bool is_embedder_offscreen = false;
|
||||||
if (guest_instance_id) {
|
|
||||||
auto manager = WebViewManager::GetWebViewManager(web_contents);
|
auto* web_contents_preferences =
|
||||||
if (manager) {
|
WebContentsPreferences::FromWebContents(web_contents);
|
||||||
auto embedder = manager->GetEmbedder(guest_instance_id);
|
if (web_contents_preferences) {
|
||||||
if (embedder) {
|
const auto* web_preferences = web_contents_preferences->web_preferences();
|
||||||
is_embedder_offscreen = WebContentsPreferences::IsPreferenceEnabled(
|
|
||||||
"offscreen", embedder);
|
web_preferences->GetBoolean("offscreen", &is_offsceen);
|
||||||
|
int guest_instance_id = 0;
|
||||||
|
web_preferences->GetInteger(options::kGuestInstanceID, &guest_instance_id);
|
||||||
|
|
||||||
|
if (guest_instance_id) {
|
||||||
|
auto manager = WebViewManager::GetWebViewManager(web_contents);
|
||||||
|
if (manager) {
|
||||||
|
auto embedder = manager->GetEmbedder(guest_instance_id);
|
||||||
|
if (embedder) {
|
||||||
|
is_embedder_offscreen = WebContentsPreferences::IsPreferenceEnabled(
|
||||||
|
"offscreen", embedder);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue