ambient_info_view.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // Copyright 2020 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_AMBIENT_UI_AMBIENT_INFO_VIEW_H_
  5. #define ASH_AMBIENT_UI_AMBIENT_INFO_VIEW_H_
  6. #include "ash/ambient/ui/ambient_view_delegate.h"
  7. #include "ash/ash_export.h"
  8. #include "ui/base/metadata/metadata_header_macros.h"
  9. #include "ui/views/view.h"
  10. namespace gfx {
  11. class Transform;
  12. }
  13. namespace views {
  14. class Label;
  15. } // namespace views
  16. namespace ash {
  17. class GlanceableInfoView;
  18. class ASH_EXPORT AmbientInfoView : public views::View {
  19. public:
  20. METADATA_HEADER(AmbientInfoView);
  21. explicit AmbientInfoView(AmbientViewDelegate* delegate);
  22. AmbientInfoView(const AmbientInfoView&) = delete;
  23. AmbientInfoView& operator=(AmbientInfoView&) = delete;
  24. ~AmbientInfoView() override;
  25. // views::View
  26. void OnThemeChanged() override;
  27. void UpdateImageDetails(const std::u16string& details,
  28. const std::u16string& related_details);
  29. void SetTextTransform(const gfx::Transform& transform);
  30. private:
  31. void InitLayout();
  32. // Owned by |AmbientController| and should always outlive |this|.
  33. AmbientViewDelegate* delegate_ = nullptr;
  34. GlanceableInfoView* glanceable_info_view_ = nullptr;
  35. views::Label* details_label_ = nullptr;
  36. views::Label* related_details_label_ = nullptr;
  37. };
  38. } // namespace ash
  39. #endif // ASH_AMBIENT_UI_AMBIENT_INFO_VIEW_H_