Index: chrome/browser/ui/login/login_prompt_mac.mm |
diff --git a/chrome/browser/ui/login/login_prompt_mac.mm b/chrome/browser/ui/login/login_prompt_mac.mm |
index 93ccae42c7132471b9e40af593198655f26c85a5..342e55d02a7d6cf806b128db26b683134002749d 100644 |
--- a/chrome/browser/ui/login/login_prompt_mac.mm |
+++ b/chrome/browser/ui/login/login_prompt_mac.mm |
@@ -13,6 +13,7 @@ |
#include "chrome/browser/tab_contents/tab_util.h" |
#include "chrome/browser/ui/cocoa/constrained_window_mac.h" |
#include "chrome/browser/ui/login/login_model.h" |
+#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
#include "content/browser/browser_thread.h" |
#include "content/browser/renderer_host/resource_dispatcher_host.h" |
#include "content/browser/tab_contents/navigation_controller.h" |
@@ -71,7 +72,12 @@ class LoginHandlerMac : public LoginHandler, |
// control). However, that's OK since any UI interaction in those functions |
// will occur via an InvokeLater on the UI thread, which is guaranteed |
// to happen after this is called (since this was InvokeLater'd first). |
- SetDialog(new ConstrainedWindowMac(GetTabContentsForLogin(), this)); |
+ TabContents* requesting_contents = GetTabContentsForLogin(); |
+ DCHECK(requesting_contents); |
+ |
+ TabContentsWrapper* wrapper = |
+ TabContentsWrapper::GetCurrentWrapperForContents(requesting_contents); |
+ SetDialog(new ConstrainedWindowMac(wrapper, this)); |
NotifyAuthNeeded(); |
} |