Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: ash/system/chromeos/session/logout_confirmation_controller.cc

Issue 1729723003: Reland: Remove DialogDelegate::OnClosed() which is redundant with (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: with fix Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ash/system/chromeos/session/logout_confirmation_dialog.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/system/chromeos/session/logout_confirmation_controller.h" 5 #include "ash/system/chromeos/session/logout_confirmation_controller.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/session/session_state_delegate.h" 9 #include "ash/session/session_state_delegate.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 12 matching lines...) Expand all
23 dialog_(NULL), 23 dialog_(NULL),
24 logout_timer_(false, false) { 24 logout_timer_(false, false) {
25 if (Shell::HasInstance()) 25 if (Shell::HasInstance())
26 Shell::GetInstance()->AddShellObserver(this); 26 Shell::GetInstance()->AddShellObserver(this);
27 } 27 }
28 28
29 LogoutConfirmationController::~LogoutConfirmationController() { 29 LogoutConfirmationController::~LogoutConfirmationController() {
30 if (Shell::HasInstance()) 30 if (Shell::HasInstance())
31 Shell::GetInstance()->RemoveShellObserver(this); 31 Shell::GetInstance()->RemoveShellObserver(this);
32 if (dialog_) 32 if (dialog_)
33 dialog_->GetWidget()->Close(); 33 dialog_->ControllerGone();
34 } 34 }
35 35
36 void LogoutConfirmationController::ConfirmLogout( 36 void LogoutConfirmationController::ConfirmLogout(
37 base::TimeTicks logout_time) { 37 base::TimeTicks logout_time) {
38 if (!logout_time_.is_null() && logout_time >= logout_time_) { 38 if (!logout_time_.is_null() && logout_time >= logout_time_) {
39 // If a confirmation dialog is already being shown and its countdown expires 39 // If a confirmation dialog is already being shown and its countdown expires
40 // no later than the |logout_time| requested now, keep the current dialog 40 // no later than the |logout_time| requested now, keep the current dialog
41 // open. 41 // open.
42 return; 42 return;
43 } 43 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 logout_closure_.Run(); 78 logout_closure_.Run();
79 } 79 }
80 80
81 void LogoutConfirmationController::OnDialogClosed() { 81 void LogoutConfirmationController::OnDialogClosed() {
82 logout_time_ = base::TimeTicks(); 82 logout_time_ = base::TimeTicks();
83 dialog_ = NULL; 83 dialog_ = NULL;
84 logout_timer_.Stop(); 84 logout_timer_.Stop();
85 } 85 }
86 86
87 } // namespace ash 87 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/system/chromeos/session/logout_confirmation_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698