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 <map> |
8 #include <string> | 9 #include <string> |
9 #include <vector> | 10 #include <vector> |
10 | 11 |
11 #include "base/containers/scoped_ptr_map.h" | |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "base/timer/timer.h" | 15 #include "base/timer/timer.h" |
16 #include "ui/message_center/message_center.h" | 16 #include "ui/message_center/message_center.h" |
17 #include "ui/message_center/message_center_observer.h" | 17 #include "ui/message_center/message_center_observer.h" |
18 #include "ui/message_center/message_center_types.h" | 18 #include "ui/message_center/message_center_types.h" |
19 #include "ui/message_center/notification_blocker.h" | 19 #include "ui/message_center/notification_blocker.h" |
20 #include "ui/message_center/notifier_settings.h" | 20 #include "ui/message_center/notifier_settings.h" |
21 | 21 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 void PauseTimer(const std::string& id); | 111 void PauseTimer(const std::string& id); |
112 | 112 |
113 // Removes and cancels a single popup timer, if it exists. | 113 // Removes and cancels a single popup timer, if it exists. |
114 void CancelTimer(const std::string& id); | 114 void CancelTimer(const std::string& id); |
115 | 115 |
116 private: | 116 private: |
117 // Weak, global. | 117 // Weak, global. |
118 MessageCenter* message_center_; | 118 MessageCenter* message_center_; |
119 | 119 |
120 // The PopupTimerCollection contains all the managed timers by their ID. | 120 // The PopupTimerCollection contains all the managed timers by their ID. |
121 typedef base::ScopedPtrMap<std::string, scoped_ptr<PopupTimer>> | 121 using PopupTimerCollection = std::map<std::string, scoped_ptr<PopupTimer>>; |
122 PopupTimerCollection; | |
123 PopupTimerCollection popup_timers_; | 122 PopupTimerCollection popup_timers_; |
124 | 123 |
125 DISALLOW_COPY_AND_ASSIGN(PopupTimersController); | 124 DISALLOW_COPY_AND_ASSIGN(PopupTimersController); |
126 }; | 125 }; |
127 | 126 |
128 } // namespace message_center | 127 } // namespace message_center |
129 | 128 |
130 #endif // UI_MESSAGE_CENTER_POPUP_TIMER_H_ | 129 #endif // UI_MESSAGE_CENTER_POPUP_TIMER_H_ |
OLD | NEW |