glanceables_welcome_label.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright 2022 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 ASH_GLANCEABLES_GLANCEABLES_WELCOME_LABEL_H_
  5. #define ASH_GLANCEABLES_GLANCEABLES_WELCOME_LABEL_H_
  6. #include <string>
  7. #include "ash/ash_export.h"
  8. #include "ui/base/metadata/metadata_header_macros.h"
  9. #include "ui/views/controls/label.h"
  10. namespace ash {
  11. // Personalized greeting / welcome label that used on glanceables surfaces
  12. // (welcome screen and overview mode).
  13. class ASH_EXPORT GlanceablesWelcomeLabel : public views::Label {
  14. public:
  15. METADATA_HEADER(GlanceablesWelcomeLabel);
  16. GlanceablesWelcomeLabel();
  17. GlanceablesWelcomeLabel(const GlanceablesWelcomeLabel&) = delete;
  18. GlanceablesWelcomeLabel& operator=(const GlanceablesWelcomeLabel&) = delete;
  19. ~GlanceablesWelcomeLabel() override = default;
  20. // views::Label:
  21. void OnThemeChanged() override;
  22. private:
  23. std::u16string GetUserGivenName() const;
  24. };
  25. } // namespace ash
  26. #endif // ASH_GLANCEABLES_GLANCEABLES_WELCOME_LABEL_H_