OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @typedef {{ | 6 * @typedef {{ |
7 * default_handler: number, | 7 * default_handler: number, |
8 * handlers: Array, | 8 * handlers: Array, |
9 * has_policy_recommendations: boolean, | 9 * has_policy_recommendations: boolean, |
10 * is_default_handler_set_by_user: boolean, | 10 * is_default_handler_set_by_user: boolean, |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 var ignoredHandlersList = $('ignored-handlers-list'); | 69 var ignoredHandlersList = $('ignored-handlers-list'); |
70 options.IgnoredHandlersList.decorate(ignoredHandlersList); | 70 options.IgnoredHandlersList.decorate(ignoredHandlersList); |
71 this.ignoredHandlersList_ = assertInstanceof(ignoredHandlersList, | 71 this.ignoredHandlersList_ = assertInstanceof(ignoredHandlersList, |
72 options.IgnoredHandlersList); | 72 options.IgnoredHandlersList); |
73 this.ignoredHandlersList_.autoExpands = true; | 73 this.ignoredHandlersList_.autoExpands = true; |
74 }, | 74 }, |
75 }; | 75 }; |
76 | 76 |
77 /** | 77 /** |
78 * Sets the list of handlers shown by the view. | 78 * Sets the list of handlers shown by the view. |
79 * @param {Array.<Handlers>} handlers Handlers to be shown in the view. | 79 * @param {Array<Handlers>} handlers Handlers to be shown in the view. |
80 */ | 80 */ |
81 HandlerOptions.setHandlers = function(handlers) { | 81 HandlerOptions.setHandlers = function(handlers) { |
82 $('handlers-list').setHandlers(handlers); | 82 $('handlers-list').setHandlers(handlers); |
83 }; | 83 }; |
84 | 84 |
85 /** | 85 /** |
86 * Sets the list of ignored handlers shown by the view. | 86 * Sets the list of ignored handlers shown by the view. |
87 * @param {Array} handlers Handlers to be shown in the view. | 87 * @param {Array} handlers Handlers to be shown in the view. |
88 */ | 88 */ |
89 HandlerOptions.setIgnoredHandlers = function(handlers) { | 89 HandlerOptions.setIgnoredHandlers = function(handlers) { |
90 $('ignored-handlers-section').hidden = handlers.length == 0; | 90 $('ignored-handlers-section').hidden = handlers.length == 0; |
91 $('ignored-handlers-list').setHandlers(handlers); | 91 $('ignored-handlers-list').setHandlers(handlers); |
92 }; | 92 }; |
93 | 93 |
94 return { | 94 return { |
95 HandlerOptions: HandlerOptions | 95 HandlerOptions: HandlerOptions |
96 }; | 96 }; |
97 }); | 97 }); |
OLD | NEW |