summaryrefslogtreecommitdiff
path: root/chromium/chrome/browser/resources/options/chromeos/display_options.js
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/chrome/browser/resources/options/chromeos/display_options.js')
-rw-r--r--chromium/chrome/browser/resources/options/chromeos/display_options.js15
1 files changed, 10 insertions, 5 deletions
diff --git a/chromium/chrome/browser/resources/options/chromeos/display_options.js b/chromium/chrome/browser/resources/options/chromeos/display_options.js
index bf316214fe8..40e7d4e8035 100644
--- a/chromium/chrome/browser/resources/options/chromeos/display_options.js
+++ b/chromium/chrome/browser/resources/options/chromeos/display_options.js
@@ -127,13 +127,13 @@ cr.define('options', function() {
*/
mirroring_: false,
- /*
+ /**
* Whether the unified desktop is enable or not.
* @private
*/
unifiedDesktopEnabled_: false,
- /*
+ /**
* Whether the unified desktop option should be present.
* @private
*/
@@ -223,7 +223,9 @@ cr.define('options', function() {
chrome.send('setDisplayMode', [display.id, resolution]);
}).bind(this);
$('display-options-orientation-selection').onchange = (function(ev) {
- chrome.send('setOrientation', [this.displays_[this.focusedIndex_].id,
+ var displayIndex =
+ (this.focusedIndex_ === null) ? 0 : this.focusedIndex_;
+ chrome.send('setOrientation', [this.displays_[displayIndex].id,
ev.target.value]);
}).bind(this);
$('display-options-color-profile-selection').onchange = (function(ev) {
@@ -636,8 +638,11 @@ cr.define('options', function() {
$('display-options-set-primary').disabled = true;
$('display-options-toggle-mirroring').disabled = false;
$('selected-display-start-calibrating-overscan').disabled = true;
- $('display-options-orientation-selection').disabled = true;
var display = this.displays_[0];
+ var orientation = $('display-options-orientation-selection');
+ orientation.disabled = false;
+ var orientationOptions = orientation.getElementsByTagName('option');
+ orientationOptions[display.orientation].selected = true;
$('selected-display-name').textContent =
loadTimeData.getString('mirroringDisplay');
var resolution = $('display-options-resolution-selection');
@@ -965,7 +970,7 @@ cr.define('options', function() {
/**
* Called when the display arrangement has changed.
- * @param {options.MultiDisplayMode} multi display mode.
+ * @param {options.MultiDisplayMode} mode multi display mode.
* @param {Array<options.DisplayInfo>} displays The list of the display
* information.
* @param {options.SecondaryDisplayLayout} layout The layout strategy.