| Index: chrome/browser/resources/settings/device_page/display.js
|
| diff --git a/chrome/browser/resources/settings/device_page/display.js b/chrome/browser/resources/settings/device_page/display.js
|
| index befaad8d52efce0f7c391af2065f990388d2be57..42013b9948fa2392a13038fe4431d6f3c46e5e68 100644
|
| --- a/chrome/browser/resources/settings/device_page/display.js
|
| +++ b/chrome/browser/resources/settings/device_page/display.js
|
| @@ -5,8 +5,6 @@
|
| /**
|
| * @fileoverview
|
| * 'settings-display' is the settings subpage for display settings.
|
| - *
|
| - * @group Chrome Settings Elements
|
| */
|
|
|
| cr.define('settings.display', function() {
|
| @@ -32,6 +30,12 @@ Polymer({
|
| displays: Array,
|
|
|
| /**
|
| + * Array of display layouts.
|
| + * @type {!Array<!chrome.system.display.DisplayLayout>}
|
| + */
|
| + layouts: Array,
|
| +
|
| + /**
|
| * String listing the ids in displays. Used to observe changes to the
|
| * display configuration (i.e. when a display is added or removed).
|
| */
|
| @@ -107,6 +111,8 @@ Polymer({
|
| getDisplayInfo_: function() {
|
| settings.display.systemDisplayApi.getInfo(
|
| this.updateDisplayInfo_.bind(this));
|
| + settings.display.systemDisplayApi.getDisplayLayout(
|
| + this.updateDisplayLayout_.bind(this));
|
| },
|
|
|
| /**
|
| @@ -207,11 +213,15 @@ Polymer({
|
| },
|
|
|
| /**
|
| - * @param {!{model: !{index: number}, target: !PaperButtonElement}} e
|
| + * @param {!{detail: number}} e
|
| * @private
|
| */
|
| - onSelectDisplayTap_: function(e) {
|
| - this.selectedDisplay = this.displays[e.model.index];
|
| + onSelectDisplay_: function(e) {
|
| + var index = e.detail;
|
| + assert(index >= 0);
|
| + if (index >= this.displays.length)
|
| + return;
|
| + this.selectedDisplay = this.displays[e.detail];
|
| // Force active in case selected display was clicked.
|
| e.target.active = true;
|
| },
|
| @@ -313,6 +323,14 @@ Polymer({
|
| (this.displays && this.displays[0]);
|
| },
|
|
|
| + /**
|
| + * @param {!Array<!chrome.system.display.DisplayLayout>} layouts
|
| + * @private
|
| + */
|
| + updateDisplayLayout_(layouts) {
|
| + this.layouts = layouts;
|
| + },
|
| +
|
| /** @private */
|
| setPropertiesCallback_: function() {
|
| if (chrome.runtime.lastError) {
|
|
|