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

Unified Diff: chrome/browser/ui/cocoa/login_prompt_cocoa.mm

Issue 12276010: Factor out uses of the WebContentsModalDialog interface from platform-independent code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove incorrect override Created 7 years, 10 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/ui/cocoa/login_prompt_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/login_prompt_cocoa.mm b/chrome/browser/ui/cocoa/login_prompt_cocoa.mm
index b3dde5f02daea378464ba2609cbce3d61285c5a2..a259ccfe28edb0367a529a070f30408b49921f90 100644
--- a/chrome/browser/ui/cocoa/login_prompt_cocoa.mm
+++ b/chrome/browser/ui/cocoa/login_prompt_cocoa.mm
@@ -77,16 +77,20 @@ class LoginHandlerMac : public LoginHandler,
initWithCustomWindow:[sheet_controller_ window]]);
constrained_window_.reset(new ConstrainedWindowMac(
this, requesting_contents, sheet));
- SetDialog(constrained_window_.get());
NotifyAuthNeeded();
}
+ virtual void CloseDialog() OVERRIDE {
+ // The hosting WebContentsModalDialog may have been freed.
+ if (constrained_window_)
+ constrained_window_->CloseWebContentsModalDialog();
+ }
+
// Overridden from ConstrainedWindowMacDelegate:
virtual void OnConstrainedWindowClosed(
ConstrainedWindowMac* window) OVERRIDE {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- SetDialog(NULL);
SetModel(NULL);
ReleaseSoon();
« no previous file with comments | « chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm ('k') | chrome/browser/ui/cocoa/tab_modal_confirm_dialog_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698