Add WebContentsPreferences::From that checks parameter
This commit is contained in:
parent
9772777919
commit
887bc12350
7 changed files with 21 additions and 15 deletions
|
@ -1370,14 +1370,12 @@ void NativeWindowViews::ShowAutofillPopup(
|
|||
bool is_offsceen = false;
|
||||
bool is_embedder_offscreen = false;
|
||||
|
||||
auto* web_contents_preferences =
|
||||
WebContentsPreferences::FromWebContents(web_contents);
|
||||
if (web_contents_preferences) {
|
||||
const auto* web_preferences = web_contents_preferences->dict();
|
||||
|
||||
web_preferences->GetBoolean("offscreen", &is_offsceen);
|
||||
auto* web_preferences = WebContentsPreferences::From(web_contents);
|
||||
if (web_preferences) {
|
||||
web_preferences->dict()->GetBoolean("offscreen", &is_offsceen);
|
||||
int guest_instance_id = 0;
|
||||
web_preferences->GetInteger(options::kGuestInstanceID, &guest_instance_id);
|
||||
web_preferences->dict()->GetInteger(options::kGuestInstanceID,
|
||||
&guest_instance_id);
|
||||
|
||||
if (guest_instance_id) {
|
||||
auto manager = WebViewManager::GetWebViewManager(web_contents);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue