| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef ASH_SYSTEM_USER_USER_VIEW_H_ | 5 #ifndef ASH_SYSTEM_USER_USER_VIEW_H_ |
| 6 #define ASH_SYSTEM_USER_USER_VIEW_H_ | 6 #define ASH_SYSTEM_USER_USER_VIEW_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ash/public/cpp/session_types.h" | 10 #include "ash/public/cpp/session_types.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 // Overridden from views::FocusChangeListener: | 56 // Overridden from views::FocusChangeListener: |
| 57 void OnWillChangeFocus(View* focused_before, View* focused_now) override; | 57 void OnWillChangeFocus(View* focused_before, View* focused_now) override; |
| 58 void OnDidChangeFocus(View* focused_before, View* focused_now) override; | 58 void OnDidChangeFocus(View* focused_before, View* focused_now) override; |
| 59 | 59 |
| 60 void AddLogoutButton(LoginStatus login); | 60 void AddLogoutButton(LoginStatus login); |
| 61 void AddUserCard(LoginStatus login); | 61 void AddUserCard(LoginStatus login); |
| 62 | 62 |
| 63 // Create the menu option to add another user. If |disabled| is set the user | 63 // Create the menu option to add another user. If |disabled| is set the user |
| 64 // cannot actively click on the item. | 64 // cannot actively click on the item. |
| 65 void ToggleUserDropdownWidget(); | 65 void ToggleAddUserMenuOption(); |
| 66 | 66 |
| 67 // Removes the add user menu option. | 67 // Removes the add user menu option. |
| 68 void HideUserDropdownWidget(); | 68 void RemoveAddUserMenuOption(); |
| 69 | 69 |
| 70 // If |user_card_view_| is clickable, this is a ButtonFromView that wraps it. | 70 // If |user_card_view_| is clickable, this is a ButtonFromView that wraps it. |
| 71 // If |user_card_view_| is not clickable, this will be equal to | 71 // If |user_card_view_| is not clickable, this will be equal to |
| 72 // |user_card_view_|. | 72 // |user_card_view_|. |
| 73 views::View* user_card_container_ = nullptr; | 73 views::View* user_card_container_ = nullptr; |
| 74 | 74 |
| 75 // The |UserCardView| for the active user. | 75 // The |UserCardView| for the active user. |
| 76 UserCardView* user_card_view_ = nullptr; | 76 UserCardView* user_card_view_ = nullptr; |
| 77 | 77 |
| 78 // This is the owner system tray item of this view. | 78 // This is the owner system tray item of this view. |
| 79 SystemTrayItem* owner_; | 79 SystemTrayItem* owner_; |
| 80 | 80 |
| 81 views::View* logout_button_ = nullptr; | 81 views::View* logout_button_ = nullptr; |
| 82 std::unique_ptr<views::Widget> user_dropdown_widget_; | 82 std::unique_ptr<views::Widget> add_menu_option_; |
| 83 | 83 |
| 84 // False when the add user panel is visible but not activatable. | 84 // False when the add user panel is visible but not activatable. |
| 85 bool add_user_enabled_ = true; | 85 bool add_user_enabled_ = true; |
| 86 | 86 |
| 87 // The focus manager which we use to detect focus changes. | 87 // The focus manager which we use to detect focus changes. |
| 88 views::FocusManager* focus_manager_ = nullptr; | 88 views::FocusManager* focus_manager_ = nullptr; |
| 89 | 89 |
| 90 DISALLOW_COPY_AND_ASSIGN(UserView); | 90 DISALLOW_COPY_AND_ASSIGN(UserView); |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 } // namespace tray | 93 } // namespace tray |
| 94 } // namespace ash | 94 } // namespace ash |
| 95 | 95 |
| 96 #endif // ASH_SYSTEM_USER_USER_VIEW_H_ | 96 #endif // ASH_SYSTEM_USER_USER_VIEW_H_ |
| OLD | NEW |