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

Unified Diff: chrome/browser/ui/webui/options/chromeos/display_options_handler.cc

Issue 1844783002: Only enable mirroring for 2 displays (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pass mirrorEnabled explicitly, cleanup Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/options/chromeos/display_options.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/chromeos/display_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/chromeos/display_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/display_options_handler.cc
index b6d53bebaf300001691bfd319ea097a74ebbb63b..da31e347fb564918816d89e4bcc47346010d5b0a 100644
--- a/chrome/browser/ui/webui/options/chromeos/display_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/display_options_handler.cc
@@ -358,17 +358,20 @@ void DisplayOptionsHandler::SendAllDisplayInfo() {
}
void DisplayOptionsHandler::UpdateDisplaySettingsEnabled() {
+ ash::DisplayManager* display_manager = GetDisplayManager();
bool disable_multi_display_layout =
base::CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kDisableMultiDisplayLayout);
- bool enabled = !(disable_multi_display_layout &&
- GetDisplayManager()->num_connected_displays() > 2);
- bool show_unified_desktop = GetDisplayManager()->unified_desktop_enabled();
+ bool ui_enabled = display_manager->num_connected_displays() <= 2 ||
+ !disable_multi_display_layout;
+ bool unified_enabled = display_manager->unified_desktop_enabled();
+ bool mirrored_enabled = display_manager->num_connected_displays() == 2;
web_ui()->CallJavascriptFunction(
"options.BrowserOptions.enableDisplaySettings",
- base::FundamentalValue(enabled),
- base::FundamentalValue(show_unified_desktop));
+ base::FundamentalValue(ui_enabled),
+ base::FundamentalValue(unified_enabled),
+ base::FundamentalValue(mirrored_enabled));
}
void DisplayOptionsHandler::HandleDisplayInfo(
« no previous file with comments | « chrome/browser/resources/options/chromeos/display_options.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698