summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download
diff options
context:
space:
mode:
authorbenjhayden@chromium.org <benjhayden@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-24 15:29:42 +0000
committerbenjhayden@chromium.org <benjhayden@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-24 15:29:42 +0000
commit14ddecf6d7cbf70df1b5228987218290463ab954 (patch)
tree63f0501bfc4862d816ece81f1173d416a129182d /chrome/browser/download
parentb34c9798800d02c77131adc38fac3e76ae6de516 (diff)
downloadchromium_src-14ddecf6d7cbf70df1b5228987218290463ab954.zip
chromium_src-14ddecf6d7cbf70df1b5228987218290463ab954.tar.gz
chromium_src-14ddecf6d7cbf70df1b5228987218290463ab954.tar.bz2
Fix a crash in downloads.acceptDanger()
On mac, when the ConstrainedWindow (DownloadDangerPrompt) stole key-ness from the extension popup, the popup was automatically closing, which would automatically close the DownloadDangerPrompt before the user could interact with it. Now when ExtensionPopupController receives a windowDidResignKey notification, it drops the notification if there are any modal dialogs showing for its WebContents. There's also an extra windowDidResignKey notification right after the modal dialog closes, so ExtensionPopupController::windowDidResignKey() sets a flag to ignore it. TabModalConfirmDialogMac::OnConstrainedWindowClosed() could be called twice causing double-deletes. Passing the delegate_ to a stack variable allows the second call to return before double-deleting. Add DownloadsAcceptDangerFunction::OnPromptCreatedForTesting(callback) so that the browser test can fake the user clicking in the DownloadDangerPrompt. Override ChromeWebModalDialogManagerDelegate::GetWebContentsModalDialogHost() in ExtensionHost to return a valid WebContentsModalDialogHost (ExtensionDialogHost) instead of NULL. This object is necessary in CreateWebContentsModalDialogViews(). ExtensionHost outlives ExtensionDialogHost which outlives the dialog. BUG=273114 Review URL: https://chromiumcodereview.appspot.com/23064010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219455 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download')
-rw-r--r--chrome/browser/download/download_danger_prompt.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/chrome/browser/download/download_danger_prompt.h b/chrome/browser/download/download_danger_prompt.h
index 8c2407f..e1b5c61 100644
--- a/chrome/browser/download/download_danger_prompt.h
+++ b/chrome/browser/download/download_danger_prompt.h
@@ -43,9 +43,6 @@ class DownloadDangerPrompt {
bool show_context,
const OnDone& done);
- protected:
- friend class DownloadDangerPromptTest;
-
// Only to be used by tests. Subclasses must override to manually call the
// respective button click handler.
virtual void InvokeActionForTesting(Action action) = 0;