| Index: ash/display/display_change_observer_chromeos.h
|
| diff --git a/ash/display/display_change_observer_chromeos.h b/ash/display/display_change_observer_chromeos.h
|
| index cbaa57623320b4b134d4b24f43db49b438e25cc0..35a76d25833de772fe192c6746cb71740a22788d 100644
|
| --- a/ash/display/display_change_observer_chromeos.h
|
| +++ b/ash/display/display_change_observer_chromeos.h
|
| @@ -7,26 +7,30 @@
|
|
|
| #include <stdint.h>
|
|
|
| +#include <memory>
|
| #include <vector>
|
|
|
| #include "ash/ash_export.h"
|
| -#include "ash/common/shell_observer.h"
|
| #include "base/macros.h"
|
| #include "ui/display/chromeos/display_configurator.h"
|
| +#include "ui/display/manager/display_string_provider.h"
|
| #include "ui/display/manager/managed_display_info.h"
|
| #include "ui/events/devices/input_device_event_observer.h"
|
|
|
| +namespace display {
|
| +class DisplayManager;
|
| +}
|
| +
|
| namespace ash {
|
|
|
| class DisplayMode;
|
| class DisplaySnapshot;
|
|
|
| -// An object that observes changes in display configuration and
|
| -// update DisplayManagers.
|
| +// An object that observes changes in display configuration and updates
|
| +// DisplayManager.
|
| class DisplayChangeObserver : public ui::DisplayConfigurator::StateController,
|
| public ui::DisplayConfigurator::Observer,
|
| - public ui::InputDeviceEventObserver,
|
| - public ShellObserver {
|
| + public ui::InputDeviceEventObserver {
|
| public:
|
| // Returns the mode list for internal display.
|
| ASH_EXPORT static display::ManagedDisplayInfo::ManagedDisplayModeList
|
| @@ -38,9 +42,18 @@ class DisplayChangeObserver : public ui::DisplayConfigurator::StateController,
|
| ASH_EXPORT static display::ManagedDisplayInfo::ManagedDisplayModeList
|
| GetExternalManagedDisplayModeList(const ui::DisplaySnapshot& output);
|
|
|
| - DisplayChangeObserver();
|
| + explicit DisplayChangeObserver(
|
| + std::unique_ptr<display::DisplayStringProvider> string_provider);
|
| ~DisplayChangeObserver() override;
|
|
|
| + void set_display_manager(display::DisplayManager* display_manager) {
|
| + display_manager_ = display_manager;
|
| + }
|
| +
|
| + void set_display_configurator(ui::DisplayConfigurator* display_configurator) {
|
| + display_configurator_ = display_configurator;
|
| + }
|
| +
|
| // ui::DisplayConfigurator::StateController overrides:
|
| ui::MultipleDisplayState GetStateForDisplayIds(
|
| const ui::DisplayConfigurator::DisplayStateList& outputs) const override;
|
| @@ -57,13 +70,14 @@ class DisplayChangeObserver : public ui::DisplayConfigurator::StateController,
|
| // Overriden from ui::InputDeviceEventObserver:
|
| void OnTouchscreenDeviceConfigurationChanged() override;
|
|
|
| - // Overriden from ShellObserver:
|
| - void OnAppTerminating() override;
|
| -
|
| // Exposed for testing.
|
| ASH_EXPORT static float FindDeviceScaleFactor(float dpi);
|
|
|
| private:
|
| + std::unique_ptr<display::DisplayStringProvider> string_provider_;
|
| + display::DisplayManager* display_manager_ = nullptr;
|
| + ui::DisplayConfigurator* display_configurator_ = nullptr;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(DisplayChangeObserver);
|
| };
|
|
|
|
|