Index: chrome/browser/ui/webui/chromeos/mobile_setup_dialog.cc |
diff --git a/chrome/browser/ui/webui/chromeos/mobile_setup_dialog.cc b/chrome/browser/ui/webui/chromeos/mobile_setup_dialog.cc |
index cbdee9403b09daca3c0be32558ac8f1bd3f24c8b..49663fe3f05ed994de89d63decb9ef2a19086e8b 100644 |
--- a/chrome/browser/ui/webui/chromeos/mobile_setup_dialog.cc |
+++ b/chrome/browser/ui/webui/chromeos/mobile_setup_dialog.cc |
@@ -7,6 +7,8 @@ |
#include "base/bind.h" |
#include "base/memory/singleton.h" |
#include "base/utf_string_conversions.h" |
+#include "chrome/browser/chromeos/login/webui_login_display_host.h" |
+#include "chrome/browser/chromeos/login/webui_login_view.h" |
#include "chrome/browser/chromeos/mobile/mobile_activator.h" |
#include "chrome/browser/platform_util.h" |
#include "chrome/browser/profiles/profile_manager.h" |
@@ -93,8 +95,20 @@ MobileSetupDialogDelegate::~MobileSetupDialogDelegate() { |
void MobileSetupDialogDelegate::ShowDialog(const std::string& service_path) { |
service_path_ = service_path; |
+ |
+ gfx::NativeWindow parent = NULL; |
+ // If we're on the login screen. |
+ if (chromeos::WebUILoginDisplayHost::default_host()) { |
+ chromeos::WebUILoginDisplayHost* webui_host = |
+ (chromeos::WebUILoginDisplayHost*) |
sky
2012/07/24 04:28:20
static_cast
rkc
2012/07/24 22:07:03
Done.
|
+ chromeos::WebUILoginDisplayHost::default_host(); |
+ chromeos::WebUILoginView* login_view = webui_host->login_view(); |
+ if (login_view) |
+ parent = login_view->GetNativeWindow(); |
+ } |
+ |
dialog_window_ = chrome::ShowWebDialog( |
- NULL, |
+ parent, |
ProfileManager::GetDefaultProfileOrOffTheRecord(), |
this); |
} |