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 ///////////////////////////////////////////////////////////////////////////// | 6 ///////////////////////////////////////////////////////////////////////////// |
7 // OptionsPage class: | 7 // OptionsPage class: |
8 | 8 |
9 /** | 9 /** |
10 * Base class for options page. | 10 * Base class for options page. |
11 * @constructor | 11 * @constructor |
12 * @param {string} name Options page name, also defines id of the div element | 12 * @param {string} name Options page name. |
13 * containing the options view and the name of options page navigation bar | |
14 * item as name+'PageNav'. | |
15 * @param {string} title Options page title, used for navigation bar | 13 * @param {string} title Options page title, used for navigation bar |
16 * @extends {EventTarget} | 14 * @extends {EventTarget} |
17 */ | 15 */ |
18 function OptionsPage(name, title, pageDivName) { | 16 function OptionsPage(name, title, pageDivName) { |
19 this.name = name; | 17 this.name = name; |
20 this.title = title; | 18 this.title = title; |
21 this.pageDivName = pageDivName; | 19 this.pageDivName = pageDivName; |
22 this.pageDiv = $(this.pageDivName); | 20 this.pageDiv = $(this.pageDivName); |
23 this.tab = null; | 21 this.tab = null; |
24 } | 22 } |
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1103 canShowPage: function() { | 1101 canShowPage: function() { |
1104 return true; | 1102 return true; |
1105 }, | 1103 }, |
1106 }; | 1104 }; |
1107 | 1105 |
1108 // Export | 1106 // Export |
1109 return { | 1107 return { |
1110 OptionsPage: OptionsPage | 1108 OptionsPage: OptionsPage |
1111 }; | 1109 }; |
1112 }); | 1110 }); |
OLD | NEW |