| OLD | NEW |
| 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 #ifndef ASH_SYSTEM_CHROMEOS_SESSION_LOGOUT_CONFIRMATION_CONTROLLER_H_ | 5 #ifndef ASH_SYSTEM_CHROMEOS_SESSION_LOGOUT_CONFIRMATION_CONTROLLER_H_ |
| 6 #define ASH_SYSTEM_CHROMEOS_SESSION_LOGOUT_CONFIRMATION_CONTROLLER_H_ | 6 #define ASH_SYSTEM_CHROMEOS_SESSION_LOGOUT_CONFIRMATION_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/shell_observer.h" | 9 #include "ash/shell_observer.h" |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
| 14 #include "base/timer/timer.h" | 14 #include "base/timer/timer.h" |
| 15 | 15 |
| 16 namespace base { | 16 namespace base { |
| 17 class TickClock; | 17 class TickClock; |
| 18 } | 18 } |
| 19 | 19 |
| 20 namespace ash { | 20 namespace ash { |
| 21 namespace internal { | |
| 22 | 21 |
| 23 class LogoutConfirmationDialog; | 22 class LogoutConfirmationDialog; |
| 24 | 23 |
| 25 // This class shows a dialog asking the user to confirm or deny logout and | 24 // This class shows a dialog asking the user to confirm or deny logout and |
| 26 // terminates the session if the user either confirms or allows the countdown | 25 // terminates the session if the user either confirms or allows the countdown |
| 27 // shown in the dialog to expire. | 26 // shown in the dialog to expire. |
| 28 // It is guaranteed that no more than one confirmation dialog will be visible at | 27 // It is guaranteed that no more than one confirmation dialog will be visible at |
| 29 // any given time. If there are multiple requests to show a confirmation dialog | 28 // any given time. If there are multiple requests to show a confirmation dialog |
| 30 // at the same time, the dialog whose countdown expires first is shown. | 29 // at the same time, the dialog whose countdown expires first is shown. |
| 31 class ASH_EXPORT LogoutConfirmationController : public ShellObserver { | 30 class ASH_EXPORT LogoutConfirmationController : public ShellObserver { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 58 scoped_ptr<base::TickClock> clock_; | 57 scoped_ptr<base::TickClock> clock_; |
| 59 base::Closure logout_closure_; | 58 base::Closure logout_closure_; |
| 60 | 59 |
| 61 base::TimeTicks logout_time_; | 60 base::TimeTicks logout_time_; |
| 62 LogoutConfirmationDialog* dialog_; // Owned by the Views hierarchy. | 61 LogoutConfirmationDialog* dialog_; // Owned by the Views hierarchy. |
| 63 base::Timer logout_timer_; | 62 base::Timer logout_timer_; |
| 64 | 63 |
| 65 DISALLOW_COPY_AND_ASSIGN(LogoutConfirmationController); | 64 DISALLOW_COPY_AND_ASSIGN(LogoutConfirmationController); |
| 66 }; | 65 }; |
| 67 | 66 |
| 68 } // namespace internal | |
| 69 } // namespace ash | 67 } // namespace ash |
| 70 | 68 |
| 71 #endif // ASH_SYSTEM_CHROMEOS_SESSION_LOGOUT_CONFIRMATION_CONTROLLER_H_ | 69 #endif // ASH_SYSTEM_CHROMEOS_SESSION_LOGOUT_CONFIRMATION_CONTROLLER_H_ |
| OLD | NEW |