Chromium Code Reviews| 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 82% |
| rename from ash/system/chromeos/session/logout_confirmation_dialog.cc |
| rename to ash/common/system/chromeos/session/logout_confirmation_dialog.cc |
| index 3464639a33fc6b2741c5a0a650a95d6c02c081c1..da245b4d25b092630777e15f16aeec57fdb6faae 100644 |
| --- a/ash/system/chromeos/session/logout_confirmation_dialog.cc |
| +++ b/ash/common/system/chromeos/session/logout_confirmation_dialog.cc |
| @@ -2,17 +2,20 @@ |
| // 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 "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 +46,15 @@ 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() |
|
msw
2016/06/28 19:31:03
aside: I wish this were easier, but I don't see a
James Cook
2016/06/28 20:14:46
Acknowledged.
|
| + ->GetPrimaryRootWindowController() |
| + ->ConfigureWidgetInitParamsForContainer( |
| + widget, kShellWindowId_SystemModalContainer, ¶ms); |
| + widget->Init(params); |
| + widget->Show(); |
| update_timer_.Start( |
| FROM_HERE, base::TimeDelta::FromMilliseconds(kCountdownUpdateIntervalMs), |