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 cr.define('options', function() { | 5 cr.define('options', function() { |
6 /** @const */ var OptionsPage = options.OptionsPage; | 6 /** @const */ var OptionsPage = options.OptionsPage; |
7 | 7 |
8 ///////////////////////////////////////////////////////////////////////////// | 8 ///////////////////////////////////////////////////////////////////////////// |
9 // HandlerOptions class: | 9 // HandlerOptions class: |
10 | 10 |
11 /** | 11 /** |
12 * Encapsulated handling of handler options page. | 12 * Encapsulated handling of handler options page. |
13 * @constructor | 13 * @constructor |
14 */ | 14 */ |
15 function HandlerOptions() { | 15 function HandlerOptions() { |
16 this.activeNavTab = null; | 16 this.activeNavTab = null; |
17 OptionsPage.call(this, | 17 OptionsPage.call(this, |
18 'handlers', | 18 'handlers', |
19 loadTimeData.getString('handlersPageTabTitle'), | 19 loadTimeData.getString('handlersPageTabTitle'), |
20 'handler-options'); | 20 'handler-options'); |
21 } | 21 } |
22 | 22 |
23 cr.addSingletonGetter(HandlerOptions); | 23 cr.addSingletonGetter(HandlerOptions); |
24 | 24 |
25 HandlerOptions.prototype = { | 25 HandlerOptions.prototype = { |
26 __proto__: OptionsPage.prototype, | 26 __proto__: OptionsPage.prototype, |
27 | 27 |
28 /** | 28 /** |
29 * The handlers list. | 29 * The handlers list. |
30 * @type {DeletableItemList} | 30 * @type {options.HandlersList} |
31 * @private | 31 * @private |
32 */ | 32 */ |
33 handlersList_: null, | 33 handlersList_: null, |
34 | 34 |
35 /** @override */ | 35 /** @override */ |
36 initializePage: function() { | 36 initializePage: function() { |
37 OptionsPage.prototype.initializePage.call(this); | 37 OptionsPage.prototype.initializePage.call(this); |
38 | 38 |
39 this.createHandlersList_(); | 39 this.createHandlersList_(); |
40 | 40 |
(...skipping 30 matching lines...) Expand all Loading... |
71 */ | 71 */ |
72 HandlerOptions.setIgnoredHandlers = function(handlers) { | 72 HandlerOptions.setIgnoredHandlers = function(handlers) { |
73 $('ignored-handlers-section').hidden = handlers.length == 0; | 73 $('ignored-handlers-section').hidden = handlers.length == 0; |
74 $('ignored-handlers-list').setHandlers(handlers); | 74 $('ignored-handlers-list').setHandlers(handlers); |
75 }; | 75 }; |
76 | 76 |
77 return { | 77 return { |
78 HandlerOptions: HandlerOptions | 78 HandlerOptions: HandlerOptions |
79 }; | 79 }; |
80 }); | 80 }); |
OLD | NEW |