| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 /** @fileoverview Handles interprocess communcation for the system page. */ |
| 6 |
| 7 cr.define('settings', function() { |
| 8 /** @interface */ |
| 9 function SystemPageBrowserProxy() {} |
| 10 |
| 11 SystemPageBrowserProxy.prototype = { |
| 12 /** Allows the user to change native system proxy settings. */ |
| 13 changeProxySettings: function() {}, |
| 14 |
| 15 /** Restarts Chrome so "Use hardware acceleration" can take effect. */ |
| 16 restartBrowser: function() {}, |
| 17 |
| 18 /** |
| 19 * @return {boolean} Whether hardware acceleration was enabled when the user |
| 20 * started Chrome. |
| 21 */ |
| 22 wasHardwareAccelerationEnabledAtStartup: function() {}, |
| 23 }; |
| 24 |
| 25 /** |
| 26 * @constructor |
| 27 * @implements {settings.SystemPageBrowserProxy} |
| 28 */ |
| 29 function SystemPageBrowserProxyImpl() {} |
| 30 |
| 31 cr.addSingletonGetter(SystemPageBrowserProxyImpl); |
| 32 |
| 33 SystemPageBrowserProxyImpl.prototype = { |
| 34 /** @override */ |
| 35 changeProxySettings: function() { |
| 36 chrome.send('changeProxySettings'); |
| 37 }, |
| 38 |
| 39 /** @override */ |
| 40 restartBrowser: function() { |
| 41 chrome.send('restartBrowser'); |
| 42 }, |
| 43 |
| 44 /** @override */ |
| 45 wasHardwareAccelerationEnabledAtStartup: function() { |
| 46 return loadTimeData.getBoolean('hardwareAccelerationEnabledAtStartup'); |
| 47 }, |
| 48 }; |
| 49 |
| 50 return { |
| 51 SystemPageBrowserProxy: SystemPageBrowserProxy, |
| 52 SystemPageBrowserProxyImpl: SystemPageBrowserProxyImpl, |
| 53 }; |
| 54 }); |
| OLD | NEW |