display_configurator_observer.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Copyright 2021 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 CHROMECAST_BROWSER_DISPLAY_CONFIGURATOR_OBSERVER_H_
  5. #define CHROMECAST_BROWSER_DISPLAY_CONFIGURATOR_OBSERVER_H_
  6. #include "chromecast/browser/cast_display_configurator.h"
  7. namespace chromecast {
  8. class CastWindowManagerAura;
  9. // Observer class that can respond to Display Configurator state changes.
  10. // Forces a repaint to ensure content is refreshed post display configuration
  11. // change.
  12. class DisplayConfiguratorObserver
  13. : public shell::CastDisplayConfigurator::Observer {
  14. public:
  15. DisplayConfiguratorObserver(
  16. shell::CastDisplayConfigurator* display_configurator,
  17. CastWindowManagerAura* manager);
  18. ~DisplayConfiguratorObserver() override;
  19. DisplayConfiguratorObserver(const DisplayConfiguratorObserver&) = delete;
  20. DisplayConfiguratorObserver& operator=(const DisplayConfiguratorObserver&) =
  21. delete;
  22. // CastDisplayConfigurator::Observer
  23. void OnDisplayStateChanged() override;
  24. private:
  25. shell::CastDisplayConfigurator* display_configurator_;
  26. CastWindowManagerAura* window_manager_;
  27. };
  28. } // namespace chromecast
  29. #endif // CHROMECAST_BROWSER_DISPLAY_CONFIGURATOR_OBSERVER_H_