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

Side by Side Diff: chrome/browser/chromeos/ui/idle_logout_dialog.h

Issue 9665031: Change the idle logout dialog over to use views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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 CHROME_BROWSER_CHROMEOS_UI_IDLE_LOGOUT_DIALOG_H_
6 #define CHROME_BROWSER_CHROMEOS_UI_IDLE_LOGOUT_DIALOG_H_
7 #pragma once
8
9 #include <string>
10 #include <vector>
11
12 #include "base/memory/scoped_ptr.h"
13 #include "base/string16.h"
14 #include "base/timer.h"
15 #include "ui/views/controls/label.h"
16 #include "ui/views/window/dialog_delegate.h"
17
18 namespace base {
19 class TimeDelta;
sky 2012/03/11 21:57:47 don't indent this.
rkc 2012/03/12 22:43:38 Done.
20 }
21
22 // A class to show the logout on idle dialog if the machine is in retail mode.
23 class IdleLogoutDialog : public views::DialogDelegateView {
24 public:
25 static void ShowIdleLogoutDialog();
26 static void CloseIdleLogoutDialog();
27
28 // views::DialogDelegateView:
29 virtual int GetDialogButtons() const OVERRIDE;
30 virtual ui::ModalType GetModalType() const OVERRIDE;
31 // virtual bool CanResize() const OVERRIDE;
sky 2012/03/11 21:57:47 If you don't want to override this, remove it. Als
rkc 2012/03/12 22:43:38 Ouch, missed this one in cleanup. Removed. Done.
32 virtual string16 GetWindowTitle() const OVERRIDE;
33 virtual views::View* GetContentsView() OVERRIDE;
34
35 // views::View:
36 virtual void Layout() OVERRIDE;
37 virtual gfx::Size GetPreferredSize() OVERRIDE;
38
sky 2012/03/11 21:57:47 nit: only one empty line.
rkc 2012/03/12 22:43:38 Done.
39
40 private:
41 IdleLogoutDialog();
42
43 // Adds the labels and adds them to the layout.
44 void Init();
45
46 void Show();
47 void Close();
48
49 void UpdateCountdownTimer();
50
51 views::Label* warning_label_;
52 views::Label* restart_label_;
53
54 // Time at which the countdown is over and we should close the dialog.
55 base::Time countdown_end_time_;
56
57 base::RepeatingTimer<IdleLogoutDialog> timer_;
58
59 DISALLOW_COPY_AND_ASSIGN(IdleLogoutDialog);
60 };
61
62 #endif // CHROME_BROWSER_CHROMEOS_UI_IDLE_LOGOUT_DIALOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698