| 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 ce93d1feb8ec807d7ce57394308db4a7c977c22c..adc7708ea598f800363a15fd2c0baded90d43888 100644
|
| --- a/chrome/browser/resources/options/chromeos/display_options.js
|
| +++ b/chrome/browser/resources/options/chromeos/display_options.js
|
| @@ -370,9 +370,14 @@ cr.define('options', function() {
|
| assert(!!secondaryId);
|
| var displayLayout =
|
| this.displayLayoutManager_.getDisplayLayout(secondaryId);
|
| + console.log(
|
| + 'setDisplayLayout: ' + displayLayout.layoutType + ' : ' +
|
| + displayLayout.offset);
|
| chrome.send(
|
| 'setDisplayLayout',
|
| [secondaryId, displayLayout.layoutType, displayLayout.offset]);
|
| + // TODO(stevenjb): Remove once we send all layout changes.
|
| + chrome.send('getDisplayInfo');
|
| },
|
|
|
| /**
|
| @@ -660,34 +665,13 @@ cr.define('options', function() {
|
| },
|
|
|
| /**
|
| - * Creates a DisplayLayout object representing the display.
|
| - * @param {!options.DisplayInfo} display
|
| - * @param {!options.DisplayLayoutType} layoutType
|
| - * @param {string} parentId
|
| - * @return {!options.DisplayLayout}
|
| - * @private
|
| - */
|
| - createDisplayLayout_: function(display, layoutType, parentId) {
|
| - return {
|
| - bounds: display.bounds,
|
| - div: null,
|
| - id: display.id,
|
| - layoutType: layoutType,
|
| - name: display.name,
|
| - offset: 0,
|
| - originalPosition: {x: 0, y: 0},
|
| - parentId: parentId
|
| - };
|
| - },
|
| -
|
| - /**
|
| * Layouts the display rectangles according to the current layout_.
|
| * @param {options.DisplayLayoutType} layoutType
|
| * @private
|
| */
|
| layoutDisplays_: function(layoutType) {
|
| // Create the layout manager.
|
| - this.displayLayoutManager_ = new options.DisplayLayoutManager();
|
| + this.displayLayoutManager_ = new options.DisplayLayoutManagerMulti();
|
|
|
| // Create the display layouts. Child displays are parented to the primary.
|
| // TODO(stevenjb): DisplayInfo should provide the parent id for displays.
|
| @@ -702,7 +686,8 @@ cr.define('options', function() {
|
| for (var i = 0; i < this.displays_.length; i++) {
|
| var display = this.displays_[i];
|
| var parentId = display.isPrimary ? '' : primaryDisplayId;
|
| - var layout = this.createDisplayLayout_(display, layoutType, parentId);
|
| + var layout = this.displayLayoutManager_.createDisplayLayout(
|
| + display.id, display.name, display.bounds, layoutType, parentId);
|
| this.displayLayoutManager_.addDisplayLayout(layout);
|
| }
|
|
|
|
|