OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/shelf/shelf_layout_manager.h" | 5 #include "ash/shelf/shelf_layout_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <cstring> | 9 #include <cstring> |
10 #include <string> | 10 #include <string> |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
243 return shelf_->status_area_widget() && | 243 return shelf_->status_area_widget() && |
244 shelf_->status_area_widget()->IsVisible() && | 244 shelf_->status_area_widget()->IsVisible() && |
245 (state_.visibility_state == SHELF_VISIBLE || | 245 (state_.visibility_state == SHELF_VISIBLE || |
246 (state_.visibility_state == SHELF_AUTO_HIDE && | 246 (state_.visibility_state == SHELF_AUTO_HIDE && |
247 state_.auto_hide_state == SHELF_AUTO_HIDE_SHOWN)); | 247 state_.auto_hide_state == SHELF_AUTO_HIDE_SHOWN)); |
248 } | 248 } |
249 | 249 |
250 bool ShelfLayoutManager::SetAlignment(ShelfAlignment alignment) { | 250 bool ShelfLayoutManager::SetAlignment(ShelfAlignment alignment) { |
251 if (alignment_ == alignment) | 251 if (alignment_ == alignment) |
252 return false; | 252 return false; |
253 // On Supervised User creation we may get SetAlignment signal from authorised | |
254 // manager. We should ignore it. | |
255 if (Shell::GetInstance()->session_state_delegate()-> | |
256 IsInSupervisedUserCreationFlow()) { | |
257 return false; | |
258 } | |
253 | 259 |
254 alignment_ = alignment; | 260 alignment_ = alignment; |
255 if (Shell::GetInstance()->session_state_delegate()->IsScreenLocked()) { | 261 if (Shell::GetInstance()->session_state_delegate()->IsScreenLocked()) { |
dzhioev (left Google)
2014/12/08 15:51:49
Since we don't support vertical alignment on all w
merkulova
2014/12/11 12:49:03
They are necessary. As SU case is different: we do
| |
256 // The shelf will itself move to the bottom while locked. If a request is | 262 // The shelf will itself move to the bottom while locked. If a request is |
257 // sent to move while being locked, we postpone the move untill the lock | 263 // sent to move while being locked, we postpone the move until the lock |
258 // screen goes away. | 264 // screen goes away. |
259 return false; | 265 return false; |
260 } | 266 } |
261 | 267 |
262 // This should not be called during the lock screen transitions. | 268 // This should not be called during the lock screen transitions. |
263 shelf_->SetAlignment(alignment); | 269 shelf_->SetAlignment(alignment); |
264 LayoutShelf(); | 270 LayoutShelf(); |
265 return true; | 271 return true; |
266 } | 272 } |
267 | 273 |
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1161 | 1167 |
1162 void ShelfLayoutManager::SessionStateChanged( | 1168 void ShelfLayoutManager::SessionStateChanged( |
1163 SessionStateDelegate::SessionState state) { | 1169 SessionStateDelegate::SessionState state) { |
1164 TargetBounds target_bounds; | 1170 TargetBounds target_bounds; |
1165 CalculateTargetBounds(state_, &target_bounds); | 1171 CalculateTargetBounds(state_, &target_bounds); |
1166 UpdateBoundsAndOpacity(target_bounds, true, NULL); | 1172 UpdateBoundsAndOpacity(target_bounds, true, NULL); |
1167 UpdateVisibilityState(); | 1173 UpdateVisibilityState(); |
1168 } | 1174 } |
1169 | 1175 |
1170 } // namespace ash | 1176 } // namespace ash |
OLD | NEW |