| Index: chrome/browser/ui/views/tabs/tab_strip.cc
|
| diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc
|
| index 8ebceb6bfc69d8656ea477f7a47c8dbe840fa8c2..79811c6f284134c2d46abc2d556cfd69bde739b5 100644
|
| --- a/chrome/browser/ui/views/tabs/tab_strip.cc
|
| +++ b/chrome/browser/ui/views/tabs/tab_strip.cc
|
| @@ -601,8 +601,8 @@ TabStrip::TabStrip(TabStripController* controller)
|
| }
|
|
|
| TabStrip::~TabStrip() {
|
| - FOR_EACH_OBSERVER(TabStripObserver, observers_,
|
| - TabStripDeleted(this));
|
| + for (TabStripObserver& observer : observers_)
|
| + observer.TabStripDeleted(this);
|
|
|
| // The animations may reference the tabs. Shut down the animation before we
|
| // delete the tabs.
|
| @@ -700,8 +700,8 @@ void TabStrip::AddTabAt(int model_index,
|
|
|
| SwapLayoutIfNecessary();
|
|
|
| - FOR_EACH_OBSERVER(TabStripObserver, observers_,
|
| - TabStripAddedTabAt(this, model_index));
|
| + for (TabStripObserver& observer : observers_)
|
| + observer.TabStripAddedTabAt(this, model_index);
|
|
|
| // Stop dragging when a new tab is added and dragging a window. Doing
|
| // otherwise results in a confusing state if the user attempts to reattach. We
|
| @@ -741,8 +741,8 @@ void TabStrip::MoveTab(int from_model_index,
|
| }
|
| SwapLayoutIfNecessary();
|
|
|
| - FOR_EACH_OBSERVER(TabStripObserver, observers_,
|
| - TabStripMovedTab(this, from_model_index, to_model_index));
|
| + for (TabStripObserver& observer : observers_)
|
| + observer.TabStripMovedTab(this, from_model_index, to_model_index);
|
| }
|
|
|
| void TabStrip::RemoveTabAt(content::WebContents* contents, int model_index) {
|
| @@ -763,8 +763,8 @@ void TabStrip::RemoveTabAt(content::WebContents* contents, int model_index) {
|
| }
|
| SwapLayoutIfNecessary();
|
|
|
| - FOR_EACH_OBSERVER(TabStripObserver, observers_,
|
| - TabStripRemovedTabAt(this, model_index));
|
| + for (TabStripObserver& observer : observers_)
|
| + observer.TabStripRemovedTabAt(this, model_index);
|
|
|
| // Stop dragging when a new tab is removed and dragging a window. Doing
|
| // otherwise results in a confusing state if the user attempts to reattach. We
|
| @@ -2428,8 +2428,10 @@ void TabStrip::GenerateIdealBounds() {
|
| GetLayoutConstant(TABSTRIP_NEW_TAB_BUTTON_OVERLAP));
|
| const int old_max_x = newtab_button_bounds_.right();
|
| newtab_button_bounds_.set_origin(gfx::Point(new_tab_x, 0));
|
| - if (newtab_button_bounds_.right() != old_max_x)
|
| - FOR_EACH_OBSERVER(TabStripObserver, observers_, TabStripMaxXChanged(this));
|
| + if (newtab_button_bounds_.right() != old_max_x) {
|
| + for (TabStripObserver& observer : observers_)
|
| + observer.TabStripMaxXChanged(this);
|
| + }
|
| }
|
|
|
| int TabStrip::GenerateIdealBoundsForPinnedTabs(int* first_non_pinned_index) {
|
|
|