OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef ASH_SYSTEM_LOGOUT_CONFIRMATION_LOGOUT_CONFIRMATION_DIALOG_H_ | |
6 #define ASH_SYSTEM_LOGOUT_CONFIRMATION_LOGOUT_CONFIRMATION_DIALOG_H_ | |
7 | |
8 #include "base/basictypes.h" | |
9 #include "base/compiler_specific.h" | |
10 #include "base/time/time.h" | |
11 #include "base/timer/timer.h" | |
12 #include "ui/views/window/dialog_delegate.h" | |
13 | |
14 namespace views { | |
15 class Label; | |
16 } | |
17 | |
18 namespace ash { | |
19 namespace internal { | |
20 | |
21 class LogoutConfirmationController; | |
22 | |
23 // A dialog that asks the user to confirm or deny logout. The dialog shows a | |
24 // countdown and informs the user that a logout will happen automatically if no | |
25 // choice is made before the countdown has expired. | |
26 class LogoutConfirmationDialog : public views::DialogDelegateView { | |
27 public: | |
28 LogoutConfirmationDialog(LogoutConfirmationController* controller, | |
29 base::TimeTicks logout_time); | |
30 virtual ~LogoutConfirmationDialog(); | |
31 | |
32 void Update(base::TimeTicks logout_time); | |
33 | |
34 // views::DialogDelegateView: | |
35 virtual bool Accept() OVERRIDE; | |
36 virtual ui::ModalType GetModalType() const OVERRIDE; | |
37 virtual base::string16 GetWindowTitle() const OVERRIDE; | |
38 virtual base::string16 | |
39 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE; | |
stevenjb
2014/02/27 17:58:44
clang format says:
virtual base::string16 GetDial
bartfab (slow)
2014/02/28 12:13:49
Either one is allowed by the style guide. I have n
| |
40 virtual void OnClosed() OVERRIDE; | |
41 virtual void DeleteDelegate() OVERRIDE; | |
42 | |
43 private: | |
44 void UpdateLabel(); | |
45 | |
46 LogoutConfirmationController* controller_; | |
47 base::TimeTicks logout_time_; | |
48 | |
49 views::Label* label_; | |
50 | |
51 base::RepeatingTimer<LogoutConfirmationDialog> update_timer_; | |
52 | |
53 DISALLOW_COPY_AND_ASSIGN(LogoutConfirmationDialog); | |
54 }; | |
55 | |
56 } // namespace internal | |
57 } // namespace ash | |
58 | |
59 #endif // ASH_SYSTEM_LOGOUT_CONFIRMATION_LOGOUT_CONFIRMATION_DIALOG_H_ | |
OLD | NEW |