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

Unified Diff: chrome/browser/chromeos/input_method/candidate_window_controller_impl.cc

Issue 2416763002: Replace FOR_EACH_OBSERVER in c/b/chromeos with range-based for (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
Index: chrome/browser/chromeos/input_method/candidate_window_controller_impl.cc
diff --git a/chrome/browser/chromeos/input_method/candidate_window_controller_impl.cc b/chrome/browser/chromeos/input_method/candidate_window_controller_impl.cc
index 2aaa80861fe571ff0b70829e0942ff4c90df632e..5a8248e06cc4e7b943c9a16bb50b2d9031549464 100644
--- a/chrome/browser/chromeos/input_method/candidate_window_controller_impl.cc
+++ b/chrome/browser/chromeos/input_method/candidate_window_controller_impl.cc
@@ -55,8 +55,8 @@ void CandidateWindowControllerImpl::InitCandidateWindowView() {
views::Widget* widget = candidate_window_view_->InitWidget();
widget->AddObserver(this);
widget->Show();
- FOR_EACH_OBSERVER(CandidateWindowController::Observer, observers_,
- CandidateWindowOpened());
+ for (auto& observer : observers_)
+ observer.CandidateWindowOpened();
}
void CandidateWindowControllerImpl::Hide() {
@@ -168,8 +168,8 @@ void CandidateWindowControllerImpl::UpdatePreeditText(
}
void CandidateWindowControllerImpl::OnCandidateCommitted(int index) {
- FOR_EACH_OBSERVER(CandidateWindowController::Observer, observers_,
- CandidateClicked(index));
+ for (auto& observer : observers_)
+ observer.CandidateClicked(index);
}
void CandidateWindowControllerImpl::OnWidgetClosing(views::Widget* widget) {
@@ -181,8 +181,8 @@ void CandidateWindowControllerImpl::OnWidgetClosing(views::Widget* widget) {
widget->RemoveObserver(this);
candidate_window_view_->RemoveObserver(this);
candidate_window_view_ = NULL;
- FOR_EACH_OBSERVER(CandidateWindowController::Observer, observers_,
- CandidateWindowClosed());
+ for (auto& observer : observers_)
+ observer.CandidateWindowClosed();
}
}

Powered by Google App Engine
This is Rietveld 408576698