OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 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 UI_MESSAGE_CENTER_POPUP_TIMER_H_ | 5 #ifndef UI_MESSAGE_CENTER_POPUP_TIMER_H_ |
6 #define UI_MESSAGE_CENTER_POPUP_TIMER_H_ | 6 #define UI_MESSAGE_CENTER_POPUP_TIMER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 // If paused, the amount of time that passed before pause. | 58 // If paused, the amount of time that passed before pause. |
59 base::TimeDelta passed_; | 59 base::TimeDelta passed_; |
60 | 60 |
61 // The time that the timer was last started. | 61 // The time that the timer was last started. |
62 base::Time start_time_; | 62 base::Time start_time_; |
63 | 63 |
64 // Callback recipient. | 64 // Callback recipient. |
65 base::WeakPtr<PopupTimersController> timer_controller_; | 65 base::WeakPtr<PopupTimersController> timer_controller_; |
66 | 66 |
67 // The actual timer. | 67 // The actual timer. |
68 scoped_ptr<base::OneShotTimer<PopupTimersController>> timer_; | 68 scoped_ptr<base::OneShotTimer> timer_; |
69 | 69 |
70 DISALLOW_COPY_AND_ASSIGN(PopupTimer); | 70 DISALLOW_COPY_AND_ASSIGN(PopupTimer); |
71 }; | 71 }; |
72 | 72 |
73 // A class that manages all the timers running for individual notification popup | 73 // A class that manages all the timers running for individual notification popup |
74 // windows. It supports weak pointers in order to allow safe callbacks when | 74 // windows. It supports weak pointers in order to allow safe callbacks when |
75 // timers expire. | 75 // timers expire. |
76 class MESSAGE_CENTER_EXPORT PopupTimersController | 76 class MESSAGE_CENTER_EXPORT PopupTimersController |
77 : public base::SupportsWeakPtr<PopupTimersController>, | 77 : public base::SupportsWeakPtr<PopupTimersController>, |
78 public MessageCenterObserver { | 78 public MessageCenterObserver { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 typedef base::ScopedPtrMap<std::string, scoped_ptr<PopupTimer>> | 121 typedef base::ScopedPtrMap<std::string, scoped_ptr<PopupTimer>> |
122 PopupTimerCollection; | 122 PopupTimerCollection; |
123 PopupTimerCollection popup_timers_; | 123 PopupTimerCollection popup_timers_; |
124 | 124 |
125 DISALLOW_COPY_AND_ASSIGN(PopupTimersController); | 125 DISALLOW_COPY_AND_ASSIGN(PopupTimersController); |
126 }; | 126 }; |
127 | 127 |
128 } // namespace message_center | 128 } // namespace message_center |
129 | 129 |
130 #endif // UI_MESSAGE_CENTER_POPUP_TIMER_H_ | 130 #endif // UI_MESSAGE_CENTER_POPUP_TIMER_H_ |
OLD | NEW |