Chromium Code Reviews| Index: monitor_reconfigure_main.h |
| diff --git a/monitor_reconfigure_main.h b/monitor_reconfigure_main.h |
| index d639fb157acd7258e41af543165162a5a51ab322..8a2d2063db7d34f7aa7c9f766711b545b9bcd10a 100644 |
| --- a/monitor_reconfigure_main.h |
| +++ b/monitor_reconfigure_main.h |
| @@ -18,43 +18,51 @@ namespace monitor_reconfig { |
| // MonitorReconfigureMain is the class responsible for setting the external |
| // monitor to the max resolution based on the modes supported by the native |
| -// monitor and the external monitor |
| +// monitor and the external monitor. |
| class MonitorReconfigureMain { |
| public: |
| - MonitorReconfigureMain(Display* display, XRRScreenResources* screen_info); |
| + MonitorReconfigureMain(Display* display, Window window, |
|
Daniel Erat
2011/03/24 23:02:11
nit: one argument per line
|
| + XRRScreenResources* screen_info); |
| virtual ~MonitorReconfigureMain() {} |
| - // Main entry point |
| + // Main entry point. |
| void Run(); |
| private: |
| // Initializes the |lcd_output_| and |external_output_| members. |
| void DetermineOutputs(); |
| - // Returns whether an external monitor is connected |
| + // Returns whether an external monitor is connected. |
| bool IsExternalMonitorConnected(); |
| // Sorts |output_info|'s modes by decreasing number of pixels, storing the |
| // results in |modes_out|. |
| - void SortModesByResolution(const XRROutputInfo& output_info, |
| + void SortModesByResolution(const RROutput output, |
|
Daniel Erat
2011/03/24 23:02:11
make RROutput a const reference instead of passing
marcheu
2011/03/24 23:17:53
It's an int, do we care?
Daniel Erat
2011/03/24 23:39:46
Okay, please remove the 'const' then.
|
| std::vector<ResolutionSelector::Mode>* modes_out); |
| // Set the resolution for a particular device or for the screen. |
| - bool SetDeviceResolution(const std::string& device_name, |
| - const std::string& resolution); |
| - bool SetScreenResolution(const std::string& resolution); |
| + bool SetDeviceResolution(const RROutput output, |
| + const XRROutputInfo* output_info, |
| + const ResolutionSelector::Mode); |
|
Daniel Erat
2011/03/24 23:02:11
make the first and last arguments be const referen
|
| + bool SetScreenResolution(const ResolutionSelector::Mode resolution); |
|
Daniel Erat
2011/03/24 23:02:11
make this into a reference
|
| // Disable output to a device. |
| - bool DisableDevice(const std::string& device_name); |
| + bool DisableDevice(const RROutput output, |
| + const XRROutputInfo* output_info); |
|
Daniel Erat
2011/03/24 23:02:11
make these be references too (sorry for the repeti
|
| // Mapping between mode XIDs and mode information structures. |
| std::map<int, XRRModeInfo*> mode_map_; |
| - // X Resources needed between functions |
| + // X Resources needed between functions. |
| Display* display_; |
| + Window window_; |
| XRRScreenResources* screen_info_; |
| - XRROutputInfo* lcd_output_; |
| - XRROutputInfo* external_output_; |
| + |
| + RROutput lcd_output_; |
| + XRROutputInfo* lcd_output_info_; |
| + |
| + RROutput external_output_; |
| + XRROutputInfo* external_output_info_; |
| }; |
| } // namespace monitor_reconfig |