Remove NativeWindow::FromWebContents
This commit is contained in:
parent
eea4e60b73
commit
702f1631a3
4 changed files with 11 additions and 19 deletions
|
@ -209,11 +209,14 @@ void WebContentsPreferences::AppendExtraCommandLineSwitches(
|
|||
if (manager) {
|
||||
auto embedder = manager->GetEmbedder(guest_instance_id);
|
||||
if (embedder) {
|
||||
auto window = NativeWindow::FromWebContents(embedder);
|
||||
if (window) {
|
||||
const bool visible = window->IsVisible() && !window->IsMinimized();
|
||||
if (!visible) {
|
||||
command_line->AppendSwitch(switches::kHiddenPage);
|
||||
auto* relay = NativeWindowRelay::FromWebContents(web_contents);
|
||||
if (relay) {
|
||||
auto* window = relay->window.get();
|
||||
if (window) {
|
||||
const bool visible = window->IsVisible() && !window->IsMinimized();
|
||||
if (!visible) {
|
||||
command_line->AppendSwitch(switches::kHiddenPage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue