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