Commit 716290b0 authored by hshi@google.com's avatar hshi@google.com

Only show start/stop mirroring button when there are multiple displays.

Also, redirect the page to chrome://settings when only one monitor is
connected, so we can stop showing the dialog for now. In the future
we may decide to show the page for some reason.

BUG=169124
TEST=manually on parrot

Review URL: https://codereview.chromium.org/11818043

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176089 0039d316-1c4b-4281-b951-d872f2087c98
parent 4d9a0af9
......@@ -835,6 +835,7 @@ cr.define('options', function() {
$('selected-display-data-container').hidden = true;
$('display-configuration-arrow').hidden = true;
$('display-options-set-primary').hidden = true;
$('display-options-toggle-mirroring').hidden = true;
return;
}
......@@ -873,6 +874,8 @@ cr.define('options', function() {
$('display-options-set-primary').hidden =
this.displays_[this.focusedIndex_].isPrimary;
$('display-options-toggle-mirroring').hidden =
(this.displays_.length <= 1);
},
/**
......@@ -1050,6 +1053,11 @@ cr.define('options', function() {
* @private
*/
onDisplayChanged_: function(mirroring, displays, layout, offset) {
if (displays.length <= 1) {
OptionsPage.showDefaultPage();
return;
}
this.mirroring_ = mirroring;
this.layout_ = layout;
this.offset_ = offset;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment