Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: ash/system/user/user_card_view.h

Issue 2099793002: mash: Migrate some system user files to common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
9 #include "base/macros.h" 8 #include "base/macros.h"
10 #include "ui/views/view.h" 9 #include "ui/views/view.h"
11 10
12 namespace ash { 11 namespace ash {
12
13 enum class LoginStatus;
14
13 namespace tray { 15 namespace tray {
14 16
15 // 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
16 // address, name, and more. View has no borders. 18 // address, name, and more. View has no borders.
17 class UserCardView : public views::View { 19 class UserCardView : public views::View {
18 public: 20 public:
19 // |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.
20 UserCardView(LoginStatus login_status, int max_width, int user_index); 22 UserCardView(LoginStatus login_status, int max_width, int user_index);
21 ~UserCardView() override; 23 ~UserCardView() override;
22 24
23 // views::View overrides. 25 // views::View overrides.
24 void GetAccessibleState(ui::AXViewState* state) override; 26 void GetAccessibleState(ui::AXViewState* state) override;
25 27
26 private: 28 private:
27 // Creates the content for the public mode. 29 // Creates the content for the public mode.
28 void AddPublicModeUserContent(int max_width); 30 void AddPublicModeUserContent(int max_width);
29 31
30 void AddUserContent(LoginStatus login_status, int user_index); 32 void AddUserContent(LoginStatus login_status, int user_index);
31 33
32 // Create a user icon representation. 34 // Create a user icon representation.
33 views::View* CreateIcon(LoginStatus login_status, int user_index); 35 views::View* CreateIcon(LoginStatus login_status, int user_index);
34 36
35 DISALLOW_COPY_AND_ASSIGN(UserCardView); 37 DISALLOW_COPY_AND_ASSIGN(UserCardView);
36 }; 38 };
37 39
38 } // namespace tray 40 } // namespace tray
39 } // namespace ash 41 } // namespace ash
40 42
41 #endif // ASH_SYSTEM_USER_USER_CARD_VIEW_H_ 43 #endif // ASH_SYSTEM_USER_USER_CARD_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698