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

Unified Diff: chrome/browser/resources/options/chromeos/display_options.js

Issue 1844783002: Only enable mirroring for 2 displays (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/options/chromeos/display_options.js
diff --git a/chrome/browser/resources/options/chromeos/display_options.js b/chrome/browser/resources/options/chromeos/display_options.js
index ea6573cd9ae4ce6d3902912f8a82cb14bb32364e..cd544c881a4e241528006a0b37320f9d278cd96d 100644
--- a/chrome/browser/resources/options/chromeos/display_options.js
+++ b/chrome/browser/resources/options/chromeos/display_options.js
@@ -481,8 +481,16 @@ cr.define('options', function() {
displayLayout.div.offsetWidth / 2 - arrow.offsetWidth / 2 + 'px';
$('display-options-set-primary').disabled = display.isPrimary;
- $('display-options-select-mirroring').disabled =
- (this.displays_.length <= 1 && !this.unifiedDesktopEnabled_);
+
+ // Mirroring is only supported for 2 displays.
+ var allowMirroring = this.displays_.length == 2;
+ if (this.unifiedDesktopEnabled_) {
+ // In unified desktop mode, there is only one display as far as the
+ // UI is concerned, but we want to allow the user to select mirroring
+ // (which will turn off unified mode).
+ allowMirroring = true;
oshima 2016/03/30 18:51:22 The original code was based on the assumption that
stevenjb 2016/03/30 19:03:30 I don't understand your suggestion. Do you want me
+ }
+ $('display-options-select-mirroring').disabled = !allowMirroring;
$('selected-display-start-calibrating-overscan').disabled =
display.isInternal;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698