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

Side by Side Diff: ui/chromeos/ime/candidate_window_view.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 unified diff | Download patch
« no previous file with comments | « ui/base/win/osk_display_manager.cc ('k') | ui/chromeos/ime/input_method_menu_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/chromeos/ime/candidate_window_view.h" 5 #include "ui/chromeos/ime/candidate_window_view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 } 402 }
403 403
404 int CandidateWindowView::GetDialogButtons() const { 404 int CandidateWindowView::GetDialogButtons() const {
405 return ui::DIALOG_BUTTON_NONE; 405 return ui::DIALOG_BUTTON_NONE;
406 } 406 }
407 407
408 void CandidateWindowView::ButtonPressed(views::Button* sender, 408 void CandidateWindowView::ButtonPressed(views::Button* sender,
409 const ui::Event& event) { 409 const ui::Event& event) {
410 for (size_t i = 0; i < candidate_views_.size(); ++i) { 410 for (size_t i = 0; i < candidate_views_.size(); ++i) {
411 if (sender == candidate_views_[i]) { 411 if (sender == candidate_views_[i]) {
412 FOR_EACH_OBSERVER(Observer, observers_, OnCandidateCommitted(i)); 412 for (Observer& observer : observers_)
413 observer.OnCandidateCommitted(i);
413 return; 414 return;
414 } 415 }
415 } 416 }
416 } 417 }
417 418
418 } // namespace ime 419 } // namespace ime
419 } // namespace ui 420 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/win/osk_display_manager.cc ('k') | ui/chromeos/ime/input_method_menu_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698