mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
chrome: Improve positioning of dialogs (fixes #3628)
Dialogs will be excluded from regions near the top of the window that contain overlays, draggable regions or titlebar.
This commit is contained in:
@ -93,8 +93,15 @@ CefRefPtr<ChromeBrowserHostImpl> ChromeBrowserHostImpl::GetBrowserForGlobalId(
|
||||
CefRefPtr<ChromeBrowserHostImpl> ChromeBrowserHostImpl::GetBrowserForBrowser(
|
||||
const Browser* browser) {
|
||||
REQUIRE_CHROME_RUNTIME();
|
||||
return GetBrowserForContents(
|
||||
browser->tab_strip_model()->GetActiveWebContents());
|
||||
// Return the ChromeBrowserHostImpl that is currently active.
|
||||
// Views-hosted Browsers will contain a single ChromeBrowserHostImpl.
|
||||
// Otherwise, there will be a ChromeBrowserHostImpl per Tab/WebContents.
|
||||
// |contents| may be nullptr during Browser initialization or destruction.
|
||||
auto contents = browser->tab_strip_model()->GetActiveWebContents();
|
||||
if (!contents) {
|
||||
return nullptr;
|
||||
}
|
||||
return GetBrowserForContents(contents);
|
||||
}
|
||||
|
||||
ChromeBrowserHostImpl::~ChromeBrowserHostImpl() = default;
|
||||
|
Reference in New Issue
Block a user