mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-16 20:20:51 +01:00
chrome: Show non-CefBrowserView browser windows on creation (see issue #2969)
Browser windows created via CefBrowserHost::CreateBrowser should be shown at creation time. These windows receive default Chromium styling, unlike CefBrowserView windows which may contain other client-specified Views and where show state can be configured via CefWindowDelegate::GetInitialShowState or by calling CefWindow::Show.
This commit is contained in:
parent
8e39ae2703
commit
7f0c88b5da
@ -117,8 +117,6 @@ void ChromeBrowserHostImpl::AddNewContents(
|
||||
TabStripModel::ADD_ACTIVE);
|
||||
|
||||
SetBrowser(browser);
|
||||
|
||||
browser->window()->Show();
|
||||
}
|
||||
|
||||
void ChromeBrowserHostImpl::OnWebContentsDestroyed(
|
||||
@ -462,15 +460,24 @@ Browser* ChromeBrowserHostImpl::CreateBrowser(
|
||||
// associated BrowserView.
|
||||
auto browser = Browser::Create(chrome_params);
|
||||
|
||||
bool show_browser = true;
|
||||
|
||||
#if defined(TOOLKIT_VIEWS)
|
||||
if (chrome_browser_view) {
|
||||
// Initialize the BrowserFrame and BrowserView and create the controls that
|
||||
// require access to the Browser.
|
||||
chrome_browser_view->InitBrowser(base::WrapUnique(browser),
|
||||
params.browser_view);
|
||||
|
||||
// Don't show the browser by default.
|
||||
show_browser = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (show_browser) {
|
||||
browser->window()->Show();
|
||||
}
|
||||
|
||||
return browser;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user