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

Unified Diff: chrome/browser/resources/options/browser_options.js

Issue 12929018: Enhancements to https://codereview.chromium.org/12494033/ for zmo@ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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/options/browser_options.js
diff --git a/chrome/browser/resources/options/browser_options.js b/chrome/browser/resources/options/browser_options.js
index 02b247baf4d00aa241cffc59e0c6daede585fb73..dab1597ccad03ed4356290f1aacab045709908d2 100644
--- a/chrome/browser/resources/options/browser_options.js
+++ b/chrome/browser/resources/options/browser_options.js
@@ -42,7 +42,7 @@ cr.define('options', function() {
* Track if page initialization is complete. All C++ UI handlers have the
* chance to manipulate page content within their InitializePage methods.
* This flag is set to true after all initializers have been called.
- * @type (boolean}
+ * @type {boolean}
* @private
*/
initializationComplete_: false,
@@ -467,6 +467,21 @@ cr.define('options', function() {
}
}
+ // System section.
+ if (!cr.isChromeOS) {
+ var updateGpuRestartLink = function() {
+ $('gpu-mode-reset-restart').hidden =
+ loadTimeData.getBoolean('gpuModeAtStart') ==
+ $('gpu-mode-checkbox').checked;
+ };
+ $('gpu-mode-checkbox').onchange = updateGpuRestartLink;
arv (Not doing code reviews) 2013/03/22 14:35:48 Do you really want to listen to the user changing
Dan Beam 2013/03/22 19:24:31 zmo@: yeah, you could do this instead
+ $('gpu-mode-reset-restart-link').onclick = function(event) {
+ event.preventDefault();
arv (Not doing code reviews) 2013/03/22 14:35:48 Change to <button> and no need for preventDefault.
Dan Beam 2013/03/22 19:24:31 That would be a little bit awkward where it curren
arv (Not doing code reviews) 2013/03/22 19:35:02 We have a class called link-button which styles th
+ chrome.send('restartBrowser');
+ };
+ updateGpuRestartLink();
Dan Beam 2013/03/22 00:32:56 ^ zmo@: you should set this on page load as well
+ }
+
if (loadTimeData.getBoolean('managedUsersEnabled') &&
loadTimeData.getBoolean('profileIsManaged')) {
$('managed-user-settings-section').hidden = false;

Powered by Google App Engine
This is Rietveld 408576698