Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2013 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_BUTTON_LOGOUT_CONFIRMATION_DIALOG_VIEW_H_ | |
| 6 #define ASH_SYSTEM_LOGOUT_BUTTON_LOGOUT_CONFIRMATION_DIALOG_VIEW_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 #include "base/compiler_specific.h" | |
| 10 #include "base/memory/weak_ptr.h" | |
| 11 #include "base/time/time.h" | |
| 12 #include "base/timer/timer.h" | |
| 13 #include "ui/views/window/dialog_delegate.h" | |
| 14 | |
| 15 namespace views { | |
| 16 class Label; | |
| 17 } | |
| 18 | |
| 19 namespace ash { | |
| 20 | |
| 21 namespace internal { | |
| 22 | |
| 23 class LogoutButtonTray; | |
| 24 | |
| 25 // This class implements dialog view for logout confirmation. | |
| 26 class LogoutConfirmationDialogView : | |
|
bartfab (slow)
2013/10/30 11:17:28
Nit: The : goes on the next line.
binjin
2013/11/19 14:43:46
Done.
| |
| 27 public views::DialogDelegateView, | |
| 28 public base::SupportsWeakPtr<LogoutConfirmationDialogView> { | |
| 29 public: | |
| 30 LogoutConfirmationDialogView(); | |
|
bartfab (slow)
2013/10/30 11:17:28
clang will complain that you need a virtual ~Logou
binjin
2013/11/19 14:43:46
Done.
| |
| 31 | |
| 32 // views::DialogDelegateView: | |
| 33 virtual bool Accept() OVERRIDE; | |
| 34 virtual ui::ModalType GetModalType() const OVERRIDE; | |
| 35 virtual string16 GetWindowTitle() const OVERRIDE; | |
| 36 virtual string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE; | |
| 37 | |
| 38 void Show(base::TimeDelta duration); | |
| 39 void UpdateCountdown(); | |
|
bartfab (slow)
2013/10/30 11:17:28
This should be private.
binjin
2013/11/19 14:43:46
Done.
| |
| 40 void UpdateDialogDuration(base::TimeDelta duration); | |
| 41 | |
| 42 private: | |
| 43 views::Label* text_label_; | |
| 44 | |
| 45 base::TimeTicks countdown_start_time_; | |
| 46 base::TimeDelta duration_; | |
| 47 | |
| 48 base::RepeatingTimer<LogoutConfirmationDialogView> timer_; | |
| 49 | |
| 50 base::WeakPtrFactory<LogoutConfirmationDialogView> weak_factory_; | |
| 51 | |
| 52 DISALLOW_COPY_AND_ASSIGN(LogoutConfirmationDialogView); | |
| 53 }; | |
| 54 | |
| 55 } // namespace internal | |
| 56 | |
| 57 } // namespace ash | |
| 58 | |
| 59 #endif // ASH_SYSTEM_LOGOUT_BUTTON_LOGOUT_CONFIRMATION_DIALOG_VIEW_H_ | |
| 60 | |
| OLD | NEW |