| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 * @fileoverview Settings that affect how Chrome interacts with the underlying | 6 * @fileoverview Settings that affect how Chrome interacts with the underlying |
| 7 * operating system (i.e. network, background processes, hardware). | 7 * operating system (i.e. network, background processes, hardware). |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 Polymer({ | 10 Polymer({ |
| 11 is: 'settings-system-page', | 11 is: 'settings-system-page', |
| 12 | 12 |
| 13 properties: { | 13 properties: { |
| 14 /** @type {settings.SystemPageDelegate} */ | |
| 15 delegate: { | |
| 16 type: Object, | |
| 17 }, | |
| 18 | |
| 19 prefs: { | 14 prefs: { |
| 20 type: Object, | 15 type: Object, |
| 21 notify: true, | 16 notify: true, |
| 22 }, | 17 }, |
| 23 }, | 18 }, |
| 24 | 19 |
| 20 /** |
| 21 * @param {boolean} enabled Whether hardware acceleration is currently |
| 22 * enabled. |
| 23 * @private |
| 24 */ |
| 25 shouldShowRestart_: function(enabled) { |
| 26 var proxy = settings.SystemPageBrowserProxyImpl.getInstance(); |
| 27 return enabled != proxy.wasHardwareAccelerationEnabledAtStartup(); |
| 28 }, |
| 29 |
| 25 /** @private */ | 30 /** @private */ |
| 26 onChangeProxySettingsTap_: function() { | 31 onChangeProxySettingsTap_: function() { |
| 27 this.delegate.changeProxySettings(); | 32 settings.SystemPageBrowserProxyImpl.getInstance().changeProxySettings(); |
| 33 }, |
| 34 |
| 35 /** @private */ |
| 36 onRestartTap_: function() { |
| 37 // TODO(dbeam): we should prompt before restarting the browser. |
| 38 settings.SystemPageBrowserProxyImpl.getInstance().restartBrowser(); |
| 28 }, | 39 }, |
| 29 }); | 40 }); |
| OLD | NEW |