chrome: Add CefDownloadHandler support (see #3681)

Behaves the same as Alloy runtime except that CanDownload is not
called for invalid protocol schemes.
This commit is contained in:
Marshall Greenblatt
2024-04-26 15:21:33 -04:00
parent ed079792b6
commit be6642df3f
23 changed files with 873 additions and 616 deletions

View File

@ -186,3 +186,18 @@ index 2f769363f8519..228c20926634b 100644
// FYI: Do NOT add any more friends here. The functions above are the ONLY
// ones that need to call AttachTabHelpers; if you think you do, re-read the
// design document linked above, especially the section "Reusing tab helpers".
diff --git chrome/browser/ui/views/download/bubble/download_toolbar_button_view.cc chrome/browser/ui/views/download/bubble/download_toolbar_button_view.cc
index a76c331ec5344..ffe3cbe7ce37c 100644
--- chrome/browser/ui/views/download/bubble/download_toolbar_button_view.cc
+++ chrome/browser/ui/views/download/bubble/download_toolbar_button_view.cc
@@ -850,6 +850,10 @@ void DownloadToolbarButtonView::ShowPendingDownloadStartedAnimation() {
if (!gfx::Animation::ShouldRenderRichAnimation()) {
return;
}
+ if (!IsDrawn()) {
+ // Don't animate with a hidden download button.
+ return;
+ }
content::WebContents* const web_contents =
browser_->tab_strip_model()->GetActiveWebContents();
if (!web_contents ||