| Index: chrome/browser/chromeos/ui/idle_logout_dialog_view.cc
|
| diff --git a/chrome/browser/chromeos/ui/idle_logout_dialog_view.cc b/chrome/browser/chromeos/ui/idle_logout_dialog_view.cc
|
| index 63b9c7e9877a9280383f4090424838650db56c96..acbc569947b75ab44bf28ad303192949b5bd0f9b 100644
|
| --- a/chrome/browser/chromeos/ui/idle_logout_dialog_view.cc
|
| +++ b/chrome/browser/chromeos/ui/idle_logout_dialog_view.cc
|
| @@ -76,7 +76,7 @@ void IdleLogoutDialogView::ShowDialog() {
|
| // static
|
| void IdleLogoutDialogView::CloseDialog() {
|
| if (g_instance)
|
| - g_instance->Close();
|
| + g_instance->GetWidget()->Close();
|
| }
|
|
|
| ////////////////////////////////////////////////////////////////////////////////
|
| @@ -93,6 +93,17 @@ string16 IdleLogoutDialogView::GetWindowTitle() const {
|
| return l10n_util::GetStringUTF16(IDS_IDLE_LOGOUT_TITLE);
|
| }
|
|
|
| +bool IdleLogoutDialogView::Close() {
|
| + if (timer_.IsRunning())
|
| + timer_.Stop();
|
| +
|
| + // We just closed our dialog. The global
|
| + // instance is invalid now, set it to null.
|
| + g_instance = NULL;
|
| +
|
| + return true;
|
| +}
|
| +
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // IdleLogoutDialog private methods
|
| IdleLogoutDialogView::IdleLogoutDialogView()
|
| @@ -161,18 +172,6 @@ void IdleLogoutDialogView::Show() {
|
| &IdleLogoutDialogView::UpdateCountdown);
|
| }
|
|
|
| -void IdleLogoutDialogView::Close() {
|
| - DCHECK(GetWidget());
|
| -
|
| - if (timer_.IsRunning())
|
| - timer_.Stop();
|
| - GetWidget()->Close();
|
| -
|
| - // We just closed our dialog. The global
|
| - // instance is invalid now, set it to null.
|
| - g_instance = NULL;
|
| -}
|
| -
|
| void IdleLogoutDialogView::UpdateCountdown() {
|
| base::TimeDelta logout_warning_time = countdown_end_time_ -
|
| base::Time::Now();
|
|
|