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 // Called when an external process no longer needs to control the display |
| 149 // and Chrome can take control. |
| 150 void TakeControl(); |
| 151 |
| 152 // Called when an external process needs to control the display and thus |
| 153 // Chrome should relinquish it. |
| 154 void RelinquishControl(); |
| 155 |
148 void set_state_controller(StateController* controller) { | 156 void set_state_controller(StateController* controller) { |
149 state_controller_ = controller; | 157 state_controller_ = controller; |
150 } | 158 } |
151 void set_mirroring_controller(SoftwareMirroringController* controller) { | 159 void set_mirroring_controller(SoftwareMirroringController* controller) { |
152 mirroring_controller_ = controller; | 160 mirroring_controller_ = controller; |
153 } | 161 } |
154 | 162 |
155 // Replaces |native_display_delegate_| with the delegate passed in and sets | 163 // Replaces |native_display_delegate_| with the delegate passed in and sets |
156 // |configure_display_| to true. Should be called before Init(). | 164 // |configure_display_| to true. Should be called before Init(). |
157 void SetDelegateForTesting( | 165 void SetDelegateForTesting( |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 | 357 |
350 // Display protection requests of each client. | 358 // Display protection requests of each client. |
351 ProtectionRequests client_protection_requests_; | 359 ProtectionRequests client_protection_requests_; |
352 | 360 |
353 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurator); | 361 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurator); |
354 }; | 362 }; |
355 | 363 |
356 } // namespace ui | 364 } // namespace ui |
357 | 365 |
358 #endif // UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ | 366 #endif // UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ |
OLD | NEW |