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/system/user/tray_user.h" | 5 #include "ash/system/user/tray_user.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <climits> | 8 #include <climits> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1045 } | 1045 } |
1046 | 1046 |
1047 bool UserView::SupportsMultiProfile() { | 1047 bool UserView::SupportsMultiProfile() { |
1048 // We do not want to see any multi profile additions to a user view when the | 1048 // We do not want to see any multi profile additions to a user view when the |
1049 // log in screen is shown. | 1049 // log in screen is shown. |
1050 return Shell::GetInstance()->delegate()->IsMultiProfilesEnabled() && | 1050 return Shell::GetInstance()->delegate()->IsMultiProfilesEnabled() && |
1051 !Shell::GetInstance()->session_state_delegate()->IsUserSessionBlocked(); | 1051 !Shell::GetInstance()->session_state_delegate()->IsUserSessionBlocked(); |
1052 } | 1052 } |
1053 | 1053 |
1054 AddUserView::AddUserView(UserCard* owner, views::ButtonListener* listener) | 1054 AddUserView::AddUserView(UserCard* owner, views::ButtonListener* listener) |
1055 : CustomButton(listener_), | 1055 : CustomButton(listener), |
1056 add_user_(NULL), | 1056 add_user_(NULL), |
1057 listener_(listener), | 1057 listener_(listener), |
1058 owner_(owner), | 1058 owner_(owner), |
1059 anchor_(NULL) { | 1059 anchor_(NULL) { |
1060 AddContent(); | 1060 AddContent(); |
1061 owner_->ForceBorderVisible(true); | 1061 owner_->ForceBorderVisible(true); |
1062 } | 1062 } |
1063 | 1063 |
1064 AddUserView::~AddUserView() { | 1064 AddUserView::~AddUserView() { |
1065 owner_->ForceBorderVisible(false); | 1065 owner_->ForceBorderVisible(false); |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1418 internal::GetRootWindowController( | 1418 internal::GetRootWindowController( |
1419 system_tray()->GetWidget()->GetNativeWindow()->GetRootWindow()); | 1419 system_tray()->GetWidget()->GetNativeWindow()->GetRootWindow()); |
1420 if (controller && controller->shelf()) { | 1420 if (controller && controller->shelf()) { |
1421 UpdateAfterShelfAlignmentChange( | 1421 UpdateAfterShelfAlignmentChange( |
1422 controller->GetShelfLayoutManager()->GetAlignment()); | 1422 controller->GetShelfLayoutManager()->GetAlignment()); |
1423 } | 1423 } |
1424 } | 1424 } |
1425 | 1425 |
1426 } // namespace internal | 1426 } // namespace internal |
1427 } // namespace ash | 1427 } // namespace ash |
OLD | NEW |