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

Unified Diff: chrome/browser/resources/options/content_settings.js

Issue 559423003: Compile chrome://settings, part 7. 33 errors left (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@H_options_errors_5
Patch Set: 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/content_settings.js
diff --git a/chrome/browser/resources/options/content_settings.js b/chrome/browser/resources/options/content_settings.js
index 520adc719337095dd0d9b4008135fdf9e73d2641..65af627e1dca915c6f07343e9cc2fee9e4a8ea0a 100644
--- a/chrome/browser/resources/options/content_settings.js
+++ b/chrome/browser/resources/options/content_settings.js
@@ -12,6 +12,7 @@ cr.define('options', function() {
/**
* Encapsulated handling of content settings page.
* @constructor
+ * @extends {cr.ui.pageManager.Page}
*/
function ContentSettings() {
this.activeNavTab = null;
@@ -126,14 +127,16 @@ cr.define('options', function() {
* Updates the labels and indicators for the Media settings. Those require
* special handling because they are backed by multiple prefs and can change
* their scope based on the managed state of the backing prefs.
- * @param {Object} mediaSettings A dictionary containing the following fields:
- * {String} askText The label for the ask radio button.
- * {String} blockText The label for the block radio button.
- * {Boolean} cameraDisabled Whether to disable the camera dropdown.
- * {Boolean} micDisabled Whether to disable the microphone dropdown.
- * {Boolean} showBubble Wether to show the managed icon and bubble for the
- * media label.
- * {String} bubbleText The text to use inside the bubble if it is shown.
+ * @param {{askText: string, blockText: string, cameraDisabled: boolean,
+ * micDisabled: boolean, showBubble: boolean, bubbleText: string}}
+ * mediaSettings A dictionary containing the following fields:
+ * askText The label for the ask radio button.
+ * blockText The label for the block radio button.
+ * cameraDisabled Whether to disable the camera dropdown.
+ * micDisabled Whether to disable the microphone dropdown.
+ * 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) {
$('media-stream-ask-label').innerHTML =
@@ -198,8 +201,12 @@ cr.define('options', function() {
* exceptions list or null.
*/
ContentSettings.getExceptionsList = function(type, mode) {
- return document.querySelector(
+ var exceptionsList = document.querySelector(
'div[contentType=' + type + '] list[mode=' + mode + ']');
+ if (exceptionsList === null)
Dan Beam 2014/09/12 03:32:13 nit: return !exceptionsList ? null : assertIn
Vitaly Pavlenko 2014/09/12 19:21:16 Done.
+ return null;
+ return assertInstanceof(exceptionsList,
+ options.contentSettings.ExceptionsList);
};
/**

Powered by Google App Engine
This is Rietveld 408576698