Chromium Code Reviews| 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: assertNotReached, | |
|
dpapad
2016/03/21 18:17:38
Nit: Is assertNotReached() useful here (instead of
Dan Beam
2016/03/22 02:16:59
pre-Done (I don't feel strongly enough to slow dow
dpapad
2016/03/22 02:40:04
I don't think it is detrimental (which is why I pr
Dan Beam
2016/03/22 03:06:36
yeah, this is what I guessed (that it just makes t
| |
| 14 | |
| 15 /** Restarts Chrome so "Use hardware acceleration" can take effect. */ | |
| 16 restartBrowser: assertNotReached, | |
| 17 | |
| 18 /** | |
| 19 * @return {boolean} Whether hardware acceleration was enabled when the user | |
| 20 * started Chrome. | |
| 21 */ | |
| 22 wasHardwareAccelerationEnabledAtStartup: assertNotReached, | |
| 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 |