| Index: ui/display/chromeos/display_configurator.h
|
| diff --git a/ui/display/chromeos/display_configurator.h b/ui/display/chromeos/display_configurator.h
|
| index 9fa5b41b987fccc7c31d10713fcacbf0944b6d8b..1e47cc45c2fb295d66bf9a401cf1e0803675b7c1 100644
|
| --- a/ui/display/chromeos/display_configurator.h
|
| +++ b/ui/display/chromeos/display_configurator.h
|
| @@ -135,6 +135,10 @@ class DISPLAY_EXPORT DisplayConfigurator : public NativeDisplayObserver {
|
| // ConfigureDisplays(), and returns true; returns false otherwise.
|
| bool TriggerConfigureTimeout() WARN_UNUSED_RESULT;
|
|
|
| + // Gets the current delay of the |configure_timer_| if it's running, or zero
|
| + // time delta otherwise.
|
| + base::TimeDelta GetConfigureDelay() const;
|
| +
|
| private:
|
| DisplayConfigurator* configurator_; // not owned
|
|
|
| @@ -158,6 +162,16 @@ class DISPLAY_EXPORT DisplayConfigurator : public NativeDisplayObserver {
|
| // See crbug.com/130188 for initial discussion.
|
| static const int kVerticalGap = 60;
|
|
|
| + // The delay to perform configuration after RRNotify. See the comment for
|
| + // |configure_timer_|.
|
| + static const int kConfigureDelayMs = 500;
|
| +
|
| + // The delay to perform configuration after waking up from suspend when in
|
| + // multi display mode. Should be bigger than |kConfigureDelayMs|. Generally
|
| + // big enough for external displays to be detected and added.
|
| + // crbug.com/614624.
|
| + static const int kResumeConfigureMultiDisplayDelayMs = 2000;
|
| +
|
| // Returns the mode within |display| that matches the given size with highest
|
| // refresh rate. Returns None if no matching display was found.
|
| static const DisplayMode* FindDisplayModeMatchingSize(
|
| @@ -175,6 +189,18 @@ class DISPLAY_EXPORT DisplayConfigurator : public NativeDisplayObserver {
|
| const std::vector<DisplaySnapshot*>& cached_displays() const {
|
| return cached_displays_;
|
| }
|
| + void set_state_controller(StateController* controller) {
|
| + state_controller_ = controller;
|
| + }
|
| + void set_mirroring_controller(SoftwareMirroringController* controller) {
|
| + mirroring_controller_ = controller;
|
| + }
|
| + void set_configure_display(bool configure_display) {
|
| + configure_display_ = configure_display;
|
| + }
|
| + chromeos::DisplayPowerState current_power_state() const {
|
| + return current_power_state_;
|
| + }
|
|
|
| // Called when an external process no longer needs to control the display
|
| // and Chrome can take control.
|
| @@ -184,13 +210,6 @@ class DISPLAY_EXPORT DisplayConfigurator : public NativeDisplayObserver {
|
| // Chrome should relinquish it.
|
| void RelinquishControl(const DisplayControlCallback& callback);
|
|
|
| - void set_state_controller(StateController* controller) {
|
| - state_controller_ = controller;
|
| - }
|
| - void set_mirroring_controller(SoftwareMirroringController* controller) {
|
| - mirroring_controller_ = controller;
|
| - }
|
| -
|
| // Replaces |native_display_delegate_| with the delegate passed in and sets
|
| // |configure_display_| to true. Should be called before Init().
|
| void SetDelegateForTesting(
|
| @@ -237,7 +256,7 @@ class DISPLAY_EXPORT DisplayConfigurator : public NativeDisplayObserver {
|
| // Sets all the displays into pre-suspend mode; usually this means
|
| // configure them for their resume state. This allows faster resume on
|
| // machines where display configuration is slow. On completion of the display
|
| - // configuration |callback| is executed.
|
| + // configuration |callback| is executed synchronously or asynchronously.
|
| void SuspendDisplays(const ConfigurationCallback& callback);
|
|
|
| // Reprobes displays to handle changes made while the system was
|
| @@ -282,10 +301,6 @@ class DISPLAY_EXPORT DisplayConfigurator : public NativeDisplayObserver {
|
| // Returns true if there is at least one display on.
|
| bool IsDisplayOn() const;
|
|
|
| - void set_configure_display(bool configure_display) {
|
| - configure_display_ = configure_display;
|
| - }
|
| -
|
| // Sets the gamma, degamma and correction matrix for |display_id| to the
|
| // values in |degamma_lut|, |gamma_lut| and |correction_matrix|.
|
| bool SetColorCorrection(int64_t display_id,
|
|
|