| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 | 138 |
| 139 MultipleDisplayState display_state() const { return display_state_; } | 139 MultipleDisplayState display_state() const { return display_state_; } |
| 140 chromeos::DisplayPowerState requested_power_state() const { | 140 chromeos::DisplayPowerState requested_power_state() const { |
| 141 return requested_power_state_; | 141 return requested_power_state_; |
| 142 } | 142 } |
| 143 const gfx::Size framebuffer_size() const { return framebuffer_size_; } | 143 const gfx::Size framebuffer_size() const { return framebuffer_size_; } |
| 144 const std::vector<DisplayState>& cached_displays() const { | 144 const std::vector<DisplayState>& cached_displays() const { |
| 145 return cached_displays_; | 145 return cached_displays_; |
| 146 } | 146 } |
| 147 | 147 |
| 148 void RelinquishControl(); |
| 149 |
| 148 void set_state_controller(StateController* controller) { | 150 void set_state_controller(StateController* controller) { |
| 149 state_controller_ = controller; | 151 state_controller_ = controller; |
| 150 } | 152 } |
| 151 void set_mirroring_controller(SoftwareMirroringController* controller) { | 153 void set_mirroring_controller(SoftwareMirroringController* controller) { |
| 152 mirroring_controller_ = controller; | 154 mirroring_controller_ = controller; |
| 153 } | 155 } |
| 154 | 156 |
| 155 // Replaces |native_display_delegate_| with the delegate passed in and sets | 157 // Replaces |native_display_delegate_| with the delegate passed in and sets |
| 156 // |configure_display_| to true. Should be called before Init(). | 158 // |configure_display_| to true. Should be called before Init(). |
| 157 void SetDelegateForTesting( | 159 void SetDelegateForTesting( |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 // Returns true if in either hardware or software mirroring mode. | 307 // Returns true if in either hardware or software mirroring mode. |
| 306 bool IsMirroring() const; | 308 bool IsMirroring() const; |
| 307 | 309 |
| 308 // Applies display protections according to requests. | 310 // Applies display protections according to requests. |
| 309 bool ApplyProtections(const ContentProtections& requests); | 311 bool ApplyProtections(const ContentProtections& requests); |
| 310 | 312 |
| 311 StateController* state_controller_; | 313 StateController* state_controller_; |
| 312 SoftwareMirroringController* mirroring_controller_; | 314 SoftwareMirroringController* mirroring_controller_; |
| 313 scoped_ptr<NativeDisplayDelegate> native_display_delegate_; | 315 scoped_ptr<NativeDisplayDelegate> native_display_delegate_; |
| 314 | 316 |
| 317 // True when the display is controlled by an entity outside |
| 318 // of chrome (ie frecon). |
| 319 bool display_externally_controlled_; |
| 320 |
| 315 // Used to enable modes which rely on panel fitting. | 321 // Used to enable modes which rely on panel fitting. |
| 316 bool is_panel_fitting_enabled_; | 322 bool is_panel_fitting_enabled_; |
| 317 | 323 |
| 318 // This is detected by the constructor to determine whether or not we should | 324 // This is detected by the constructor to determine whether or not we should |
| 319 // be enabled. If we aren't running on ChromeOS, we can't assume that the | 325 // be enabled. If we aren't running on ChromeOS, we can't assume that the |
| 320 // Xrandr X11 extension is supported. | 326 // Xrandr X11 extension is supported. |
| 321 // If this flag is set to false, any attempts to change the display | 327 // If this flag is set to false, any attempts to change the display |
| 322 // configuration to immediately fail without changing the state. | 328 // configuration to immediately fail without changing the state. |
| 323 bool configure_display_; | 329 bool configure_display_; |
| 324 | 330 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 349 | 355 |
| 350 // Display protection requests of each client. | 356 // Display protection requests of each client. |
| 351 ProtectionRequests client_protection_requests_; | 357 ProtectionRequests client_protection_requests_; |
| 352 | 358 |
| 353 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurator); | 359 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurator); |
| 354 }; | 360 }; |
| 355 | 361 |
| 356 } // namespace ui | 362 } // namespace ui |
| 357 | 363 |
| 358 #endif // UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ | 364 #endif // UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ |
| OLD | NEW |