| 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. |
| (...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 OptionsPage.setPepperFlashSettingsEnabled = function(enabled) { | 711 OptionsPage.setPepperFlashSettingsEnabled = function(enabled) { |
| 712 if (enabled) { | 712 if (enabled) { |
| 713 document.documentElement.setAttribute( | 713 document.documentElement.setAttribute( |
| 714 'enablePepperFlashSettings', ''); | 714 'enablePepperFlashSettings', ''); |
| 715 } else { | 715 } else { |
| 716 document.documentElement.removeAttribute( | 716 document.documentElement.removeAttribute( |
| 717 'enablePepperFlashSettings'); | 717 'enablePepperFlashSettings'); |
| 718 } | 718 } |
| 719 }; | 719 }; |
| 720 | 720 |
| 721 OptionsPage.setIsSettingsApp = function() { |
| 722 document.documentElement.classList.add('settings-app'); |
| 723 }; |
| 724 |
| 725 OptionsPage.isSettingsApp = function() { |
| 726 return document.documentElement.classList.contains('settings-app'); |
| 727 }; |
| 728 |
| 721 OptionsPage.prototype = { | 729 OptionsPage.prototype = { |
| 722 __proto__: cr.EventTarget.prototype, | 730 __proto__: cr.EventTarget.prototype, |
| 723 | 731 |
| 724 /** | 732 /** |
| 725 * The parent page of this option page, or null for top-level pages. | 733 * The parent page of this option page, or null for top-level pages. |
| 726 * @type {OptionsPage} | 734 * @type {OptionsPage} |
| 727 */ | 735 */ |
| 728 parentPage: null, | 736 parentPage: null, |
| 729 | 737 |
| 730 /** | 738 /** |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 943 canShowPage: function() { | 951 canShowPage: function() { |
| 944 return true; | 952 return true; |
| 945 }, | 953 }, |
| 946 }; | 954 }; |
| 947 | 955 |
| 948 // Export | 956 // Export |
| 949 return { | 957 return { |
| 950 OptionsPage: OptionsPage | 958 OptionsPage: OptionsPage |
| 951 }; | 959 }; |
| 952 }); | 960 }); |
| OLD | NEW |