OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ASH_SYSTEM_CHROMEOS_SESSION_SESSION_LENGTH_LIMIT_H_ | 5 #ifndef ASH_SYSTEM_CHROMEOS_SESSION_SESSION_LENGTH_LIMIT_H_ |
6 #define ASH_SYSTEM_CHROMEOS_SESSION_SESSION_LENGTH_LIMIT_H_ | 6 #define ASH_SYSTEM_CHROMEOS_SESSION_SESSION_LENGTH_LIMIT_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "ash/system/chromeos/session/session_length_limit_observer.h" | 10 #include "ash/system/chromeos/session/session_length_limit_observer.h" |
9 #include "ash/system/tray/system_tray_item.h" | 11 #include "ash/system/tray/system_tray_item.h" |
10 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
11 #include "base/macros.h" | 13 #include "base/macros.h" |
12 #include "base/memory/scoped_ptr.h" | |
13 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
14 #include "base/time/time.h" | 15 #include "base/time/time.h" |
15 #include "base/timer/timer.h" | 16 #include "base/timer/timer.h" |
16 | 17 |
17 namespace ash { | 18 namespace ash { |
18 namespace test { | 19 namespace test { |
19 class TraySessionLengthLimitTest; | 20 class TraySessionLengthLimitTest; |
20 } | 21 } |
21 | 22 |
22 class LabelTrayView; | 23 class LabelTrayView; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 base::string16 ComposeTrayBubbleMessage() const; | 63 base::string16 ComposeTrayBubbleMessage() const; |
63 | 64 |
64 base::TimeTicks session_start_time_; | 65 base::TimeTicks session_start_time_; |
65 base::TimeDelta time_limit_; | 66 base::TimeDelta time_limit_; |
66 base::TimeDelta remaining_session_time_; | 67 base::TimeDelta remaining_session_time_; |
67 | 68 |
68 LimitState limit_state_; // Current state. | 69 LimitState limit_state_; // Current state. |
69 LimitState last_limit_state_; // State of last notification update. | 70 LimitState last_limit_state_; // State of last notification update. |
70 | 71 |
71 LabelTrayView* tray_bubble_view_; | 72 LabelTrayView* tray_bubble_view_; |
72 scoped_ptr<base::RepeatingTimer> timer_; | 73 std::unique_ptr<base::RepeatingTimer> timer_; |
73 | 74 |
74 DISALLOW_COPY_AND_ASSIGN(TraySessionLengthLimit); | 75 DISALLOW_COPY_AND_ASSIGN(TraySessionLengthLimit); |
75 }; | 76 }; |
76 | 77 |
77 } // namespace ash | 78 } // namespace ash |
78 | 79 |
79 #endif // ASH_SYSTEM_CHROMEOS_SESSION_SESSION_LENGTH_LIMIT_H_ | 80 #endif // ASH_SYSTEM_CHROMEOS_SESSION_SESSION_LENGTH_LIMIT_H_ |
OLD | NEW |