| 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 | |
| 720 user::LoginStatus login_status = | 717 user::LoginStatus login_status = |
| 721 Shell::GetInstance()->system_tray_delegate()->GetUserLoginStatus(); | 718 Shell::GetInstance()->system_tray_delegate()->GetUserLoginStatus(); |
| 722 | 719 |
| 723 switch (login_status) { | 720 switch (login_status) { |
| 724 case user::LOGGED_IN_USER: | 721 case user::LOGGED_IN_USER: |
| 725 case user::LOGGED_IN_OWNER: | 722 case user::LOGGED_IN_OWNER: |
| 726 return true; | 723 return true; |
| 727 case user::LOGGED_IN_LOCKED: | 724 case user::LOGGED_IN_LOCKED: |
| 728 case user::LOGGED_IN_PUBLIC: | 725 case user::LOGGED_IN_PUBLIC: |
| 729 case user::LOGGED_IN_SUPERVISED: | 726 case user::LOGGED_IN_SUPERVISED: |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 839 DCHECK(delegate_view_); | 836 DCHECK(delegate_view_); |
| 840 return delegate_view_->disable_dimming_animations_for_test(); | 837 return delegate_view_->disable_dimming_animations_for_test(); |
| 841 } | 838 } |
| 842 | 839 |
| 843 void ShelfWidget::WillDeleteShelf() { | 840 void ShelfWidget::WillDeleteShelf() { |
| 844 shelf_layout_manager_->RemoveObserver(this); | 841 shelf_layout_manager_->RemoveObserver(this); |
| 845 shelf_layout_manager_ = NULL; | 842 shelf_layout_manager_ = NULL; |
| 846 } | 843 } |
| 847 | 844 |
| 848 } // namespace ash | 845 } // namespace ash |
| OLD | NEW |