Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: chrome/browser/resources/settings/system_page/system_page_browser_proxy.js

Issue 2971163002: Add local protection setting to chrome://settings/system
Patch Set: linux-only Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 class SystemPageBrowserProxy { 9 class SystemPageBrowserProxy {
10 /** Shows the native system proxy settings. */ 10 /** Shows the native system proxy settings. */
11 showProxySettings() {} 11 showProxySettings() {}
12 12
13 /** 13 /**
14 * @return {boolean} Whether hardware acceleration was enabled when the user 14 * @return {boolean} Whether hardware acceleration was enabled when the user
15 * started Chrome. 15 * started Chrome.
16 */ 16 */
17 wasHardwareAccelerationEnabledAtStartup() {} 17 wasHardwareAccelerationEnabledAtStartup() {}
18
19 /**
20 * @return {boolean} Whether to show the setting that controls use of
21 * protection.
22 */
23 hideProtectionSetting() {}
24
25 /**
26 * @return {boolean} // TODO(cfroussios)
27 */
28 protectionSetting() {}
29
30 setProtectionSetting(enabled) {}
18 } 31 }
19 32
20 /** 33 /**
21 * @implements {settings.SystemPageBrowserProxy} 34 * @implements {settings.SystemPageBrowserProxy}
22 */ 35 */
23 class SystemPageBrowserProxyImpl { 36 class SystemPageBrowserProxyImpl {
24 /** @override */ 37 /** @override */
25 showProxySettings() { 38 showProxySettings() {
26 chrome.send('showProxySettings'); 39 chrome.send('showProxySettings');
27 } 40 }
28 41
29 /** @override */ 42 /** @override */
30 wasHardwareAccelerationEnabledAtStartup() { 43 wasHardwareAccelerationEnabledAtStartup() {
31 return loadTimeData.getBoolean('hardwareAccelerationEnabledAtStartup'); 44 return loadTimeData.getBoolean('hardwareAccelerationEnabledAtStartup');
32 } 45 }
46
47 /** @override */
48 hideProtectionSetting() {
49 return loadTimeData.getBoolean('hideProtectionSetting');
50 }
51
52 /** @override */
53 protectionSetting() {
54 return loadTimeData.getBoolean('protectionSetting');
55 }
56
57 setProtectionSetting(enabled) {
58 chrome.send('updateProtectionSetting', [enabled]);
59 }
33 } 60 }
34 61
35 cr.addSingletonGetter(SystemPageBrowserProxyImpl); 62 cr.addSingletonGetter(SystemPageBrowserProxyImpl);
36 63
37 return { 64 return {
38 SystemPageBrowserProxy: SystemPageBrowserProxy, 65 SystemPageBrowserProxy: SystemPageBrowserProxy,
39 SystemPageBrowserProxyImpl: SystemPageBrowserProxyImpl, 66 SystemPageBrowserProxyImpl: SystemPageBrowserProxyImpl,
40 }; 67 };
41 }); 68 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/system_page/system_page.js ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698