display_error_observer.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright 2013 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_DISPLAY_DISPLAY_ERROR_OBSERVER_H_
  5. #define ASH_DISPLAY_DISPLAY_ERROR_OBSERVER_H_
  6. #include "ash/ash_export.h"
  7. #include "base/compiler_specific.h"
  8. #include "ui/display/manager/display_configurator.h"
  9. namespace ash {
  10. // The class to observe the output failures and shows the error dialog when
  11. // necessary.
  12. class ASH_EXPORT DisplayErrorObserver
  13. : public display::DisplayConfigurator::Observer {
  14. public:
  15. DisplayErrorObserver();
  16. DisplayErrorObserver(const DisplayErrorObserver&) = delete;
  17. DisplayErrorObserver& operator=(const DisplayErrorObserver&) = delete;
  18. ~DisplayErrorObserver() override;
  19. // display::DisplayConfigurator::Observer overrides:
  20. void OnDisplayModeChangeFailed(
  21. const display::DisplayConfigurator::DisplayStateList& displays,
  22. display::MultipleDisplayState failed_new_state) override;
  23. };
  24. } // namespace ash
  25. #endif // ASH_DISPLAY_DISPLAY_ERROR_OBSERVER_H_