| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ | 5 #ifndef CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ |
| 6 #define CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ | 6 #define CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 } | 340 } |
| 341 | 341 |
| 342 // Configure outputs with |kConfigureDelayMs| delay, | 342 // Configure outputs with |kConfigureDelayMs| delay, |
| 343 // so that time-consuming ConfigureOutputs() won't be called multiple times. | 343 // so that time-consuming ConfigureOutputs() won't be called multiple times. |
| 344 void ScheduleConfigureOutputs(); | 344 void ScheduleConfigureOutputs(); |
| 345 | 345 |
| 346 private: | 346 private: |
| 347 // Configure outputs. | 347 // Configure outputs. |
| 348 void ConfigureOutputs(); | 348 void ConfigureOutputs(); |
| 349 | 349 |
| 350 // Fires OnDisplayModeChanged() event to the observers. | 350 // Notifies observers about an attempted state change. Indicates success if |
| 351 void NotifyOnDisplayChanged(); | 351 // |attempted_state| matches |output_state_| and indicates failure otherwise. |
| 352 void NotifyObservers(OutputState attempted_state); |
| 352 | 353 |
| 353 // Switches to the state specified in |output_state| and |power_state|. | 354 // Switches to the state specified in |output_state| and |power_state|. |
| 354 // If the hardware mirroring failed and |mirroring_controller_| is set, | 355 // If the hardware mirroring failed and |mirroring_controller_| is set, |
| 355 // it switches to |STATE_DUAL_EXTENDED| and calls |SetSoftwareMirroring()| | 356 // it switches to |STATE_DUAL_EXTENDED| and calls |SetSoftwareMirroring()| |
| 356 // to enable software based mirroring. | 357 // to enable software based mirroring. |
| 357 // On success, updates |output_state_|, |power_state_|, and |cached_outputs_| | 358 // On success, updates |output_state_|, |power_state_|, and |cached_outputs_| |
| 358 // and returns true. | 359 // and returns true. |
| 359 bool EnterStateOrFallBackToSoftwareMirroring( | 360 bool EnterStateOrFallBackToSoftwareMirroring( |
| 360 OutputState output_state, | 361 OutputState output_state, |
| 361 DisplayPowerState power_state, | 362 DisplayPowerState power_state, |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 scoped_ptr<base::OneShotTimer<OutputConfigurator> > configure_timer_; | 425 scoped_ptr<base::OneShotTimer<OutputConfigurator> > configure_timer_; |
| 425 | 426 |
| 426 DISALLOW_COPY_AND_ASSIGN(OutputConfigurator); | 427 DISALLOW_COPY_AND_ASSIGN(OutputConfigurator); |
| 427 }; | 428 }; |
| 428 | 429 |
| 429 typedef std::vector<OutputConfigurator::OutputSnapshot> OutputSnapshotList; | 430 typedef std::vector<OutputConfigurator::OutputSnapshot> OutputSnapshotList; |
| 430 | 431 |
| 431 } // namespace chromeos | 432 } // namespace chromeos |
| 432 | 433 |
| 433 #endif // CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ | 434 #endif // CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ |
| OLD | NEW |