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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 // Updates |pending_*| members and applies the passed-in state. |callback| is | 303 // Updates |pending_*| members and applies the passed-in state. |callback| is |
304 // invoked (perhaps synchronously) on completion. | 304 // invoked (perhaps synchronously) on completion. |
305 void SetDisplayPowerInternal(chromeos::DisplayPowerState power_state, | 305 void SetDisplayPowerInternal(chromeos::DisplayPowerState power_state, |
306 int flags, | 306 int flags, |
| 307 bool configure_cached_displays, |
307 const ConfigurationCallback& callback); | 308 const ConfigurationCallback& callback); |
308 | 309 |
309 // Configures displays. Invoked by |configure_timer_|. | 310 // Configures displays. Invoked by |configure_timer_|. |
310 void ConfigureDisplays(); | 311 void ConfigureDisplays(); |
311 | 312 |
312 // Notifies observers about an attempted state change. | 313 // Notifies observers about an attempted state change. |
313 void NotifyDisplayStateObservers(bool success, | 314 void NotifyDisplayStateObservers(bool success, |
314 MultipleDisplayState attempted_state); | 315 MultipleDisplayState attempted_state); |
315 | 316 |
316 // Notifies observers about a power state change. | 317 // Notifies observers about a power state change. |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 // task. | 416 // task. |
416 std::vector<ConfigurationCallback> in_progress_configuration_callbacks_; | 417 std::vector<ConfigurationCallback> in_progress_configuration_callbacks_; |
417 | 418 |
418 std::queue<base::Closure> content_protection_tasks_; | 419 std::queue<base::Closure> content_protection_tasks_; |
419 std::queue<QueryProtectionCallback> query_protection_callbacks_; | 420 std::queue<QueryProtectionCallback> query_protection_callbacks_; |
420 std::queue<EnableProtectionCallback> enable_protection_callbacks_; | 421 std::queue<EnableProtectionCallback> enable_protection_callbacks_; |
421 | 422 |
422 // True if the caller wants to force the display configuration process. | 423 // True if the caller wants to force the display configuration process. |
423 bool force_configure_; | 424 bool force_configure_; |
424 | 425 |
| 426 bool configure_cached_displays_; |
| 427 |
425 // Most-recently-used display configuration. Note that the actual | 428 // Most-recently-used display configuration. Note that the actual |
426 // configuration changes asynchronously. | 429 // configuration changes asynchronously. |
427 DisplayStateList cached_displays_; | 430 DisplayStateList cached_displays_; |
428 | 431 |
429 // Most-recently-used framebuffer size. | 432 // Most-recently-used framebuffer size. |
430 gfx::Size framebuffer_size_; | 433 gfx::Size framebuffer_size_; |
431 | 434 |
432 base::ObserverList<Observer> observers_; | 435 base::ObserverList<Observer> observers_; |
433 | 436 |
434 // The timer to delay configuring displays. This is used to aggregate multiple | 437 // The timer to delay configuring displays. This is used to aggregate multiple |
(...skipping 29 matching lines...) Expand all Loading... |
464 | 467 |
465 // This must be the last variable. | 468 // This must be the last variable. |
466 base::WeakPtrFactory<DisplayConfigurator> weak_ptr_factory_; | 469 base::WeakPtrFactory<DisplayConfigurator> weak_ptr_factory_; |
467 | 470 |
468 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurator); | 471 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurator); |
469 }; | 472 }; |
470 | 473 |
471 } // namespace ui | 474 } // namespace ui |
472 | 475 |
473 #endif // UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ | 476 #endif // UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ |
OLD | NEW |