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

Unified Diff: services/ui/public/cpp/input_devices/input_device_client.cc

Issue 2424613002: Remove usage of FOR_EACH_OBSERVER macro in services/ (Closed)
Patch Set: 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 | « services/navigation/public/cpp/view.cc ('k') | services/ui/public/cpp/window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/public/cpp/input_devices/input_device_client.cc
diff --git a/services/ui/public/cpp/input_devices/input_device_client.cc b/services/ui/public/cpp/input_devices/input_device_client.cc
index 7051b435c033b072f980c78afd70e5bc08c9784e..07593c1ded8fb0baad2d0b3b6e9276c410fb9299 100644
--- a/services/ui/public/cpp/input_devices/input_device_client.cc
+++ b/services/ui/public/cpp/input_devices/input_device_client.cc
@@ -70,29 +70,29 @@ mojom::InputDeviceObserverMojoPtr InputDeviceClient::GetIntefacePtr() {
void InputDeviceClient::OnKeyboardDeviceConfigurationChanged(
const std::vector<ui::InputDevice>& devices) {
keyboard_devices_ = devices;
- FOR_EACH_OBSERVER(ui::InputDeviceEventObserver, observers_,
- OnKeyboardDeviceConfigurationChanged());
+ for (auto& observer : observers_)
+ observer.OnKeyboardDeviceConfigurationChanged();
}
void InputDeviceClient::OnTouchscreenDeviceConfigurationChanged(
const std::vector<ui::TouchscreenDevice>& devices) {
touchscreen_devices_ = devices;
- FOR_EACH_OBSERVER(ui::InputDeviceEventObserver, observers_,
- OnTouchscreenDeviceConfigurationChanged());
+ for (auto& observer : observers_)
+ observer.OnTouchscreenDeviceConfigurationChanged();
}
void InputDeviceClient::OnMouseDeviceConfigurationChanged(
const std::vector<ui::InputDevice>& devices) {
mouse_devices_ = devices;
- FOR_EACH_OBSERVER(ui::InputDeviceEventObserver, observers_,
- OnMouseDeviceConfigurationChanged());
+ for (auto& observer : observers_)
+ observer.OnMouseDeviceConfigurationChanged();
}
void InputDeviceClient::OnTouchpadDeviceConfigurationChanged(
const std::vector<ui::InputDevice>& devices) {
touchpad_devices_ = devices;
- FOR_EACH_OBSERVER(ui::InputDeviceEventObserver, observers_,
- OnTouchpadDeviceConfigurationChanged());
+ for (auto& observer : observers_)
+ observer.OnTouchpadDeviceConfigurationChanged();
}
void InputDeviceClient::OnDeviceListsComplete(
@@ -112,14 +112,14 @@ void InputDeviceClient::OnDeviceListsComplete(
if (!device_lists_complete_) {
device_lists_complete_ = true;
- FOR_EACH_OBSERVER(ui::InputDeviceEventObserver, observers_,
- OnDeviceListsComplete());
+ for (auto& observer : observers_)
+ observer.OnDeviceListsComplete();
}
}
void InputDeviceClient::OnStylusStateChanged(StylusState state) {
- FOR_EACH_OBSERVER(ui::InputDeviceEventObserver, observers_,
- OnStylusStateChanged(state));
+ for (auto& observer : observers_)
+ observer.OnStylusStateChanged(state);
}
} // namespace ui
« no previous file with comments | « services/navigation/public/cpp/view.cc ('k') | services/ui/public/cpp/window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698