| 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 FocusOutlineManager = cr.ui.FocusOutlineManager; | 6 /** @const */ var FocusOutlineManager = cr.ui.FocusOutlineManager; |
| 7 | 7 |
| 8 var OptionsPage = { | 8 var OptionsPage = { |
| 9 /** | 9 /** |
| 10 * This is the absolute difference maintained between standard and | 10 * This is the absolute difference maintained between standard and |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 */ | 78 */ |
| 79 setPepperFlashSettingsEnabled: function(enabled) { | 79 setPepperFlashSettingsEnabled: function(enabled) { |
| 80 if (enabled) { | 80 if (enabled) { |
| 81 document.documentElement.setAttribute( | 81 document.documentElement.setAttribute( |
| 82 'enablePepperFlashSettings', ''); | 82 'enablePepperFlashSettings', ''); |
| 83 } else { | 83 } else { |
| 84 document.documentElement.removeAttribute( | 84 document.documentElement.removeAttribute( |
| 85 'enablePepperFlashSettings'); | 85 'enablePepperFlashSettings'); |
| 86 } | 86 } |
| 87 }, | 87 }, |
| 88 | |
| 89 /** | |
| 90 * Sets whether Settings is shown as a standalone page in a window for the | |
| 91 * app launcher settings "app". | |
| 92 * @param {boolean} isSettingsApp Whether this page is shown standalone. | |
| 93 */ | |
| 94 setIsSettingsApp: function(isSettingsApp) { | |
| 95 document.documentElement.classList.toggle('settings-app', isSettingsApp); | |
| 96 }, | |
| 97 | |
| 98 /** | |
| 99 * Returns true if Settings is shown as an "app" (in a window by itself) | |
| 100 * for the app launcher settings "app". | |
| 101 * @return {boolean} Whether this page is shown standalone. | |
| 102 */ | |
| 103 isSettingsApp: function() { | |
| 104 return document.documentElement.classList.contains('settings-app'); | |
| 105 }, | |
| 106 }; | 88 }; |
| 107 | 89 |
| 108 // Export | 90 // Export |
| 109 return { | 91 return { |
| 110 OptionsPage: OptionsPage | 92 OptionsPage: OptionsPage |
| 111 }; | 93 }; |
| 112 }); | 94 }); |
| OLD | NEW |