user_info.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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
  3. // found in the LICENSE file.
  4. #ifndef COMPONENTS_USER_MANAGER_USER_INFO_H_
  5. #define COMPONENTS_USER_MANAGER_USER_INFO_H_
  6. #include <string>
  7. #include "components/user_manager/user_manager_export.h"
  8. class AccountId;
  9. namespace gfx {
  10. class ImageSkia;
  11. }
  12. namespace user_manager {
  13. // A class that represents user related info.
  14. class USER_MANAGER_EXPORT UserInfo {
  15. public:
  16. UserInfo();
  17. virtual ~UserInfo();
  18. // Gets the display name for the user.
  19. virtual std::u16string GetDisplayName() const = 0;
  20. // Gets the given name of the user.
  21. virtual std::u16string GetGivenName() const = 0;
  22. // Gets the display email address for the user.
  23. // The display email address might contains some periods in the email name
  24. // as well as capitalized letters. For example: "Foo.Bar@mock.com".
  25. virtual std::string GetDisplayEmail() const = 0;
  26. // Returns AccountId for the user.
  27. virtual const AccountId& GetAccountId() const = 0;
  28. // Gets the avatar image for the user.
  29. virtual const gfx::ImageSkia& GetImage() const = 0;
  30. };
  31. } // namespace user_manager
  32. #endif // COMPONENTS_USER_MANAGER_USER_INFO_H_