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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 return shelf_->shelf_view_for_testing(); | 171 return shelf_->shelf_view_for_testing(); |
172 } | 172 } |
173 | 173 |
174 void WmShelfAura::WillDeleteShelfLayoutManager() { | 174 void WmShelfAura::WillDeleteShelfLayoutManager() { |
175 ResetShelfLayoutManager(); | 175 ResetShelfLayoutManager(); |
176 } | 176 } |
177 | 177 |
178 void WmShelfAura::OnBackgroundUpdated( | 178 void WmShelfAura::OnBackgroundUpdated( |
179 ShelfBackgroundType background_type, | 179 ShelfBackgroundType background_type, |
180 BackgroundAnimatorChangeType change_type) { | 180 BackgroundAnimatorChangeType change_type) { |
181 if (background_type == GetBackgroundType()) | |
182 return; | |
183 FOR_EACH_OBSERVER(WmShelfObserver, observers_, | 181 FOR_EACH_OBSERVER(WmShelfObserver, observers_, |
184 OnBackgroundTypeChanged(background_type, change_type)); | 182 OnBackgroundUpdated(background_type, change_type)); |
185 } | 183 } |
186 | 184 |
187 void WmShelfAura::WillChangeVisibilityState(ShelfVisibilityState new_state) { | 185 void WmShelfAura::WillChangeVisibilityState(ShelfVisibilityState new_state) { |
188 FOR_EACH_OBSERVER(WmShelfObserver, observers_, | 186 FOR_EACH_OBSERVER(WmShelfObserver, observers_, |
189 WillChangeVisibilityState(new_state)); | 187 WillChangeVisibilityState(new_state)); |
190 } | 188 } |
191 | 189 |
192 void WmShelfAura::OnAutoHideStateChanged(ShelfAutoHideState new_state) { | 190 void WmShelfAura::OnAutoHideStateChanged(ShelfAutoHideState new_state) { |
193 FOR_EACH_OBSERVER(WmShelfObserver, observers_, | 191 FOR_EACH_OBSERVER(WmShelfObserver, observers_, |
194 OnAutoHideStateChanged(new_state)); | 192 OnAutoHideStateChanged(new_state)); |
195 } | 193 } |
196 | 194 |
197 void WmShelfAura::OnShelfIconPositionsChanged() { | 195 void WmShelfAura::OnShelfIconPositionsChanged() { |
198 FOR_EACH_OBSERVER(WmShelfObserver, observers_, OnShelfIconPositionsChanged()); | 196 FOR_EACH_OBSERVER(WmShelfObserver, observers_, OnShelfIconPositionsChanged()); |
199 } | 197 } |
200 | 198 |
201 } // namespace ash | 199 } // namespace ash |
OLD | NEW |