Lines Matching refs:iter

75   for (Notifications::iterator iter = notifications_.begin();
76 iter != notifications_.end(); ++iter) {
77 Notification* notification = *iter;
95 Notifications::iterator iter = GetNotification(old_id);
96 if (iter == notifications_.end())
99 new_notification->CopyState(*iter);
105 if ((*iter)->priority() < new_notification->priority() ||
113 Notification* old = *iter;
114 notifications_.erase(iter);
129 for (Notifications::iterator iter = notifications_.begin();
130 iter != notifications_.end(); ++iter) {
131 if ((*iter)->notifier_id() == notifier_id)
132 notifications.insert(*iter);
139 Notifications::iterator iter = GetNotification(notification_id);
140 if (iter == notifications_.end())
142 (*iter)->set_icon(image);
148 Notifications::iterator iter = GetNotification(notification_id);
149 if (iter == notifications_.end())
151 (*iter)->set_image(image);
158 Notifications::iterator iter = GetNotification(notification_id);
159 if (iter == notifications_.end())
161 (*iter)->SetButtonIcon(button_index, image);
167 Notifications::iterator iter = GetNotification(id);
168 if (iter == notifications_.end())
171 return (*iter)->type() == type;
176 for (Notifications::iterator iter = notifications_.begin();
177 iter != notifications_.end(); ++iter) {
178 if ((*iter)->priority() < DEFAULT_PRIORITY)
180 if (!ShouldShowNotificationAsPopup(**iter, blockers))
182 if (!(*iter)->shown_as_popup())
195 for (Notifications::const_reverse_iterator iter = notifications_.rbegin();
196 iter != notifications_.rend(); iter++) {
197 if ((*iter)->shown_as_popup())
201 if ((*iter)->priority() < DEFAULT_PRIORITY)
204 if (!ShouldShowNotificationAsPopup(**iter, blockers)) {
206 blocked_ids->push_back((*iter)->id());
213 if ((*iter)->priority() == DEFAULT_PRIORITY &&
218 result.insert(*iter);
225 Notifications::iterator iter = GetNotification(id);
226 DCHECK(iter != notifications_.end());
228 if ((*iter)->shown_as_popup())
232 if ((*iter)->priority() != SYSTEM_PRIORITY || mark_notification_as_read)
233 (*iter)->set_shown_as_popup(true);
238 (*iter)->set_is_read(false);
242 Notifications::iterator iter = GetNotification(id);
243 if (iter == notifications_.end())
246 if ((*iter)->shown_as_popup())
249 if (!(*iter)->IsRead())
250 (*iter)->set_is_read(true);
255 Notifications::iterator iter = GetNotification(id);
256 if (iter == notifications_.end())
258 return (*iter)->delegate();
264 for (Notifications::iterator iter = notifications_.begin();
265 iter != notifications_.end();
266 ++iter) {
267 (*iter)->set_shown_as_popup(true);
273 Notifications::iterator iter = GetNotification(id);
274 if (iter != notifications_.end())
275 return *iter;
282 for (Notifications::const_iterator iter = notifications_.begin();
283 iter != notifications_.end(); ++iter) {
286 if (!blockers[i]->ShouldShowNotification((*iter)->notifier_id())) {
292 result.insert(*iter);
307 for (Notifications::const_iterator iter = notifications.begin();
308 iter != notifications.end(); ++iter) {
309 if (!(*iter)->IsRead())
317 for (Notifications::iterator iter = notifications_.begin();
318 iter != notifications_.end(); ++iter) {
319 if ((*iter)->id() == id)
320 return iter;
325 void NotificationList::EraseNotification(Notifications::iterator iter) {
326 delete *iter;
327 notifications_.erase(iter);
333 Notifications::iterator iter = GetNotification(notification->id());
335 if (iter != notifications_.end()) {
336 notification->CopyState(*iter);
338 EraseNotification(iter);