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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/system_page/system_page.js
diff --git a/chrome/browser/resources/settings/system_page/system_page.js b/chrome/browser/resources/settings/system_page/system_page.js
index cd9c667e3a7ab727b52c19d095613969df9f6b1d..088f928e5ca968b5687183b3ba2fa7c331ffa5cf 100644
--- a/chrome/browser/resources/settings/system_page/system_page.js
+++ b/chrome/browser/resources/settings/system_page/system_page.js
@@ -11,19 +11,30 @@ Polymer({
is: 'settings-system-page',
properties: {
- /** @type {settings.SystemPageDelegate} */
- delegate: {
- type: Object,
- },
-
prefs: {
type: Object,
notify: true,
},
},
+ /**
+ * @param {boolean} enabled Whether hardware acceleration is currently
+ * enabled.
+ * @private
+ */
+ shouldShowRestart_: function(enabled) {
+ var proxy = settings.SystemPageBrowserProxyImpl.getInstance();
+ return enabled != proxy.wasHardwareAccelerationEnabledAtStartup();
+ },
+
/** @private */
onChangeProxySettingsTap_: function() {
- this.delegate.changeProxySettings();
+ settings.SystemPageBrowserProxyImpl.getInstance().changeProxySettings();
+ },
+
+ /** @private */
+ onRestartTap_: function() {
+ // TODO(dbeam): we should prompt before restarting the browser.
+ settings.SystemPageBrowserProxyImpl.getInstance().restartBrowser();
},
});

Powered by Google App Engine
This is Rietveld 408576698