Index: chrome/browser/resources/options/browser_options.js |
=================================================================== |
--- chrome/browser/resources/options/browser_options.js (revision 189907) |
+++ chrome/browser/resources/options/browser_options.js (working copy) |
@@ -42,7 +42,7 @@ |
* 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,22 @@ |
} |
} |
+ // System section. |
+ if (!cr.isChromeOS) { |
+ var updateGpuRestartButton = function() { |
+ $('gpu-mode-reset-restart').hidden = |
+ loadTimeData.getBoolean('gpuEnabledAtStart') == |
+ $('gpu-mode-checkbox').checked; |
+ } |
Dan Beam
2013/03/22 22:44:04
};
Zhenyao Mo
2013/03/22 23:13:00
Done.
|
+ Preferences.getInstance().addEventListener( |
+ 'hardware_acceleration_mode.enabled', |
Dan Beam
2013/03/22 22:44:04
can you use
$('gpu-mode-checkbox').getAttribute
Zhenyao Mo
2013/03/22 23:13:00
Done.
|
+ updateGpuRestartButton); |
+ $('gpu-mode-reset-restart-button').onclick = function(event) { |
+ chrome.send('restartBrowser'); |
+ }; |
+ updateGpuRestartButton(); |
+ } |
+ |
if (loadTimeData.getBoolean('managedUsersEnabled') && |
loadTimeData.getBoolean('profileIsManaged')) { |
$('managed-user-settings-section').hidden = false; |
@@ -1386,6 +1402,7 @@ |
$('bluetooth-paired-devices-list').deleteItemAtIndex(index); |
} |
} |
+ |
}; |
//Forward public APIs to private implementations. |