OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "ash/aura/wm_shelf_aura.h" | 5 #include "ash/aura/wm_shelf_aura.h" |
6 | 6 |
7 #include "ash/aura/wm_window_aura.h" | 7 #include "ash/aura/wm_window_aura.h" |
8 #include "ash/common/shelf/wm_shelf_observer.h" | 8 #include "ash/common/shelf/wm_shelf_observer.h" |
9 #include "ash/common/wm_window.h" | 9 #include "ash/common/wm_window.h" |
10 #include "ash/shelf/shelf.h" | 10 #include "ash/shelf/shelf.h" |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 return shelf_->shelf_locking_manager_for_testing(); | 167 return shelf_->shelf_locking_manager_for_testing(); |
168 } | 168 } |
169 | 169 |
170 void WmShelfAura::WillDeleteShelfLayoutManager() { | 170 void WmShelfAura::WillDeleteShelfLayoutManager() { |
171 ResetShelfLayoutManager(); | 171 ResetShelfLayoutManager(); |
172 } | 172 } |
173 | 173 |
174 void WmShelfAura::OnBackgroundUpdated( | 174 void WmShelfAura::OnBackgroundUpdated( |
175 ShelfBackgroundType background_type, | 175 ShelfBackgroundType background_type, |
176 BackgroundAnimatorChangeType change_type) { | 176 BackgroundAnimatorChangeType change_type) { |
| 177 if (background_type == GetBackgroundType()) |
| 178 return; |
177 FOR_EACH_OBSERVER(WmShelfObserver, observers_, | 179 FOR_EACH_OBSERVER(WmShelfObserver, observers_, |
178 OnBackgroundUpdated(background_type, change_type)); | 180 OnBackgroundChanged(background_type, change_type)); |
179 } | 181 } |
180 | 182 |
181 void WmShelfAura::WillChangeVisibilityState(ShelfVisibilityState new_state) { | 183 void WmShelfAura::WillChangeVisibilityState(ShelfVisibilityState new_state) { |
182 FOR_EACH_OBSERVER(WmShelfObserver, observers_, | 184 FOR_EACH_OBSERVER(WmShelfObserver, observers_, |
183 WillChangeVisibilityState(new_state)); | 185 WillChangeVisibilityState(new_state)); |
184 } | 186 } |
185 | 187 |
186 void WmShelfAura::OnAutoHideStateChanged(ShelfAutoHideState new_state) { | 188 void WmShelfAura::OnAutoHideStateChanged(ShelfAutoHideState new_state) { |
187 FOR_EACH_OBSERVER(WmShelfObserver, observers_, | 189 FOR_EACH_OBSERVER(WmShelfObserver, observers_, |
188 OnAutoHideStateChanged(new_state)); | 190 OnAutoHideStateChanged(new_state)); |
189 } | 191 } |
190 | 192 |
191 void WmShelfAura::OnShelfIconPositionsChanged() { | 193 void WmShelfAura::OnShelfIconPositionsChanged() { |
192 FOR_EACH_OBSERVER(WmShelfObserver, observers_, OnShelfIconPositionsChanged()); | 194 FOR_EACH_OBSERVER(WmShelfObserver, observers_, OnShelfIconPositionsChanged()); |
193 } | 195 } |
194 | 196 |
195 } // namespace ash | 197 } // namespace ash |
OLD | NEW |