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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 } | 136 } |
137 | 137 |
138 void WmShelfAura::AddObserver(WmShelfObserver* observer) { | 138 void WmShelfAura::AddObserver(WmShelfObserver* observer) { |
139 observers_.AddObserver(observer); | 139 observers_.AddObserver(observer); |
140 } | 140 } |
141 | 141 |
142 void WmShelfAura::RemoveObserver(WmShelfObserver* observer) { | 142 void WmShelfAura::RemoveObserver(WmShelfObserver* observer) { |
143 observers_.RemoveObserver(observer); | 143 observers_.RemoveObserver(observer); |
144 } | 144 } |
145 | 145 |
| 146 void WmShelfAura::SetKeyboardBoundsForTesting(const gfx::Rect& bounds) { |
| 147 shelf_layout_manager_->OnKeyboardBoundsChanging(bounds); |
| 148 } |
| 149 |
146 void WmShelfAura::WillDeleteShelfLayoutManager() { | 150 void WmShelfAura::WillDeleteShelfLayoutManager() { |
147 ResetShelfLayoutManager(); | 151 ResetShelfLayoutManager(); |
148 } | 152 } |
149 | 153 |
150 void WmShelfAura::OnBackgroundUpdated( | 154 void WmShelfAura::OnBackgroundUpdated( |
151 ShelfBackgroundType background_type, | 155 ShelfBackgroundType background_type, |
152 BackgroundAnimatorChangeType change_type) { | 156 BackgroundAnimatorChangeType change_type) { |
153 FOR_EACH_OBSERVER(WmShelfObserver, observers_, | 157 FOR_EACH_OBSERVER(WmShelfObserver, observers_, |
154 OnBackgroundUpdated(background_type, change_type)); | 158 OnBackgroundUpdated(background_type, change_type)); |
155 } | 159 } |
156 | 160 |
157 void WmShelfAura::WillChangeVisibilityState(ShelfVisibilityState new_state) { | 161 void WmShelfAura::WillChangeVisibilityState(ShelfVisibilityState new_state) { |
158 FOR_EACH_OBSERVER(WmShelfObserver, observers_, | 162 FOR_EACH_OBSERVER(WmShelfObserver, observers_, |
159 WillChangeVisibilityState(new_state)); | 163 WillChangeVisibilityState(new_state)); |
160 } | 164 } |
161 | 165 |
162 void WmShelfAura::OnAutoHideStateChanged(ShelfAutoHideState new_state) { | 166 void WmShelfAura::OnAutoHideStateChanged(ShelfAutoHideState new_state) { |
163 FOR_EACH_OBSERVER(WmShelfObserver, observers_, | 167 FOR_EACH_OBSERVER(WmShelfObserver, observers_, |
164 OnAutoHideStateChanged(new_state)); | 168 OnAutoHideStateChanged(new_state)); |
165 } | 169 } |
166 | 170 |
167 void WmShelfAura::OnShelfIconPositionsChanged() { | 171 void WmShelfAura::OnShelfIconPositionsChanged() { |
168 FOR_EACH_OBSERVER(WmShelfObserver, observers_, OnShelfIconPositionsChanged()); | 172 FOR_EACH_OBSERVER(WmShelfObserver, observers_, OnShelfIconPositionsChanged()); |
169 } | 173 } |
170 | 174 |
171 } // namespace ash | 175 } // namespace ash |
OLD | NEW |