notification_hidden_view.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // Copyright 2018 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_SYSTEM_UNIFIED_NOTIFICATION_HIDDEN_VIEW_H_
  5. #define ASH_SYSTEM_UNIFIED_NOTIFICATION_HIDDEN_VIEW_H_
  6. #include "ui/views/view.h"
  7. namespace views {
  8. class Button;
  9. class Label;
  10. }
  11. namespace ash {
  12. // A view to show the message that notifications are hidden on the lock screen
  13. // by the setting or the flag. This may show the button to encourage the user
  14. // to change the lock screen notification setting if the condition permits.
  15. class NotificationHiddenView : public views::View {
  16. public:
  17. NotificationHiddenView();
  18. NotificationHiddenView(const NotificationHiddenView&) = delete;
  19. NotificationHiddenView& operator=(const NotificationHiddenView&) = delete;
  20. ~NotificationHiddenView() override = default;
  21. // views::View:
  22. const char* GetClassName() const override;
  23. void OnThemeChanged() override;
  24. views::Button* change_button_for_testing() { return change_button_; }
  25. private:
  26. void ChangeButtonPressed();
  27. views::View* const container_;
  28. views::Label* const label_;
  29. views::Button* change_button_ = nullptr;
  30. };
  31. } // namespace ash
  32. #endif // ASH_SYSTEM_UNIFIED_NOTIFICATION_HIDDEN_VIEW_H_