osr: Support DevTools windows with Chrome runtime Alloy style (see #3681)

This commit is contained in:
Marshall Greenblatt
2024-05-20 16:21:37 -04:00
parent 6da73a3d31
commit 99c85e32ac
4 changed files with 53 additions and 0 deletions

View File

@ -64,4 +64,12 @@ bool GetAlloyTabById(int tab_id,
return false;
}
bool IsAlloyContents(content::WebContents* contents, bool primary_only) {
auto browser = CefBrowserHostBase::GetBrowserForContents(contents);
if (browser && browser->IsAlloyStyle()) {
return !primary_only || browser->GetWebContents() == contents;
}
return false;
}
} // namespace cef