mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
chrome: Add setting for controlling the status bubble (fixes isse #3279)
This change adds `CefBrowserSettings.chrome_status_bubble` for controlling whether the Chrome status bubble will be used. Testable in cefclient by passing the `--hide-chrome-status-bubble` command-line flag.
This commit is contained in:
@@ -72,6 +72,22 @@ void ChromeBrowserDelegate::SetAsDelegate(content::WebContents* web_contents,
|
||||
request_context_impl);
|
||||
}
|
||||
|
||||
bool ChromeBrowserDelegate::ShowStatusBubble(bool show_by_default) {
|
||||
if (!show_status_bubble_.has_value()) {
|
||||
show_status_bubble_ = show_by_default;
|
||||
if (auto browser = ChromeBrowserHostImpl::GetBrowserForBrowser(browser_)) {
|
||||
const auto& state = browser->settings().chrome_status_bubble;
|
||||
if (show_by_default && state == STATE_DISABLED) {
|
||||
show_status_bubble_ = false;
|
||||
} else if (!show_by_default && state == STATE_ENABLED) {
|
||||
show_status_bubble_ = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return *show_status_bubble_;
|
||||
}
|
||||
|
||||
void ChromeBrowserDelegate::WebContentsCreated(
|
||||
content::WebContents* source_contents,
|
||||
int opener_render_process_id,
|
||||
|
Reference in New Issue
Block a user