Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Unified Diff: chrome/browser/download/download_danger_prompt.cc

Issue 18179004: Dismiss action in tab modal dialogs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make the tests pass with GTK and Cocoa Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/download/download_danger_prompt.cc
diff --git a/chrome/browser/download/download_danger_prompt.cc b/chrome/browser/download/download_danger_prompt.cc
index d75c6cc040c60b343fb0679b3fa7702b1508492f..11ab010b0013e71c595ff2bf8d51f6450e4626f6 100644
--- a/chrome/browser/download/download_danger_prompt.cc
+++ b/chrome/browser/download/download_danger_prompt.cc
@@ -41,6 +41,7 @@ class DownloadDangerPromptImpl
virtual string16 GetAcceptButtonTitle() OVERRIDE;
virtual void OnAccepted() OVERRIDE;
virtual void OnCanceled() OVERRIDE;
+ virtual void OnClosed() OVERRIDE;
// Runs |callback|. PrepareToClose() is called beforehand. Doing so prevents
// this object from responding to state changes in |download_| that might
@@ -143,6 +144,10 @@ void DownloadDangerPromptImpl::OnCanceled() {
RunCallback(canceled_);
}
+void DownloadDangerPromptImpl::OnClosed() {
+ RunCallback(canceled_);
+}
+
void DownloadDangerPromptImpl::RunCallback(const base::Closure& callback) {
// Invoking the callback can cause the download item state to change or cause
// the constrained window to close, and |callback| refers to a member

Powered by Google App Engine
This is Rietveld 408576698