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

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

Issue 560563004: Compile chrome://settings, part 5 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@H_make_public
Patch Set: fixed assert errors 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/handler_options.js
diff --git a/chrome/browser/resources/options/handler_options.js b/chrome/browser/resources/options/handler_options.js
index df2732ec43e9fdeb0455b718ffc13d0f51becbb0..85978343272a637c00a86cc0cf350966531879f2 100644
--- a/chrome/browser/resources/options/handler_options.js
+++ b/chrome/browser/resources/options/handler_options.js
@@ -2,6 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+/**
+ * @typedef {{
+ * default_handler: number,
+ * handlers: Array,
+ * has_policy_recommendations: boolean,
+ * is_default_handler_set_by_user: boolean,
+ * protocol: string
+ * }}
+ * @see chrome/browser/ui/webui/options/handler_options_handler.cc
+ */
+var Handlers;
+
cr.define('options', function() {
/** @const */ var Page = cr.ui.pageManager.Page;
/** @const */ var PageManager = cr.ui.pageManager.PageManager;
@@ -12,6 +24,7 @@ cr.define('options', function() {
/**
* Encapsulated handling of handler options page.
* @constructor
+ * @extends {cr.ui.pageManager.Page}
*/
function HandlerOptions() {
this.activeNavTab = null;
@@ -48,19 +61,22 @@ cr.define('options', function() {
* @private
*/
createHandlersList_: function() {
- this.handlersList_ = $('handlers-list');
- options.HandlersList.decorate(this.handlersList_);
+ var handlersList = $('handlers-list');
+ options.HandlersList.decorate(handlersList);
+ this.handlersList_ = assertInstanceof(handlersList, options.HandlersList);
this.handlersList_.autoExpands = true;
- this.ignoredHandlersList_ = $('ignored-handlers-list');
- options.IgnoredHandlersList.decorate(this.ignoredHandlersList_);
+ var ignoredHandlersList = $('ignored-handlers-list');
+ options.IgnoredHandlersList.decorate(ignoredHandlersList);
+ this.ignoredHandlersList_ = assertInstanceof(ignoredHandlersList,
+ options.IgnoredHandlersList);
this.ignoredHandlersList_.autoExpands = true;
},
};
/**
* Sets the list of handlers shown by the view.
- * @param {Array} handlers Handlers to be shown in the view.
+ * @param {Array.<Handlers>} handlers Handlers to be shown in the view.
*/
HandlerOptions.setHandlers = function(handlers) {
$('handlers-list').setHandlers(handlers);
« no previous file with comments | « chrome/browser/resources/options/confirm_dialog.js ('k') | chrome/browser/resources/options/handler_options_list.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698