| OLD | NEW |
| 1 // Copyright (c) 2011 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 cr.define('options', function() { | 5 cr.define('options', function() { |
| 6 const OptionsPage = options.OptionsPage; | 6 const OptionsPage = options.OptionsPage; |
| 7 | 7 |
| 8 ///////////////////////////////////////////////////////////////////////////// | 8 ///////////////////////////////////////////////////////////////////////////// |
| 9 // HandlerOptions class: | 9 // HandlerOptions class: |
| 10 | 10 |
| 11 /** | 11 /** |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 this.handlersList_.autoExpands = true; | 49 this.handlersList_.autoExpands = true; |
| 50 | 50 |
| 51 this.ignoredHandlersList_ = $('ignored-handlers-list'); | 51 this.ignoredHandlersList_ = $('ignored-handlers-list'); |
| 52 options.IgnoredHandlersList.decorate(this.ignoredHandlersList_); | 52 options.IgnoredHandlersList.decorate(this.ignoredHandlersList_); |
| 53 this.ignoredHandlersList_.autoExpands = true; | 53 this.ignoredHandlersList_.autoExpands = true; |
| 54 }, | 54 }, |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 /** | 57 /** |
| 58 * Sets the list of handlers shown by the view. | 58 * Sets the list of handlers shown by the view. |
| 59 * @param handlers to be shown in the view. | 59 * @param {Array} Handlers to be shown in the view. |
| 60 */ | 60 */ |
| 61 HandlerOptions.setHandlers = function(handlers) { | 61 HandlerOptions.setHandlers = function(handlers) { |
| 62 $('handlers-list').setHandlers(handlers); | 62 $('handlers-list').setHandlers(handlers); |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 /** | 65 /** |
| 66 * Sets the list of ignored handlers shown by the view. | 66 * Sets the list of ignored handlers shown by the view. |
| 67 * @param handlers to be shown in the view. | 67 * @param {Array} Handlers to be shown in the view. |
| 68 */ | 68 */ |
| 69 HandlerOptions.setIgnoredHandlers = function(handlers) { | 69 HandlerOptions.setIgnoredHandlers = function(handlers) { |
| 70 $('ignored-handlers-section').hidden = handlers.length == 0; | 70 $('ignored-handlers-section').hidden = handlers.length == 0; |
| 71 $('ignored-handlers-list').setHandlers(handlers); | 71 $('ignored-handlers-list').setHandlers(handlers); |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 return { | 74 return { |
| 75 HandlerOptions: HandlerOptions | 75 HandlerOptions: HandlerOptions |
| 76 }; | 76 }; |
| 77 }); | 77 }); |
| OLD | NEW |