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

Unified Diff: ui/keyboard/keyboard_controller.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/gl/gpu_switching_manager.cc ('k') | ui/native_theme/native_theme.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/keyboard_controller.cc
diff --git a/ui/keyboard/keyboard_controller.cc b/ui/keyboard/keyboard_controller.cc
index 35eea5870490d70beccd277fa9b5cec0f0903861..de8bcbede5c901a4e74957ae062b0b8b1685d146 100644
--- a/ui/keyboard/keyboard_controller.cc
+++ b/ui/keyboard/keyboard_controller.cc
@@ -188,8 +188,8 @@ KeyboardController::~KeyboardController() {
}
if (input_method_)
input_method_->RemoveObserver(this);
- FOR_EACH_OBSERVER(KeyboardControllerObserver, observer_list_,
- OnKeyboardClosed());
+ for (KeyboardControllerObserver& observer : observer_list_)
+ observer.OnKeyboardClosed();
ui_->SetController(nullptr);
}
@@ -221,9 +221,8 @@ void KeyboardController::NotifyKeyboardBoundsChanging(
const gfx::Rect& new_bounds) {
current_keyboard_bounds_ = new_bounds;
if (ui_->HasKeyboardWindow() && ui_->GetKeyboardWindow()->IsVisible()) {
- FOR_EACH_OBSERVER(KeyboardControllerObserver,
- observer_list_,
- OnKeyboardBoundsChanging(new_bounds));
+ for (KeyboardControllerObserver& observer : observer_list_)
+ observer.OnKeyboardBoundsChanging(new_bounds);
if (keyboard::IsKeyboardOverscrollEnabled())
ui_->InitInsets(new_bounds);
else
@@ -488,8 +487,8 @@ void KeyboardController::ShowAnimationFinished() {
void KeyboardController::HideAnimationFinished() {
ui_->HideKeyboardContainer(container_.get());
- FOR_EACH_OBSERVER(KeyboardControllerObserver, observer_list_,
- OnKeyboardHidden());
+ for (KeyboardControllerObserver& observer : observer_list_)
+ observer.OnKeyboardHidden();
}
} // namespace keyboard
« no previous file with comments | « ui/gl/gpu_switching_manager.cc ('k') | ui/native_theme/native_theme.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698