Chromium Code Reviews| 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 61f837db0215aa7f67e11e6bf625f7331996784a..8b5743ad9388c011a15b7c42a3d6a5b9b73cea16 100644 |
| --- a/chrome/browser/resources/options/chromeos/display_options.js |
| +++ b/chrome/browser/resources/options/chromeos/display_options.js |
| @@ -2,6 +2,40 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| +/** |
| + * @typedef {{ |
| + * availableColorProfiles: Array.<{profileId: number, name: string}>, |
| + * colorProfile: number, |
| + * height: number, |
| + * id: string, |
| + * isInternal: boolean, |
| + * isPrimary: boolean, |
| + * resolutions: Array.<{width: number, height: number, originalWidth: number, |
| + * originalHeight: number, deviceScaleFactor: number, scale: number, |
| + * refreshRate: number, isBest: boolean, selected: boolean}>, |
| + * name: string, |
| + * orientation: number, |
| + * width: number, |
| + * x: number, |
| + * y: number |
| + * }} |
| + */ |
| +var DisplayInfo; |
| + |
| +cr.exportPath('options'); |
|
Dan Beam
2014/09/11 02:53:09
why not options.{DisplayInfo,SecondaryDisplayLayou
Vitaly Pavlenko
2014/09/11 04:16:25
Done for SecondaryDisplayLayout.
I don't include
Dan Beam
2014/09/11 05:26:12
if the @typedef's never used outside of the namesp
Vitaly Pavlenko
2014/09/11 21:12:30
Done.
|
| + |
| +/** |
| + * Enumeration of secondary display layout. The value has to be same as the |
| + * values in ash/display/display_controller.cc. |
| + * @enum {number} |
| + */ |
| +var SecondaryDisplayLayout = { |
| + TOP: 0, |
| + RIGHT: 1, |
| + BOTTOM: 2, |
| + LEFT: 3 |
| +}; |
| + |
| cr.define('options', function() { |
| var Page = cr.ui.pageManager.Page; |
| var PageManager = cr.ui.pageManager.PageManager; |
| @@ -13,18 +47,6 @@ cr.define('options', function() { |
| /** @const */ var MIN_OFFSET_OVERLAP = 5; |
| /** |
| - * Enumeration of secondary display layout. The value has to be same as the |
| - * values in ash/display/display_controller.cc. |
| - * @enum {number} |
| - */ |
| - var SecondaryDisplayLayout = { |
| - TOP: 0, |
| - RIGHT: 1, |
| - BOTTOM: 2, |
| - LEFT: 3 |
| - }; |
| - |
| - /** |
| * Calculates the bounds of |element| relative to the page. |
| * @param {HTMLElement} element The element to be known. |
| * @return {Object} The object for the bounds, with x, y, width, and height. |
| @@ -102,6 +124,7 @@ cr.define('options', function() { |
| /** |
| * The array of current output displays. It also contains the display |
| * rectangles currently rendered on screen. |
| + * @type {Array.<DisplayInfo>} |
| * @private |
| */ |
| displays_: [], |
| @@ -824,7 +847,8 @@ cr.define('options', function() { |
| /** |
| * Called when the display arrangement has changed. |
| * @param {boolean} mirroring Whether current mode is mirroring or not. |
| - * @param {Array} displays The list of the display information. |
| + * @param {Array.<DisplayInfo>} displays The list of the display |
| + * information. |
| * @param {SecondaryDisplayLayout} layout The layout strategy. |
| * @param {number} offset The offset of the secondary display. |
| * @private |