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

Side by Side Diff: ash/system/session_length_limit/tray_session_length_limit.h

Issue 11568036: Add countdown when session time is limited (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 ASH_SYSTEM_SESSION_LENGTH_LIMIT_TRAY_SESSION_LENGTH_LIMIT_H_
6 #define ASH_SYSTEM_SESSION_LENGTH_LIMIT_TRAY_SESSION_LENGTH_LIMIT_H_
7
8 #include "ash/system/session_length_limit/session_length_limit_observer.h"
9 #include "ash/system/tray/system_tray_item.h"
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
12
13 namespace ash {
14 namespace internal {
15
16 namespace tray {
17 class RemainingSessionTimeTrayView;
18 }
19
20 // Adds a countdown timer to the system tray if the session length is limited.
21 class TraySessionLengthLimit : public SystemTrayItem,
22 public SessionLengthLimitObserver {
23 public:
24 explicit TraySessionLengthLimit(SystemTray* system_tray);
25 virtual ~TraySessionLengthLimit();
26
27 // SystemTrayItem:
28 virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE;
29 virtual void DestroyTrayView() OVERRIDE;
30 virtual void UpdateAfterShelfAlignmentChange(
31 ShelfAlignment alignment) OVERRIDE;
32
33 // SessionLengthLimitObserver:
34 virtual void OnSessionLengthUnlimited() OVERRIDE;
35 virtual void OnRemainingSessionTimeChanged(
36 const base::TimeDelta& remaining) OVERRIDE;
37
38 private:
39 tray::RemainingSessionTimeTrayView* tray_view_;
40
41 DISALLOW_COPY_AND_ASSIGN(TraySessionLengthLimit);
42 };
43
44 } // namespace internal
45 } // namespace ash
46
47 #endif // ASH_SYSTEM_SESSION_LENGTH_LIMIT_TRAY_SESSION_LENGTH_LIMIT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698