| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 /** | 5 /** |
| 6 * 'settings-appearance-page' is the settings page containing appearance | 6 * 'settings-appearance-page' is the settings page containing appearance |
| 7 * settings. | 7 * settings. |
| 8 * | 8 * |
| 9 * Example: | 9 * Example: |
| 10 * | 10 * |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 return !!themeId || useSystemTheme; | 182 return !!themeId || useSystemTheme; |
| 183 }, | 183 }, |
| 184 | 184 |
| 185 /** | 185 /** |
| 186 * @param {string} themeId | 186 * @param {string} themeId |
| 187 * @param {boolean} useSystemTheme | 187 * @param {boolean} useSystemTheme |
| 188 * @return {boolean} Whether to show the "USE GTK+" button. | 188 * @return {boolean} Whether to show the "USE GTK+" button. |
| 189 * @private | 189 * @private |
| 190 */ | 190 */ |
| 191 showUseSystem_: function(themeId, useSystemTheme) { | 191 showUseSystem_: function(themeId, useSystemTheme) { |
| 192 return !!themeId || !useSystemTheme; | 192 return (!!themeId || !useSystemTheme) && !this.browserProxy_.isSupervised(); |
| 193 }, |
| 194 |
| 195 /** |
| 196 * @param {string} themeId |
| 197 * @param {boolean} useSystemTheme |
| 198 * @return {boolean} Whether to show the secondary area where "USE CLASSIC" |
| 199 * and "USE GTK+" buttons live. |
| 200 * @private |
| 201 */ |
| 202 showThemesSecondary_: function(themeId, useSystemTheme) { |
| 203 return this.showUseClassic_(themeId, useSystemTheme) || |
| 204 this.showUseSystem_(themeId, useSystemTheme); |
| 193 }, | 205 }, |
| 194 | 206 |
| 195 /** @private */ | 207 /** @private */ |
| 196 onUseSystemTap_: function() { | 208 onUseSystemTap_: function() { |
| 197 this.browserProxy_.useSystemTheme(); | 209 this.browserProxy_.useSystemTheme(); |
| 198 }, | 210 }, |
| 199 </if> | 211 </if> |
| 200 | 212 |
| 201 /** | 213 /** |
| 202 * @param {string} themeId | 214 * @param {string} themeId |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 | 246 |
| 235 /** | 247 /** |
| 236 * @param {boolean} bookmarksBarVisible if bookmarks bar option is visible. | 248 * @param {boolean} bookmarksBarVisible if bookmarks bar option is visible. |
| 237 * @return {string} 'first' if the argument is false or empty otherwise. | 249 * @return {string} 'first' if the argument is false or empty otherwise. |
| 238 * @private | 250 * @private |
| 239 */ | 251 */ |
| 240 getFirst_: function(bookmarksBarVisible) { | 252 getFirst_: function(bookmarksBarVisible) { |
| 241 return !bookmarksBarVisible ? 'first' : ''; | 253 return !bookmarksBarVisible ? 'first' : ''; |
| 242 } | 254 } |
| 243 }); | 255 }); |
| OLD | NEW |