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

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

Issue 11818043: Only show start/stop mirroring button when there are multiple displays. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Redirect to chrome settings in single display mode. Created 7 years, 11 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 38afbbf75588f76e82561a0b21bcf88ae12ac795..25a9336dd5d2f41721e065427553d308b1e841ff 100644
--- a/chrome/browser/resources/options/chromeos/display_options.js
+++ b/chrome/browser/resources/options/chromeos/display_options.js
@@ -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();
hshi1 2013/01/10 18:59:24 My bad. This is causing all the chrome://settings/
Jun Mukai 2013/01/10 19:04:37 Oops, I missed that point too :( Sorry for my bad
+ return;
+ }
+
this.mirroring_ = mirroring;
this.layout_ = layout;
this.offset_ = offset;
« 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