| 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 /** @fileoverview Handles interprocess communcation for the system page. */ | 5 /** @fileoverview Handles interprocess communcation for the system page. */ |
| 6 | 6 |
| 7 cr.define('settings', function() { | 7 cr.define('settings', function() { |
| 8 /** @interface */ | 8 /** @interface */ |
| 9 function SystemPageBrowserProxy() {} | 9 class SystemPageBrowserProxy { |
| 10 | |
| 11 SystemPageBrowserProxy.prototype = { | |
| 12 /** Shows the native system proxy settings. */ | 10 /** Shows the native system proxy settings. */ |
| 13 showProxySettings: function() {}, | 11 showProxySettings() {} |
| 14 | 12 |
| 15 /** | 13 /** |
| 16 * @return {boolean} Whether hardware acceleration was enabled when the user | 14 * @return {boolean} Whether hardware acceleration was enabled when the user |
| 17 * started Chrome. | 15 * started Chrome. |
| 18 */ | 16 */ |
| 19 wasHardwareAccelerationEnabledAtStartup: function() {}, | 17 wasHardwareAccelerationEnabledAtStartup() {} |
| 20 }; | 18 } |
| 21 | 19 |
| 22 /** | 20 /** |
| 23 * @constructor | |
| 24 * @implements {settings.SystemPageBrowserProxy} | 21 * @implements {settings.SystemPageBrowserProxy} |
| 25 */ | 22 */ |
| 26 function SystemPageBrowserProxyImpl() {} | 23 class SystemPageBrowserProxyImpl { |
| 24 /** @override */ |
| 25 showProxySettings() { |
| 26 chrome.send('showProxySettings'); |
| 27 } |
| 28 |
| 29 /** @override */ |
| 30 wasHardwareAccelerationEnabledAtStartup() { |
| 31 return loadTimeData.getBoolean('hardwareAccelerationEnabledAtStartup'); |
| 32 } |
| 33 } |
| 27 | 34 |
| 28 cr.addSingletonGetter(SystemPageBrowserProxyImpl); | 35 cr.addSingletonGetter(SystemPageBrowserProxyImpl); |
| 29 | 36 |
| 30 SystemPageBrowserProxyImpl.prototype = { | |
| 31 /** @override */ | |
| 32 showProxySettings: function() { | |
| 33 chrome.send('showProxySettings'); | |
| 34 }, | |
| 35 | |
| 36 /** @override */ | |
| 37 wasHardwareAccelerationEnabledAtStartup: function() { | |
| 38 return loadTimeData.getBoolean('hardwareAccelerationEnabledAtStartup'); | |
| 39 }, | |
| 40 }; | |
| 41 | |
| 42 return { | 37 return { |
| 43 SystemPageBrowserProxy: SystemPageBrowserProxy, | 38 SystemPageBrowserProxy: SystemPageBrowserProxy, |
| 44 SystemPageBrowserProxyImpl: SystemPageBrowserProxyImpl, | 39 SystemPageBrowserProxyImpl: SystemPageBrowserProxyImpl, |
| 45 }; | 40 }; |
| 46 }); | 41 }); |
| OLD | NEW |