Home | History | Annotate | Download | only in base

Lines Matching refs:list

24 //   A thread-safe container for a list of observers.
33 // * Observers can remove themselves from the observer list inside
36 // removing itself from the observer list, the notifications will
39 // The drawback of the threadsafe observer list is that notifications
86 // Add an observer to the list.
88 ObserverList<ObserverType>* list = NULL;
99 list = observer_lists_[loop];
101 list->AddObserver(obs);
104 // Remove an observer from the list.
110 ObserverList<ObserverType>* list = NULL;
116 list = observer_lists_[loop];
117 if (!list) {
122 // If we're about to remove the last observer from the list,
124 if (list->size() == 1)
127 list->RemoveObserver(obs);
132 if (list->size() == 0)
133 delete list;
137 // Make a thread-safe callback to each Observer in the list.
172 ObserverList<ObserverType>* list = (*it).second;
177 template NotifyWrapper<Method, Params>, list, method));
185 void NotifyWrapper(ObserverList<ObserverType>* list,
188 // Check that this list still needs notifications.
195 // have been removed and then re-added! If the master list's loop
198 if (it == observer_lists_.end() || it->second != list)
203 typename ObserverList<ObserverType>::Iterator it(*list);
209 // If there are no more observers on the list, we can now delete it.
210 if (list->size() == 0) {
213 // Remove |list| if it's not already removed.
218 if (it != observer_lists_.end() && it->second == list)
221 delete list;