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

Side by Side Diff: ash/system/logout_button/logout_confirmation_dialog_view.h

Issue 40053002: Implements the dialog view for logout button tray in public sessions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Immediately reflect duration updates Created 7 years, 1 month 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
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698