Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: ui/display/chromeos/display_configurator.h

Issue 652073002: chromeos: Don't apply stale display power state after resume (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add a test Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ui/display/chromeos/display_configurator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 // |internal_display| instead of only searching for a matching mode (note that 260 // |internal_display| instead of only searching for a matching mode (note that
261 // it may lead to a crash if |internal_info| is not capable of panel fitting). 261 // it may lead to a crash if |internal_info| is not capable of panel fitting).
262 // 262 //
263 // |preserve_aspect| limits the search/creation only to the modes having the 263 // |preserve_aspect| limits the search/creation only to the modes having the
264 // native aspect ratio of |external_display|. 264 // native aspect ratio of |external_display|.
265 bool FindMirrorMode(DisplayState* internal_display, 265 bool FindMirrorMode(DisplayState* internal_display,
266 DisplayState* external_display, 266 DisplayState* external_display,
267 bool try_panel_fitting, 267 bool try_panel_fitting,
268 bool preserve_aspect); 268 bool preserve_aspect);
269 269
270 // Configures displays. 270 // Configures displays. Invoked by |configure_timer_|.
271 void ConfigureDisplays(); 271 void ConfigureDisplays();
272 272
273 // Restores |requested_power_state_| after the system has resumed,
274 // additionally forcing a probe. Invoked by |configure_timer_|.
275 void RestoreRequestedPowerStateAfterResume();
276
273 // Notifies observers about an attempted state change. 277 // Notifies observers about an attempted state change.
274 void NotifyObservers(bool success, MultipleDisplayState attempted_state); 278 void NotifyObservers(bool success, MultipleDisplayState attempted_state);
275 279
276 // Switches to the state specified in |display_state| and |power_state|. 280 // Switches to the state specified in |display_state| and |power_state|.
277 // If the hardware mirroring failed and |mirroring_controller_| is set, 281 // If the hardware mirroring failed and |mirroring_controller_| is set,
278 // it switches to |STATE_DUAL_EXTENDED| and calls |SetSoftwareMirroring()| 282 // it switches to |STATE_DUAL_EXTENDED| and calls |SetSoftwareMirroring()|
279 // to enable software based mirroring. 283 // to enable software based mirroring.
280 // On success, updates |display_state_|, |power_state_|, and 284 // On success, updates |display_state_|, |power_state_|, and
281 // |cached_displays_| and returns true. 285 // |cached_displays_| and returns true.
282 bool EnterStateOrFallBackToSoftwareMirroring( 286 bool EnterStateOrFallBackToSoftwareMirroring(
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 349
346 // Display protection requests of each client. 350 // Display protection requests of each client.
347 ProtectionRequests client_protection_requests_; 351 ProtectionRequests client_protection_requests_;
348 352
349 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurator); 353 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurator);
350 }; 354 };
351 355
352 } // namespace ui 356 } // namespace ui
353 357
354 #endif // UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ 358 #endif // UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_
OLDNEW
« no previous file with comments | « no previous file | ui/display/chromeos/display_configurator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698