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

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

Issue 1814703004: MD Settings: implement "RESTART" button for hardware acceleration to take effect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 4 years, 9 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 /** 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 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698