Commit 7fd4b0ee authored by vitalyp's avatar vitalyp Committed by Commit bot

Compile chrome://settings, part 7. 33 errors left

R=dbeam@chromium.org
BUG=393873
TEST=GYP_GENERATORS=ninja gyp --depth . chrome/browser/resources/options/compiled_resources.gyp && ninja -C out/Default | grep ERROR | wc -l

Review URL: https://codereview.chromium.org/559423003

Cr-Commit-Position: refs/heads/master@{#295637}
parent 7a39ec2c
...@@ -2,6 +2,25 @@ ...@@ -2,6 +2,25 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
cr.exportPath('options');
/**
* @typedef {{actionLinkText: (string|undefined),
* hasError: (boolean|undefined),
* hasUnrecoverableError: (boolean|undefined),
* managed: (boolean|undefined),
* setupCompleted: (boolean|undefined),
* setupInProgress: (boolean|undefined),
* signedIn: (boolean|undefined),
* signinAllowed: (boolean|undefined),
* signinAllowed: boolean,
* signoutAllowed: (boolean|undefined),
* statusText: (string|undefined),
* syncSystemEnabled: (boolean|undefined)}}
* @see chrome/browser/ui/webui/options/browser_options_handler.cc
*/
options.SyncStatus;
cr.define('options', function() { cr.define('options', function() {
var OptionsPage = options.OptionsPage; var OptionsPage = options.OptionsPage;
var Page = cr.ui.pageManager.Page; var Page = cr.ui.pageManager.Page;
...@@ -912,8 +931,8 @@ cr.define('options', function() { ...@@ -912,8 +931,8 @@ cr.define('options', function() {
/** /**
* Updates the sync section with the given state. * Updates the sync section with the given state.
* @param {Object} syncData A bunch of data records that describe the status * @param {options.SyncStatus} syncData A bunch of data records that
* of the sync system. * describe the status of the sync system.
* @private * @private
*/ */
updateSyncState_: function(syncData) { updateSyncState_: function(syncData) {
...@@ -953,7 +972,7 @@ cr.define('options', function() { ...@@ -953,7 +972,7 @@ cr.define('options', function() {
if (this.signedIn_ && !syncData.signedIn && !syncData.setupInProgress) if (this.signedIn_ && !syncData.signedIn && !syncData.setupInProgress)
SyncSetupOverlay.closeOverlay(); SyncSetupOverlay.closeOverlay();
this.signedIn_ = syncData.signedIn; this.signedIn_ = !!syncData.signedIn;
// Display the "advanced settings" button if we're signed in and sync is // Display the "advanced settings" button if we're signed in and sync is
// not managed/disabled. If the user is signed in, but sync is disabled, // not managed/disabled. If the user is signed in, but sync is disabled,
...@@ -976,7 +995,7 @@ cr.define('options', function() { ...@@ -976,7 +995,7 @@ cr.define('options', function() {
// already signed in and signout is not allowed. // already signed in and signout is not allowed.
var signInButton = $('start-stop-sync'); var signInButton = $('start-stop-sync');
signInButton.disabled = syncData.setupInProgress; signInButton.disabled = syncData.setupInProgress;
this.signoutAllowed_ = syncData.signoutAllowed; this.signoutAllowed_ = !!syncData.signoutAllowed;
if (!syncData.signoutAllowed) if (!syncData.signoutAllowed)
$('start-stop-sync-indicator').setAttribute('controlled-by', 'policy'); $('start-stop-sync-indicator').setAttribute('controlled-by', 'policy');
else else
...@@ -1058,7 +1077,7 @@ cr.define('options', function() { ...@@ -1058,7 +1077,7 @@ cr.define('options', function() {
/** /**
* Get the start/stop sync button DOM element. Used for testing. * Get the start/stop sync button DOM element. Used for testing.
* @return {DOMElement} The start/stop sync button. * @return {Element} The start/stop sync button.
* @private * @private
*/ */
getStartStopSyncButton_: function() { getStartStopSyncButton_: function() {
...@@ -1212,11 +1231,11 @@ cr.define('options', function() { ...@@ -1212,11 +1231,11 @@ cr.define('options', function() {
*/ */
updateSearchEngines_: function(engines, defaultValue, defaultManaged) { updateSearchEngines_: function(engines, defaultValue, defaultManaged) {
this.clearSearchEngines_(); this.clearSearchEngines_();
engineSelect = $('default-search-engine'); var engineSelect = $('default-search-engine');
engineSelect.disabled = defaultManaged; engineSelect.disabled = defaultManaged;
if (defaultManaged && defaultValue == -1) if (defaultManaged && defaultValue == -1)
return; return;
engineCount = engines.length; var engineCount = engines.length;
var defaultIndex = -1; var defaultIndex = -1;
for (var i = 0; i < engineCount; i++) { for (var i = 0; i < engineCount; i++) {
var engine = engines[i]; var engine = engines[i];
...@@ -1322,15 +1341,9 @@ cr.define('options', function() { ...@@ -1322,15 +1341,9 @@ cr.define('options', function() {
/** /**
* Adds all |profiles| to the list. * Adds all |profiles| to the list.
* @param {Array.<Object>} profiles An array of profile info objects. * @param {Array.<{name: string, filePath: string,
* each object is of the form: * isCurrentProfile: boolean, isSupervised: boolean}>} profiles An array
* profileInfo = { * of profile info objects.
* name: "Profile Name",
* iconURL: "chrome://path/to/icon/image",
* filePath: "/path/to/profile/data/on/disk",
* isCurrentProfile: false,
* isSupervised: false
* };
* @private * @private
*/ */
setProfilesInfo_: function(profiles) { setProfilesInfo_: function(profiles) {
......
...@@ -11,7 +11,7 @@ cr.define('options.browser_options', function() { ...@@ -11,7 +11,7 @@ cr.define('options.browser_options', function() {
* Creates a new startup page list item. * Creates a new startup page list item.
* @param {Object} pageInfo The page this item represents. * @param {Object} pageInfo The page this item represents.
* @constructor * @constructor
* @extends {cr.ui.ListItem} * @extends {options.InlineEditableItem}
*/ */
function StartupPageListItem(pageInfo) { function StartupPageListItem(pageInfo) {
var el = cr.doc.createElement('div'); var el = cr.doc.createElement('div');
...@@ -68,7 +68,7 @@ cr.define('options.browser_options', function() { ...@@ -68,7 +68,7 @@ cr.define('options.browser_options', function() {
urlEl.classList.add('weakrtl'); urlEl.classList.add('weakrtl');
this.contentElement.appendChild(urlEl); this.contentElement.appendChild(urlEl);
var urlField = urlEl.querySelector('input'); var urlField = /** @type {HTMLElement} */(urlEl.querySelector('input'));
urlField.className = 'weakrtl'; urlField.className = 'weakrtl';
urlField.placeholder = loadTimeData.getString('startupPagesPlaceholder'); urlField.placeholder = loadTimeData.getString('startupPagesPlaceholder');
this.urlField_ = urlField; this.urlField_ = urlField;
......
...@@ -25,6 +25,7 @@ cr.define('options', function() { ...@@ -25,6 +25,7 @@ cr.define('options', function() {
/** /**
* Encapsulated handling of content settings page. * Encapsulated handling of content settings page.
* @constructor * @constructor
* @extends {cr.ui.pageManager.Page}
*/ */
function ContentSettings() { function ContentSettings() {
this.activeNavTab = null; this.activeNavTab = null;
...@@ -162,14 +163,16 @@ cr.define('options', function() { ...@@ -162,14 +163,16 @@ cr.define('options', function() {
* Updates the labels and indicators for the Media settings. Those require * Updates the labels and indicators for the Media settings. Those require
* special handling because they are backed by multiple prefs and can change * special handling because they are backed by multiple prefs and can change
* their scope based on the managed state of the backing prefs. * their scope based on the managed state of the backing prefs.
* @param {Object} mediaSettings A dictionary containing the following fields: * @param {{askText: string, blockText: string, cameraDisabled: boolean,
* {String} askText The label for the ask radio button. * micDisabled: boolean, showBubble: boolean, bubbleText: string}}
* {String} blockText The label for the block radio button. * mediaSettings A dictionary containing the following fields:
* {Boolean} cameraDisabled Whether to disable the camera dropdown. * askText The label for the ask radio button.
* {Boolean} micDisabled Whether to disable the microphone dropdown. * blockText The label for the block radio button.
* {Boolean} showBubble Wether to show the managed icon and bubble for the * cameraDisabled Whether to disable the camera dropdown.
* media label. * micDisabled Whether to disable the microphone dropdown.
* {String} bubbleText The text to use inside the bubble if it is shown. * showBubble Wether to show the managed icon and bubble for the media
* label.
* bubbleText The text to use inside the bubble if it is shown.
*/ */
ContentSettings.updateMediaUI = function(mediaSettings) { ContentSettings.updateMediaUI = function(mediaSettings) {
$('media-stream-ask-label').innerHTML = $('media-stream-ask-label').innerHTML =
...@@ -234,8 +237,11 @@ cr.define('options', function() { ...@@ -234,8 +237,11 @@ cr.define('options', function() {
* exceptions list or null. * exceptions list or null.
*/ */
ContentSettings.getExceptionsList = function(type, mode) { ContentSettings.getExceptionsList = function(type, mode) {
return document.querySelector( var exceptionsList = document.querySelector(
'div[contentType=' + type + '] list[mode=' + mode + ']'); 'div[contentType=' + type + '] list[mode=' + mode + ']');
return !exceptionsList ? null :
assertInstanceof(exceptionsList,
options.contentSettings.ExceptionsList);
}; };
/** /**
......
...@@ -454,7 +454,7 @@ cr.define('options.contentSettings', function() { ...@@ -454,7 +454,7 @@ cr.define('options.contentSettings', function() {
* Creates a new exceptions list. * Creates a new exceptions list.
* *
* @constructor * @constructor
* @extends {cr.ui.List} * @extends {options.InlineEditableItemList}
*/ */
var ExceptionsList = cr.ui.define('list'); var ExceptionsList = cr.ui.define('list');
......
...@@ -66,7 +66,7 @@ cr.define('options', function() { ...@@ -66,7 +66,7 @@ cr.define('options', function() {
* into the given list using its @{code splice} method at the given index. * into the given list using its @{code splice} method at the given index.
* @param {Array.<Object>} data The data objects for the nodes to add. * @param {Array.<Object>} data The data objects for the nodes to add.
* @param {number} start The index at which to start inserting the nodes. * @param {number} start The index at which to start inserting the nodes.
* @return {Array.<CookieTreeNode>} An array of CookieTreeNodes added. * @return {Array.<options.CookieTreeNode>} An array of CookieTreeNodes added.
*/ */
function spliceTreeNodes(data, start, list) { function spliceTreeNodes(data, start, list) {
var nodes = data.map(function(x) { return new CookieTreeNode(x); }); var nodes = data.map(function(x) { return new CookieTreeNode(x); });
...@@ -109,7 +109,7 @@ cr.define('options', function() { ...@@ -109,7 +109,7 @@ cr.define('options', function() {
* @extends {options.DeletableItem} * @extends {options.DeletableItem}
*/ */
function CookieListItem(origin, list) { function CookieListItem(origin, list) {
var listItem = new DeletableItem(null); var listItem = new DeletableItem();
listItem.__proto__ = CookieListItem.prototype; listItem.__proto__ = CookieListItem.prototype;
listItem.origin = origin; listItem.origin = origin;
...@@ -315,7 +315,7 @@ cr.define('options', function() { ...@@ -315,7 +315,7 @@ cr.define('options', function() {
/** /**
* Append a new cookie node "bubble" to this list item. * Append a new cookie node "bubble" to this list item.
* @param {CookieTreeNode} node The cookie node to add a bubble for. * @param {options.CookieTreeNode} node The cookie node to add a bubble for.
* @param {Element} div The DOM element for the bubble itself. * @param {Element} div The DOM element for the bubble itself.
* @return {number} The index the bubble was added at. * @return {number} The index the bubble was added at.
*/ */
...@@ -508,7 +508,8 @@ cr.define('options', function() { ...@@ -508,7 +508,8 @@ cr.define('options', function() {
/** /**
* Create the cookie "bubbles" for this node, recursing into children * Create the cookie "bubbles" for this node, recursing into children
* if there are any. Append the cookie bubbles to @{code item}. * if there are any. Append the cookie bubbles to @{code item}.
* @param {CookieListItem} item The cookie list item to create items in. * @param {options.CookieListItem} item The cookie list item to create items
* in.
*/ */
createItems: function(item) { createItems: function(item) {
if (this.children.length > 0) { if (this.children.length > 0) {
...@@ -581,7 +582,7 @@ cr.define('options', function() { ...@@ -581,7 +582,7 @@ cr.define('options', function() {
/** /**
* The parent of this cookie tree node. * The parent of this cookie tree node.
* @type {?CookieTreeNode|CookieListItem} * @type {?(options.CookieTreeNode|options.CookieListItem)}
*/ */
get parent() { get parent() {
// See below for an explanation of this special case. // See below for an explanation of this special case.
...@@ -796,12 +797,15 @@ cr.define('options', function() { ...@@ -796,12 +797,15 @@ cr.define('options', function() {
/** /**
* The currently expanded item. Used by CookieListItem above. * The currently expanded item. Used by CookieListItem above.
* @type {?CookieListItem} * @type {?options.CookieListItem}
*/ */
expandedItem: null, expandedItem: null,
// from cr.ui.List // from cr.ui.List
/** @override */ /**
* @override
* @param {Object} data
*/
createItem: function(data) { createItem: function(data) {
// We use the cached expanded item in order to allow it to maintain some // We use the cached expanded item in order to allow it to maintain some
// state (like its fixed height, and which bubble is selected). // state (like its fixed height, and which bubble is selected).
...@@ -923,6 +927,8 @@ cr.define('options', function() { ...@@ -923,6 +927,8 @@ cr.define('options', function() {
}; };
return { return {
CookiesList: CookiesList CookiesList: CookiesList,
CookieListItem: CookieListItem,
CookieTreeNode: CookieTreeNode,
}; };
}); });
...@@ -34,7 +34,7 @@ cr.define('options', function() { ...@@ -34,7 +34,7 @@ cr.define('options', function() {
__proto__: Page.prototype, __proto__: Page.prototype,
/** Current UI state */ /** Current UI state */
uiState_: UIState.UNKNKOWN, uiState_: UIState.UNKNOWN,
get uiState() { get uiState() {
return this.uiState_; return this.uiState_;
}, },
......
...@@ -58,6 +58,10 @@ cr.define('options', function() { ...@@ -58,6 +58,10 @@ cr.define('options', function() {
IgnoredHandlersList.prototype = { IgnoredHandlersList.prototype = {
__proto__: DeletableItemList.prototype, __proto__: DeletableItemList.prototype,
/**
* @override
* @param {Object} entry
*/
createItem: function(entry) { createItem: function(entry) {
return new IgnoredHandlersListItem(entry); return new IgnoredHandlersListItem(entry);
}, },
...@@ -78,7 +82,7 @@ cr.define('options', function() { ...@@ -78,7 +82,7 @@ cr.define('options', function() {
* IgnoredHandlersListItem for an example of the format the list should * IgnoredHandlersListItem for an example of the format the list should
* take. * take.
* *
* @param {Object} list A list of ignored protocol handlers. * @param {!Array} list A list of ignored protocol handlers.
*/ */
setHandlers: function(list) { setHandlers: function(list) {
this.dataModel = new ArrayDataModel(list); this.dataModel = new ArrayDataModel(list);
......
...@@ -49,8 +49,9 @@ cr.define('options', function() { ...@@ -49,8 +49,9 @@ cr.define('options', function() {
initializePage: function() { initializePage: function() {
Page.prototype.initializePage.call(this); Page.prototype.initializePage.call(this);
this.wordList_ = $('language-dictionary-overlay-word-list'); var wordList = $('language-dictionary-overlay-word-list');
DictionaryWordsList.decorate(this.wordList_); DictionaryWordsList.decorate(wordList);
this.wordList_ = assertInstanceof(wordList, DictionaryWordsList);
this.wordList_.onWordListChanged = function() { this.wordList_.onWordListChanged = function() {
this.onWordListChanged_(); this.onWordListChanged_();
}.bind(this); }.bind(this);
......
...@@ -77,7 +77,7 @@ cr.define('options.dictionary_words', function() { ...@@ -77,7 +77,7 @@ cr.define('options.dictionary_words', function() {
/** /**
* A list of words in the dictionary. * A list of words in the dictionary.
* @constructor * @constructor
* @extends {cr.ui.InlineEditableItemList} * @extends {options.InlineEditableItemList}
*/ */
var DictionaryWordsList = cr.ui.define('list'); var DictionaryWordsList = cr.ui.define('list');
...@@ -86,7 +86,7 @@ cr.define('options.dictionary_words', function() { ...@@ -86,7 +86,7 @@ cr.define('options.dictionary_words', function() {
/** /**
* The function to notify that the word list has changed. * The function to notify that the word list has changed.
* @type {function()} * @type {?Function}
*/ */
onWordListChanged: null, onWordListChanged: null,
...@@ -204,7 +204,10 @@ cr.define('options.dictionary_words', function() { ...@@ -204,7 +204,10 @@ cr.define('options.dictionary_words', function() {
return this.dataModel.length < 2; return this.dataModel.length < 2;
}, },
/** @override */ /**
* @override
* @param {string} dictionaryWord
*/
createItem: function(dictionaryWord) { createItem: function(dictionaryWord) {
return new DictionaryWordsListItem( return new DictionaryWordsListItem(
dictionaryWord, dictionaryWord,
......
...@@ -14,7 +14,7 @@ cr.define('options', function() { ...@@ -14,7 +14,7 @@ cr.define('options', function() {
* Creates a new Language list item. * Creates a new Language list item.
* @param {Object} languageInfo The information of the language. * @param {Object} languageInfo The information of the language.
* @constructor * @constructor
* @extends {options.DeletableItem.ListItem} * @extends {options.DeletableItem}
*/ */
function LanguageListItem(languageInfo) { function LanguageListItem(languageInfo) {
var el = cr.doc.createElement('li'); var el = cr.doc.createElement('li');
...@@ -29,7 +29,7 @@ cr.define('options', function() { ...@@ -29,7 +29,7 @@ cr.define('options', function() {
/** /**
* The language code of this language. * The language code of this language.
* @type {string} * @type {?string}
* @private * @private
*/ */
languageCode_: null, languageCode_: null,
...@@ -56,7 +56,7 @@ cr.define('options', function() { ...@@ -56,7 +56,7 @@ cr.define('options', function() {
* Creates a new language list. * Creates a new language list.
* @param {Object=} opt_propertyBag Optional properties. * @param {Object=} opt_propertyBag Optional properties.
* @constructor * @constructor
* @extends {cr.ui.List} * @extends {options.DeletableItemList}
*/ */
var LanguageList = cr.ui.define('list'); var LanguageList = cr.ui.define('list');
...@@ -132,8 +132,13 @@ cr.define('options', function() { ...@@ -132,8 +132,13 @@ cr.define('options', function() {
this.addEventListener('dragleave', this.handleDragLeave_.bind(this)); this.addEventListener('dragleave', this.handleDragLeave_.bind(this));
}, },
/**
* @override
* @param {string} languageCode
*/
createItem: function(languageCode) { createItem: function(languageCode) {
languageInfo = LanguageList.getLanguageInfoFromLanguageCode(languageCode); var languageInfo =
LanguageList.getLanguageInfoFromLanguageCode(languageCode);
return new LanguageListItem(languageInfo); return new LanguageListItem(languageInfo);
}, },
...@@ -379,7 +384,7 @@ cr.define('options', function() { ...@@ -379,7 +384,7 @@ cr.define('options', function() {
/** /**
* Loads given language list. * Loads given language list.
* @param {Array} languageCodes List of language codes. * @param {!Array} languageCodes List of language codes.
* @private * @private
*/ */
load_: function(languageCodes) { load_: function(languageCodes) {
......
...@@ -335,8 +335,7 @@ cr.define('options', function() { ...@@ -335,8 +335,7 @@ cr.define('options', function() {
button.inputMethodId = inputMethod.id; button.inputMethodId = inputMethod.id;
button.onclick = function(inputMethodId, e) { button.onclick = function(inputMethodId, e) {
chrome.send('inputMethodOptionsOpen', [inputMethodId]); chrome.send('inputMethodOptionsOpen', [inputMethodId]);
}; }.bind(this, inputMethod.id);
button.onclick = button.onclick.bind(this, inputMethod.id);
element.appendChild(button); element.appendChild(button);
} }
...@@ -753,10 +752,9 @@ cr.define('options', function() { ...@@ -753,10 +752,9 @@ cr.define('options', function() {
/** /**
* Updates the language list in the add language overlay. * Updates the language list in the add language overlay.
* @param {string} languageCode Language code (ex. "fr").
* @private * @private
*/ */
updateLanguageListInAddLanguageOverlay_: function(languageCode) { updateLanguageListInAddLanguageOverlay_: function() {
// Change the visibility of the language list in the add language // Change the visibility of the language list in the add language
// overlay. Languages that are already active will become invisible, // overlay. Languages that are already active will become invisible,
// so that users don't add the same language twice. // so that users don't add the same language twice.
...@@ -830,7 +828,7 @@ cr.define('options', function() { ...@@ -830,7 +828,7 @@ cr.define('options', function() {
* @private * @private
*/ */
handleCheckboxClick_: function(e) { handleCheckboxClick_: function(e) {
var checkbox = e.target; var checkbox = assertInstanceof(e.target, Element);
// Third party IMEs require additional confirmation prior to enabling due // Third party IMEs require additional confirmation prior to enabling due
// to privacy risk. // to privacy risk.
...@@ -917,7 +915,7 @@ cr.define('options', function() { ...@@ -917,7 +915,7 @@ cr.define('options', function() {
updateEnableSpellCheck_: function(e) { updateEnableSpellCheck_: function(e) {
var value = !$('enable-spell-check').checked; var value = !$('enable-spell-check').checked;
$('language-options-spell-check-language-button').disabled = value; $('language-options-spell-check-language-button').disabled = value;
if (!cr.IsMac) if (!cr.isMac)
$('edit-dictionary-button').hidden = value; $('edit-dictionary-button').hidden = value;
}, },
...@@ -1171,10 +1169,17 @@ cr.define('options', function() { ...@@ -1171,10 +1169,17 @@ cr.define('options', function() {
// If this will go as final UI, refactor this to share the component with // If this will go as final UI, refactor this to share the component with
// new new tab page. // new new tab page.
/** /**
* Shows notification
* @private * @private
*/ */
notificationTimeout_: null, notificationTimeout_: null,
/**
* Shows notification.
* @param {string} text
* @param {string} actionText
* @param {number=} opt_delay
* @private
*/
showNotification_: function(text, actionText, opt_delay) { showNotification_: function(text, actionText, opt_delay) {
var notificationElement = $('notification'); var notificationElement = $('notification');
var actionLink = notificationElement.querySelector('.link-color'); var actionLink = notificationElement.querySelector('.link-color');
......
...@@ -211,7 +211,7 @@ cr.define('options', function() { ...@@ -211,7 +211,7 @@ cr.define('options', function() {
* the user will use to choose their profile icon. * the user will use to choose their profile icon.
* @param {string} mode A label that specifies the type of dialog box which * @param {string} mode A label that specifies the type of dialog box which
* is currently being viewed (i.e. 'create' or 'manage'). * is currently being viewed (i.e. 'create' or 'manage').
* @param {Array.<string>} iconURLs An array of icon URLs. * @param {!Array.<string>} iconURLs An array of icon URLs.
* @param {Array.<string>} names An array of default names * @param {Array.<string>} names An array of default names
* corresponding to the icons. * corresponding to the icons.
* @private * @private
...@@ -461,6 +461,9 @@ cr.define('options', function() { ...@@ -461,6 +461,9 @@ cr.define('options', function() {
options.SupervisedUserListData.resetPromise(); options.SupervisedUserListData.resetPromise();
}, },
/** @private */
updateSignedInStatus_: assertNotReached,
/** /**
* Called when the user clicks "OK" or hits enter. Creates the profile * Called when the user clicks "OK" or hits enter. Creates the profile
* using the information in the dialog. * using the information in the dialog.
......
...@@ -63,7 +63,10 @@ cr.define('options', function() { ...@@ -63,7 +63,10 @@ cr.define('options', function() {
OriginList.prototype = { OriginList.prototype = {
__proto__: List.prototype, __proto__: List.prototype,
/** @override */ /**
* @override
* @param {!Object} entry
*/
createItem: function(entry) { createItem: function(entry) {
return new OriginListItem(entry); return new OriginListItem(entry);
}, },
......
...@@ -88,8 +88,10 @@ cr.define('options', function() { ...@@ -88,8 +88,10 @@ cr.define('options', function() {
* @private * @private
*/ */
createSavedPasswordsList_: function() { createSavedPasswordsList_: function() {
this.savedPasswordsList_ = $('saved-passwords-list'); var savedPasswordsList = $('saved-passwords-list');
options.passwordManager.PasswordsList.decorate(this.savedPasswordsList_); options.passwordManager.PasswordsList.decorate(savedPasswordsList);
this.savedPasswordsList_ = assertInstanceof(savedPasswordsList,
options.DeletableItemList);
this.savedPasswordsList_.autoExpands = true; this.savedPasswordsList_.autoExpands = true;
}, },
...@@ -98,9 +100,11 @@ cr.define('options', function() { ...@@ -98,9 +100,11 @@ cr.define('options', function() {
* @private * @private
*/ */
createPasswordExceptionsList_: function() { createPasswordExceptionsList_: function() {
this.passwordExceptionsList_ = $('password-exceptions-list'); var passwordExceptionsList = $('password-exceptions-list');
options.passwordManager.PasswordExceptionsList.decorate( options.passwordManager.PasswordExceptionsList.decorate(
this.passwordExceptionsList_); passwordExceptionsList);
this.passwordExceptionsList_ = assertInstanceof(passwordExceptionsList,
options.DeletableItemList);
this.passwordExceptionsList_.autoExpands = true; this.passwordExceptionsList_.autoExpands = true;
}, },
...@@ -151,7 +155,7 @@ cr.define('options', function() { ...@@ -151,7 +155,7 @@ cr.define('options', function() {
/** /**
* Updates the data model for the saved passwords list with the values from * Updates the data model for the saved passwords list with the values from
* |entries|. * |entries|.
* @param {Array} entries The list of saved password data. * @param {!Array} entries The list of saved password data.
*/ */
setSavedPasswordsList_: function(entries) { setSavedPasswordsList_: function(entries) {
if (this.lastQuery_) { if (this.lastQuery_) {
......
...@@ -231,6 +231,7 @@ cr.define('options', function() { ...@@ -231,6 +231,7 @@ cr.define('options', function() {
// Forward public APIs to private implementations. // Forward public APIs to private implementations.
cr.makePublic(SupervisedUserImportOverlay, [ cr.makePublic(SupervisedUserImportOverlay, [
'onError',
'onSuccess', 'onSuccess',
]); ]);
......
...@@ -50,7 +50,7 @@ cr.define('options.ContentSettings', function() { ...@@ -50,7 +50,7 @@ cr.define('options.ContentSettings', function() {
/** /**
* The saved blocked origins list. * The saved blocked origins list.
* @type {OriginList} * @type {options.OriginList}
* @private * @private
*/ */
blockedList_: null, blockedList_: null,
...@@ -116,7 +116,7 @@ cr.define('options.ContentSettings', function() { ...@@ -116,7 +116,7 @@ cr.define('options.ContentSettings', function() {
/** /**
* Populate an origin list with all of the origins with a given permission * Populate an origin list with all of the origins with a given permission
* or that are using a given resource. * or that are using a given resource.
* @param {OriginList} originList A list to populate. * @param {options.OriginList} originList A list to populate.
* @param {!Object} originDict A dictionary of origins to their usage, which * @param {!Object} originDict A dictionary of origins to their usage, which
will be used to sort the origins. will be used to sort the origins.
* @private * @private
......
...@@ -1367,6 +1367,9 @@ void BrowserOptionsHandler::OnWallpaperManagedChanged(bool managed) { ...@@ -1367,6 +1367,9 @@ void BrowserOptionsHandler::OnWallpaperManagedChanged(bool managed) {
scoped_ptr<base::DictionaryValue> scoped_ptr<base::DictionaryValue>
BrowserOptionsHandler::GetSyncStateDictionary() { BrowserOptionsHandler::GetSyncStateDictionary() {
// The items which are to be written into |sync_status| are also described in
// chrome/browser/resources/options/browser_options.js in @typedef
// for SyncStatus. Please update it whenever you add or remove any keys here.
scoped_ptr<base::DictionaryValue> sync_status(new base::DictionaryValue); scoped_ptr<base::DictionaryValue> sync_status(new base::DictionaryValue);
Profile* profile = Profile::FromWebUI(web_ui()); Profile* profile = Profile::FromWebUI(web_ui());
if (profile->IsGuestSession()) { if (profile->IsGuestSession()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment