| 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_COMMON_SYSTEM_USER_USER_CARD_VIEW_H_ | 5 #ifndef ASH_COMMON_SYSTEM_USER_USER_CARD_VIEW_H_ |
| 6 #define ASH_COMMON_SYSTEM_USER_USER_CARD_VIEW_H_ | 6 #define ASH_COMMON_SYSTEM_USER_USER_CARD_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "ui/views/view.h" | 9 #include "ui/views/view.h" |
| 10 | 10 |
| 11 namespace ash { | 11 namespace ash { |
| 12 | 12 |
| 13 enum class LoginStatus; | 13 enum class LoginStatus; |
| 14 | 14 |
| 15 namespace tray { | 15 namespace tray { |
| 16 | 16 |
| 17 // The view displaying information about the user, such as user's avatar, email | 17 // The view displaying information about the user, such as user's avatar, email |
| 18 // address, name, and more. View has no borders. | 18 // address, name, and more. View has no borders. |
| 19 class UserCardView : public views::View { | 19 class UserCardView : public views::View { |
| 20 public: | 20 public: |
| 21 // |max_width| takes effect only if |login_status| is LOGGED_IN_PUBLIC. | 21 // |max_width| takes effect only if |login_status| is LOGGED_IN_PUBLIC. |
| 22 UserCardView(LoginStatus login_status, int max_width, int user_index); | 22 UserCardView(LoginStatus login_status, int max_width, int user_index); |
| 23 ~UserCardView() override; | 23 ~UserCardView() override; |
| 24 | 24 |
| 25 // views::View overrides. | 25 // views::View overrides. |
| 26 void GetAccessibleState(ui::AXViewState* state) override; | 26 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; |
| 27 | 27 |
| 28 private: | 28 private: |
| 29 // Creates the content for the public mode. | 29 // Creates the content for the public mode. |
| 30 void AddPublicModeUserContent(int max_width); | 30 void AddPublicModeUserContent(int max_width); |
| 31 | 31 |
| 32 void AddUserContent(LoginStatus login_status, int user_index); | 32 void AddUserContent(LoginStatus login_status, int user_index); |
| 33 | 33 |
| 34 // Create a user icon representation. | 34 // Create a user icon representation. |
| 35 views::View* CreateIcon(LoginStatus login_status, int user_index); | 35 views::View* CreateIcon(LoginStatus login_status, int user_index); |
| 36 | 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(UserCardView); | 37 DISALLOW_COPY_AND_ASSIGN(UserCardView); |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 } // namespace tray | 40 } // namespace tray |
| 41 } // namespace ash | 41 } // namespace ash |
| 42 | 42 |
| 43 #endif // ASH_COMMON_SYSTEM_USER_USER_CARD_VIEW_H_ | 43 #endif // ASH_COMMON_SYSTEM_USER_USER_CARD_VIEW_H_ |
| OLD | NEW |