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_widget.h" | 5 #include "ash/shelf/shelf_widget.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/focus_cycler.h" | 8 #include "ash/focus_cycler.h" |
9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
10 #include "ash/session/session_state_delegate.h" | 10 #include "ash/session/session_state_delegate.h" |
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
707 | 707 |
708 opaque_foreground->SetOpacity(target_opacity); | 708 opaque_foreground->SetOpacity(target_opacity); |
709 } | 709 } |
710 | 710 |
711 bool ShelfWidget::IsShelfHiddenBehindBlackBar() const { | 711 bool ShelfWidget::IsShelfHiddenBehindBlackBar() const { |
712 return delegate_view_->opaque_foreground()->GetTargetOpacity() != 0.0f; | 712 return delegate_view_->opaque_foreground()->GetTargetOpacity() != 0.0f; |
713 } | 713 } |
714 | 714 |
715 // static | 715 // static |
716 bool ShelfWidget::ShelfAlignmentAllowed() { | 716 bool ShelfWidget::ShelfAlignmentAllowed() { |
| 717 if (Shell::GetInstance()->system_tray_delegate()->IsUserSupervised()) |
| 718 return false; |
| 719 |
717 user::LoginStatus login_status = | 720 user::LoginStatus login_status = |
718 Shell::GetInstance()->system_tray_delegate()->GetUserLoginStatus(); | 721 Shell::GetInstance()->system_tray_delegate()->GetUserLoginStatus(); |
719 | 722 |
720 switch (login_status) { | 723 switch (login_status) { |
721 case user::LOGGED_IN_USER: | 724 case user::LOGGED_IN_USER: |
722 case user::LOGGED_IN_OWNER: | 725 case user::LOGGED_IN_OWNER: |
723 return true; | 726 return true; |
724 case user::LOGGED_IN_LOCKED: | 727 case user::LOGGED_IN_LOCKED: |
725 case user::LOGGED_IN_PUBLIC: | 728 case user::LOGGED_IN_PUBLIC: |
726 case user::LOGGED_IN_SUPERVISED: | 729 case user::LOGGED_IN_SUPERVISED: |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
836 DCHECK(delegate_view_); | 839 DCHECK(delegate_view_); |
837 return delegate_view_->disable_dimming_animations_for_test(); | 840 return delegate_view_->disable_dimming_animations_for_test(); |
838 } | 841 } |
839 | 842 |
840 void ShelfWidget::WillDeleteShelf() { | 843 void ShelfWidget::WillDeleteShelf() { |
841 shelf_layout_manager_->RemoveObserver(this); | 844 shelf_layout_manager_->RemoveObserver(this); |
842 shelf_layout_manager_ = NULL; | 845 shelf_layout_manager_ = NULL; |
843 } | 846 } |
844 | 847 |
845 } // namespace ash | 848 } // namespace ash |
OLD | NEW |