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

Side by Side Diff: chrome/browser/status_icons/status_icon_menu_model.cc

Issue 2435533004: Reduce usage of FOR_EACH_OBSERVER macro in chrome/browser/signin (Closed)
Patch Set: braces 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/status_icons/status_icon_menu_model.h" 5 #include "chrome/browser/status_icons/status_icon_menu_model.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "ui/base/accelerators/accelerator.h" 9 #include "ui/base/accelerators/accelerator.h"
10 #include "ui/gfx/image/image.h" 10 #include "ui/gfx/image/image.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 } 156 }
157 157
158 //////////////////////////////////////////////////////////////////////////////// 158 ////////////////////////////////////////////////////////////////////////////////
159 // StatusIconMenuModel, protected: 159 // StatusIconMenuModel, protected:
160 160
161 void StatusIconMenuModel::MenuItemsChanged() { 161 void StatusIconMenuModel::MenuItemsChanged() {
162 NotifyMenuStateChanged(); 162 NotifyMenuStateChanged();
163 } 163 }
164 164
165 void StatusIconMenuModel::NotifyMenuStateChanged() { 165 void StatusIconMenuModel::NotifyMenuStateChanged() {
166 FOR_EACH_OBSERVER(Observer, observer_list_, OnMenuStateChanged()); 166 for (Observer& observer : observer_list_)
167 observer.OnMenuStateChanged();
167 } 168 }
168 169
169 //////////////////////////////////////////////////////////////////////////////// 170 ////////////////////////////////////////////////////////////////////////////////
170 // StatusIconMenuModel, private: 171 // StatusIconMenuModel, private:
171 172
172 void StatusIconMenuModel::CommandIdHighlighted(int command_id) { 173 void StatusIconMenuModel::CommandIdHighlighted(int command_id) {
173 if (delegate_) 174 if (delegate_)
174 delegate_->CommandIdHighlighted(command_id); 175 delegate_->CommandIdHighlighted(command_id);
175 } 176 }
176 177
177 void StatusIconMenuModel::ExecuteCommand(int command_id, int event_flags) { 178 void StatusIconMenuModel::ExecuteCommand(int command_id, int event_flags) {
178 if (delegate_) 179 if (delegate_)
179 delegate_->ExecuteCommand(command_id, event_flags); 180 delegate_->ExecuteCommand(command_id, event_flags);
180 } 181 }
OLDNEW
« no previous file with comments | « chrome/browser/status_icons/status_icon.cc ('k') | chrome/browser/sync/sessions/sessions_sync_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698