Index: ash/common/system/chromeos/session/logout_confirmation_dialog.cc |
diff --git a/ash/system/chromeos/session/logout_confirmation_dialog.cc b/ash/common/system/chromeos/session/logout_confirmation_dialog.cc |
similarity index 81% |
rename from ash/system/chromeos/session/logout_confirmation_dialog.cc |
rename to ash/common/system/chromeos/session/logout_confirmation_dialog.cc |
index 3464639a33fc6b2741c5a0a650a95d6c02c081c1..a95a57ee1fb5c34cdbfddf6cfd78622b64753c00 100644 |
--- a/ash/system/chromeos/session/logout_confirmation_dialog.cc |
+++ b/ash/common/system/chromeos/session/logout_confirmation_dialog.cc |
@@ -2,17 +2,21 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "ash/system/chromeos/session/logout_confirmation_dialog.h" |
+#include "ash/common/system/chromeos/session/logout_confirmation_dialog.h" |
+#include "ash/common/shell_window_ids.h" |
+#include "ash/common/system/chromeos/session/logout_confirmation_controller.h" |
#include "ash/common/system/tray/tray_constants.h" |
-#include "ash/shell.h" |
-#include "ash/system/chromeos/session/logout_confirmation_controller.h" |
+#include "ash/common/wm_root_window_controller.h" |
+#include "ash/common/wm_shell.h" |
+#include "ash/common/wm_window.h" |
#include "base/location.h" |
#include "base/time/tick_clock.h" |
#include "grit/ash_strings.h" |
#include "ui/base/l10n/l10n_util.h" |
#include "ui/base/l10n/time_format.h" |
#include "ui/base/ui_base_types.h" |
+#include "ui/gfx/geometry/rect.h" |
#include "ui/gfx/text_constants.h" |
#include "ui/views/border.h" |
#include "ui/views/controls/label.h" |
@@ -43,8 +47,16 @@ LogoutConfirmationDialog::LogoutConfirmationDialog( |
UpdateLabel(); |
- CreateDialogWidget(this, ash::Shell::GetPrimaryRootWindow(), NULL); |
- GetWidget()->Show(); |
+ views::Widget* widget = new views::Widget; |
+ views::Widget::InitParams params = |
+ GetDialogWidgetInitParams(this, nullptr, nullptr, gfx::Rect()); |
+ WmShell::Get() |
+ ->GetPrimaryRootWindow() |
+ ->GetRootWindowController() |
+ ->ConfigureWidgetInitParamsForContainer( |
+ widget, kShellWindowId_SystemModalContainer, ¶ms); |
+ widget->Init(params); |
+ widget->Show(); |
update_timer_.Start( |
FROM_HERE, base::TimeDelta::FromMilliseconds(kCountdownUpdateIntervalMs), |