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

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

Issue 553573003: Compile chrome://settings, part 3: 167 proper errors left (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@G_options_errors_1
Patch Set: mark narrow type in createItem JSDoc Created 6 years, 3 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
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

Powered by Google App Engine
This is Rietveld 408576698