| Index: services/ui/ws/platform_screen_impl_ozone.h
|
| diff --git a/services/ui/ws/platform_screen_impl_ozone.h b/services/ui/ws/platform_screen_impl_ozone.h
|
| index f01e16ba7d9080ae98a633f7507410647ae8c104..e026bf61d1319e27fdad0a4738db57ab58485612 100644
|
| --- a/services/ui/ws/platform_screen_impl_ozone.h
|
| +++ b/services/ui/ws/platform_screen_impl_ozone.h
|
| @@ -10,19 +10,9 @@
|
| #include <vector>
|
|
|
| #include "base/callback.h"
|
| -#include "base/memory/weak_ptr.h"
|
| +#include "base/macros.h"
|
| #include "services/ui/ws/platform_screen.h"
|
| -#include "ui/display/types/native_display_observer.h"
|
| -#include "ui/gfx/geometry/rect.h"
|
| -
|
| -namespace gfx {
|
| -class Rect;
|
| -}
|
| -
|
| -namespace ui {
|
| -class NativeDisplayDelegate;
|
| -class DisplaySnapshot;
|
| -}
|
| +#include "ui/display/chromeos/display_configurator.h"
|
|
|
| namespace ui {
|
| namespace ws {
|
| @@ -30,38 +20,29 @@ namespace ws {
|
| // PlatformScreenImplOzone provides the necessary functionality to configure all
|
| // attached physical displays on the ozone platform.
|
| class PlatformScreenImplOzone : public PlatformScreen,
|
| - public ui::NativeDisplayObserver {
|
| + public ui::DisplayConfigurator::Observer {
|
| public:
|
| PlatformScreenImplOzone();
|
| ~PlatformScreenImplOzone() override;
|
|
|
| private:
|
| - // PlatformScreen
|
| + // PlatformScreen:
|
| void Init() override; // Must not be called until after the ozone platform is
|
| // initialized.
|
| void ConfigurePhysicalDisplay(
|
| const ConfiguredDisplayCallback& callback) override;
|
|
|
| - // TODO(rjkroege): NativeDisplayObserver is misnamed as it tracks changes in
|
| - // the physical "Screen". Consider renaming it to NativeScreenObserver.
|
| - // ui::NativeDisplayObserver:
|
| - void OnConfigurationChanged() override;
|
| -
|
| - // Display management callback.
|
| - void OnDisplaysAquired(const ConfiguredDisplayCallback& callback,
|
| - const std::vector<ui::DisplaySnapshot*>& displays);
|
| -
|
| - // The display subsystem calls |OnDisplayConfigured| for each display that has
|
| - // been successfully configured. This in turn calls |callback_| with the
|
| - // identity and bounds of each physical display.
|
| - void OnDisplayConfigured(const ConfiguredDisplayCallback& callback,
|
| - int64_t id,
|
| - const gfx::Rect& bounds,
|
| - bool success);
|
| + // ui::DisplayConfigurator::Observer:
|
| + void OnDisplayModeChanged(
|
| + const ui::DisplayConfigurator::DisplayStateList& displays) override;
|
| + void OnDisplayModeChangeFailed(
|
| + const ui::DisplayConfigurator::DisplayStateList& displays,
|
| + MultipleDisplayState failed_new_state) override;
|
|
|
| - std::unique_ptr<ui::NativeDisplayDelegate> native_display_delegate_;
|
| + ui::DisplayConfigurator display_configurator_;
|
|
|
| - base::WeakPtrFactory<PlatformScreenImplOzone> weak_ptr_factory_;
|
| + // Callback to called when new displays are configured.
|
| + ConfiguredDisplayCallback callback_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(PlatformScreenImplOzone);
|
| };
|
|
|