Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ | 5 #ifndef UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ |
| 6 #define UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ | 6 #define UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 293 const std::vector<GammaRampRGBEntry>& gamma_lut, | 293 const std::vector<GammaRampRGBEntry>& gamma_lut, |
| 294 const std::vector<float>& correction_matrix); | 294 const std::vector<float>& correction_matrix); |
| 295 | 295 |
| 296 private: | 296 private: |
| 297 class DisplayLayoutManagerImpl; | 297 class DisplayLayoutManagerImpl; |
| 298 | 298 |
| 299 // Mapping a client to its protection request. | 299 // Mapping a client to its protection request. |
| 300 typedef std::map<ContentProtectionClientId, ContentProtections> | 300 typedef std::map<ContentProtectionClientId, ContentProtections> |
| 301 ProtectionRequests; | 301 ProtectionRequests; |
| 302 | 302 |
| 303 void SetDisplayPowerInternal(chromeos::DisplayPowerState power_state, | |
|
Daniel Erat
2016/04/22 21:37:33
add a comment here. maybe something like:
// Up
dbasehore
2016/04/22 22:18:57
Done.
| |
| 304 int flags, | |
| 305 const ConfigurationCallback& callback); | |
|
Daniel Erat
2016/04/22 21:37:33
nit: add a blank line after this one
dbasehore
2016/04/22 22:18:57
Done.
| |
| 303 // Configures displays. Invoked by |configure_timer_|. | 306 // Configures displays. Invoked by |configure_timer_|. |
| 304 void ConfigureDisplays(); | 307 void ConfigureDisplays(); |
| 305 | 308 |
| 306 // Restores |requested_power_state_| after the system has resumed, | |
| 307 // additionally forcing a probe. Invoked by |configure_timer_|. | |
| 308 void RestoreRequestedPowerStateAfterResume(); | |
| 309 | |
| 310 // Notifies observers about an attempted state change. | 309 // Notifies observers about an attempted state change. |
| 311 void NotifyDisplayStateObservers(bool success, | 310 void NotifyDisplayStateObservers(bool success, |
| 312 MultipleDisplayState attempted_state); | 311 MultipleDisplayState attempted_state); |
| 313 | 312 |
| 314 // Notifies observers about a power state change. | 313 // Notifies observers about a power state change. |
| 315 void NotifyPowerStateObservers(); | 314 void NotifyPowerStateObservers(); |
| 316 | 315 |
| 317 // Returns the display state that should be used with |cached_displays_| while | 316 // Returns the display state that should be used with |cached_displays_| while |
| 318 // in |power_state|. | 317 // in |power_state|. |
| 319 MultipleDisplayState ChooseDisplayState( | 318 MultipleDisplayState ChooseDisplayState( |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 387 | 386 |
| 388 // Pending requests. These values are used when triggering the next display | 387 // Pending requests. These values are used when triggering the next display |
| 389 // configuration. | 388 // configuration. |
| 390 // | 389 // |
| 391 // Stores the user requested state or INVALID if nothing was requested. | 390 // Stores the user requested state or INVALID if nothing was requested. |
| 392 MultipleDisplayState requested_display_state_; | 391 MultipleDisplayState requested_display_state_; |
| 393 | 392 |
| 394 // Stores the requested power state. | 393 // Stores the requested power state. |
| 395 chromeos::DisplayPowerState requested_power_state_; | 394 chromeos::DisplayPowerState requested_power_state_; |
| 396 | 395 |
| 397 // True if |requested_power_state_| has been changed due to a user request. | 396 // Stores the power state to configure. May be the requested_power_state_ or |
|
Daniel Erat
2016/04/22 21:37:33
nit: maybe change this to "The power state to be a
dbasehore
2016/04/22 22:18:57
Done.
| |
| 398 bool requested_power_state_change_; | 397 // DISPLAY_POWER_ALL_OFF for suspend. |
| 398 chromeos::DisplayPowerState pending_power_state_; | |
| 399 | |
| 400 // True if |pending_power_state_| has been changed. | |
| 401 bool pending_power_state_change_; | |
|
Daniel Erat
2016/04/22 21:37:33
mind renaming this to something like |have_pending
dbasehore
2016/04/22 22:18:57
Changed to has_pending_power_state_ since third pe
| |
| 399 | 402 |
| 400 // Bitwise-or value of the |kSetDisplayPower*| flags defined above. | 403 // Bitwise-or value of the |kSetDisplayPower*| flags defined above. |
| 401 int requested_power_flags_; | 404 int pending_power_flags_; |
| 402 | 405 |
| 403 // List of callbacks from callers waiting for the display configuration to | 406 // List of callbacks from callers waiting for the display configuration to |
| 404 // start/finish. Note these callbacks belong to the pending request, not a | 407 // start/finish. Note these callbacks belong to the pending request, not a |
| 405 // request currently active. | 408 // request currently active. |
| 406 std::vector<ConfigurationCallback> queued_configuration_callbacks_; | 409 std::vector<ConfigurationCallback> queued_configuration_callbacks_; |
| 407 | 410 |
| 408 // List of callbacks belonging to the currently running display configuration | 411 // List of callbacks belonging to the currently running display configuration |
| 409 // task. | 412 // task. |
| 410 std::vector<ConfigurationCallback> in_progress_configuration_callbacks_; | 413 std::vector<ConfigurationCallback> in_progress_configuration_callbacks_; |
| 411 | 414 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 458 | 461 |
| 459 // This must be the last variable. | 462 // This must be the last variable. |
| 460 base::WeakPtrFactory<DisplayConfigurator> weak_ptr_factory_; | 463 base::WeakPtrFactory<DisplayConfigurator> weak_ptr_factory_; |
| 461 | 464 |
| 462 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurator); | 465 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurator); |
| 463 }; | 466 }; |
| 464 | 467 |
| 465 } // namespace ui | 468 } // namespace ui |
| 466 | 469 |
| 467 #endif // UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ | 470 #endif // UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ |
| OLD | NEW |