Index: chrome/browser/chromeos/sim_dialog_delegate.cc |
diff --git a/chrome/browser/chromeos/sim_dialog_delegate.cc b/chrome/browser/chromeos/sim_dialog_delegate.cc |
index babd901ee49b2ac231a927a5de285c8ad0e436c8..f21fde7f6caf59ffdd684c1bdd4845c911c45656 100644 |
--- a/chrome/browser/chromeos/sim_dialog_delegate.cc |
+++ b/chrome/browser/chromeos/sim_dialog_delegate.cc |
@@ -6,6 +6,7 @@ |
#include "base/strings/stringprintf.h" |
#include "chrome/browser/profiles/profile_manager.h" |
+#include "chrome/browser/ui/ash/system_tray_client.h" |
#include "chrome/browser/ui/browser_dialogs.h" |
#include "chrome/common/url_constants.h" |
#include "ui/gfx/geometry/size.h" |
@@ -35,9 +36,14 @@ namespace chromeos { |
// static |
void SimDialogDelegate::ShowDialog(gfx::NativeWindow owning_window, |
SimDialogMode mode) { |
- chrome::ShowWebDialog(owning_window, |
- ProfileManager::GetActiveUserProfile(), |
- new SimDialogDelegate(mode)); |
+ Profile* profile = ProfileManager::GetActiveUserProfile(); |
+ if (owning_window) { |
+ chrome::ShowWebDialog(owning_window, profile, new SimDialogDelegate(mode)); |
+ } else { |
+ chrome::ShowWebDialogInContainer( |
+ SystemTrayClient::GetDialogParentContainerId(), profile, |
+ new SimDialogDelegate(mode)); |
+ } |
} |
SimDialogDelegate::SimDialogDelegate(SimDialogMode dialog_mode) |