| Index: chromeos/display/output_configurator.h
|
| diff --git a/chromeos/display/output_configurator.h b/chromeos/display/output_configurator.h
|
| index f65a6cc96360736332f237a064fdf6b1253e3fc2..1214f5e7259fbc334399620a1b82116d797a74d2 100644
|
| --- a/chromeos/display/output_configurator.h
|
| +++ b/chromeos/display/output_configurator.h
|
| @@ -62,6 +62,14 @@ class CHROMEOS_EXPORT OutputConfigurator : public MessageLoop::Dispatcher {
|
| virtual void OnDisplayModeChangeFailed(OutputState failed_new_state) {}
|
| };
|
|
|
| + class Delegate {
|
| + public:
|
| + // Called when displays are detected first time. This is to allow
|
| + // chrome to select the display mode when started.
|
| + virtual OutputState GetStateForOutputs(
|
| + const std::vector<RROutput>& outputs) const = 0;
|
| + };
|
| +
|
| OutputConfigurator();
|
| virtual ~OutputConfigurator();
|
|
|
| @@ -69,6 +77,8 @@ class CHROMEOS_EXPORT OutputConfigurator : public MessageLoop::Dispatcher {
|
|
|
| OutputState output_state() const { return output_state_; }
|
|
|
| + void set_delegate(Delegate* delegate) { delegate_ = delegate; }
|
| +
|
| // Initialization, must be called right after constructor.
|
| // |is_panel_fitting_enabled| indicates hardware panel fitting support.
|
| // If |background_color_argb| is non zero and there are multiple displays,
|
| @@ -172,12 +182,21 @@ class CHROMEOS_EXPORT OutputConfigurator : public MessageLoop::Dispatcher {
|
| // Updates |mirror_mode_preserved_aspect_| and |last_enter_state_time_|.
|
| void RecordPreviousStateUMA();
|
|
|
| + // Returns next state.
|
| + OutputState GetNextState(Display* display,
|
| + XRRScreenResources* screen,
|
| + OutputState current_state,
|
| + const std::vector<OutputSnapshot>& outputs) const;
|
| +
|
| +
|
| // Tells if the output specified by |output_info| is for internal display.
|
| static bool IsInternalOutput(const XRROutputInfo* output_info);
|
|
|
| // Returns output's native mode, None if not found.
|
| static RRMode GetOutputNativeMode(const XRROutputInfo* output_info);
|
|
|
| + Delegate* delegate_;
|
| +
|
| // This is detected by the constructor to determine whether or not we should
|
| // be enabled. If we aren't running on ChromeOS, we can't assume that the
|
| // Xrandr X11 extension is supported.
|
|
|