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

Unified Diff: ui/display/chromeos/display_configurator.cc

Issue 697493002: Support transition between chrome and user mode console (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: upload again Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: ui/display/chromeos/display_configurator.cc
diff --git a/ui/display/chromeos/display_configurator.cc b/ui/display/chromeos/display_configurator.cc
index 8d0a24106f6566b4eb493444d67e37ea3246b19d..0143d8a51ae3b33ce2f13bf0ec39bff3bcd6e9de 100644
--- a/ui/display/chromeos/display_configurator.cc
+++ b/ui/display/chromeos/display_configurator.cc
@@ -162,12 +162,14 @@ const DisplayMode* DisplayConfigurator::FindDisplayModeMatchingSize(
DisplayConfigurator::DisplayConfigurator()
: state_controller_(NULL),
mirroring_controller_(NULL),
+ display_externally_controlled_(false),
is_panel_fitting_enabled_(false),
configure_display_(base::SysInfo::IsRunningOnChromeOS()),
display_state_(MULTIPLE_DISPLAY_STATE_INVALID),
requested_power_state_(chromeos::DISPLAY_POWER_ALL_ON),
current_power_state_(chromeos::DISPLAY_POWER_ALL_ON),
- next_display_protection_client_id_(1) {}
+ next_display_protection_client_id_(1) {
+}
DisplayConfigurator::~DisplayConfigurator() {
if (native_display_delegate_)
@@ -201,6 +203,15 @@ void DisplayConfigurator::Init(bool is_panel_fitting_enabled) {
}
}
+void DisplayConfigurator::RelinquishControl() {
+ // Note: This cannot be enabled yet until a subsequent change
+ // in the native_display_delegate to allow it to relinquish
+ // control of the display.
+ //
+ // native_display_delegate_->RelinquishDisplayControl();
Daniel Erat 2014/11/02 13:48:34 please don't check in commented-out code; just rep
dsodman 2014/11/04 05:19:40 Done.
+ // display_externally_controlled_ = true;
+}
+
void DisplayConfigurator::ForceInitialConfigure(
uint32_t background_color_argb) {
if (!configure_display_)
@@ -496,7 +507,8 @@ bool DisplayConfigurator::SetDisplayMode(MultipleDisplayState new_state) {
return false;
VLOG(1) << "SetDisplayMode: state=" << DisplayStateToString(new_state);
- if (display_state_ == new_state) {
+ if ((display_state_ == new_state) &&
+ (display_externally_controlled_ == false)) {
// Cancel software mirroring if the state is moving from
// MULTIPLE_DISPLAY_STATE_DUAL_EXTENDED to
// MULTIPLE_DISPLAY_STATE_DUAL_EXTENDED.
@@ -508,6 +520,7 @@ bool DisplayConfigurator::SetDisplayMode(MultipleDisplayState new_state) {
}
native_display_delegate_->GrabServer();
+ display_externally_controlled_ = false;
UpdateCachedDisplays();
const bool success = EnterStateOrFallBackToSoftwareMirroring(
new_state, requested_power_state_);

Powered by Google App Engine
This is Rietveld 408576698