Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: ui/events/platform/platform_event_source.cc

Issue 2422073002: Reduce FOR_EACH_OBSERVER usage in ui/ (Closed)
Patch Set: remove space Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/ozone/device/udev/device_manager_udev.cc ('k') | ui/gfx/sys_color_change_listener.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/platform/platform_event_source.cc
diff --git a/ui/events/platform/platform_event_source.cc b/ui/events/platform/platform_event_source.cc
index dfab7fce76648ffdcc00fc592dbd262625eef83c..9be6630e268abbcb8ce45c7746f3f34cb119e41c 100644
--- a/ui/events/platform/platform_event_source.cc
+++ b/ui/events/platform/platform_event_source.cc
@@ -69,8 +69,8 @@ void PlatformEventSource::RemovePlatformEventObserver(
uint32_t PlatformEventSource::DispatchEvent(PlatformEvent platform_event) {
uint32_t action = POST_DISPATCH_PERFORM_DEFAULT;
- FOR_EACH_OBSERVER(PlatformEventObserver, observers_,
- WillProcessEvent(platform_event));
+ for (PlatformEventObserver& observer : observers_)
+ observer.WillProcessEvent(platform_event);
// Give the overridden dispatcher a chance to dispatch the event first.
if (overridden_dispatcher_)
action = overridden_dispatcher_->DispatchEvent(platform_event);
@@ -83,8 +83,8 @@ uint32_t PlatformEventSource::DispatchEvent(PlatformEvent platform_event) {
break;
}
}
- FOR_EACH_OBSERVER(PlatformEventObserver, observers_,
- DidProcessEvent(platform_event));
+ for (PlatformEventObserver& observer : observers_)
+ observer.DidProcessEvent(platform_event);
// If an overridden dispatcher has been destroyed, then the platform
// event-source should halt dispatching the current stream of events, and wait
« no previous file with comments | « ui/events/ozone/device/udev/device_manager_udev.cc ('k') | ui/gfx/sys_color_change_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698