| OLD | NEW |
| (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_ |
| OLD | NEW |