base::ObserverList should have a callback for each item in the list |
|||||||
Issue descriptionProbably something like this: template<typename Callback> ObserverList::forEach(Callback) This is useful for the following reasons: - FOR_EACH_OBSERVER(ObserverType, observer_list, func) doesn't allow you to do things before calling func on each ObserverType. - macros make it difficult to trace the control flow.
,
Sep 14 2016
,
Sep 14 2016
,
Sep 14 2016
,
Sep 30 2016
,
Oct 4 2016
,
Oct 4 2016
CLs in review: https://codereview.chromium.org/2340583005/ LGTMed: https://codereview.chromium.org/2340923003/
,
Oct 11 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/29025b60361ec76cf02bab720703c66ae8047be9 commit 29025b60361ec76cf02bab720703c66ae8047be9 Author: loyso <loyso@chromium.org> Date: Tue Oct 11 06:51:33 2016 Base ObserverList: Add basic support for standard C++ iterators. Also add a support for const_iterator. The range-based for loop support follows for free. See the use case in the dependent CL. BUG= 634916 Review-Url: https://codereview.chromium.org/2340583005 Cr-Commit-Position: refs/heads/master@{#424381} [modify] https://crrev.com/29025b60361ec76cf02bab720703c66ae8047be9/base/observer_list.h [modify] https://crrev.com/29025b60361ec76cf02bab720703c66ae8047be9/base/observer_list_unittest.cc
,
Oct 12 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b5e01c1bf59099c9433780c65fddb8786b97164c commit b5e01c1bf59099c9433780c65fddb8786b97164c Author: loyso <loyso@chromium.org> Date: Wed Oct 12 01:10:55 2016 CC Animation: Rework iterations over players to use the range-based for loop. BUG= 634916 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel Review-Url: https://codereview.chromium.org/2340923003 Cr-Commit-Position: refs/heads/master@{#424626} [modify] https://crrev.com/b5e01c1bf59099c9433780c65fddb8786b97164c/cc/animation/animation_player.cc [modify] https://crrev.com/b5e01c1bf59099c9433780c65fddb8786b97164c/cc/animation/element_animations.cc [modify] https://crrev.com/b5e01c1bf59099c9433780c65fddb8786b97164c/cc/animation/element_animations.h [modify] https://crrev.com/b5e01c1bf59099c9433780c65fddb8786b97164c/cc/animation/element_animations_unittest.cc [modify] https://crrev.com/b5e01c1bf59099c9433780c65fddb8786b97164c/cc/test/animation_test_common.cc [modify] https://crrev.com/b5e01c1bf59099c9433780c65fddb8786b97164c/cc/test/animation_timelines_test_common.cc [modify] https://crrev.com/b5e01c1bf59099c9433780c65fddb8786b97164c/cc/trees/layer_tree_host_unittest_animation.cc
,
Oct 12 2016
,
Oct 18 2016
Related: ObserverList expands to much machine code with gcc https://bugs.chromium.org/p/chromium/issues/detail?id=394311 |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by alancutter@chromium.org
, Aug 8 2016