| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 cr.define('options', function() { | 5 cr.define('options', function() { |
| 6 var OptionsPage = options.OptionsPage; | 6 var OptionsPage = options.OptionsPage; |
| 7 var ArrayDataModel = cr.ui.ArrayDataModel; | 7 var ArrayDataModel = cr.ui.ArrayDataModel; |
| 8 var RepeatingButton = cr.ui.RepeatingButton; | 8 var RepeatingButton = cr.ui.RepeatingButton; |
| 9 | 9 |
| 10 // | 10 // |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 $('gpu-mode-checkbox').checked; | 459 $('gpu-mode-checkbox').checked; |
| 460 }; | 460 }; |
| 461 Preferences.getInstance().addEventListener( | 461 Preferences.getInstance().addEventListener( |
| 462 $('gpu-mode-checkbox').getAttribute('pref'), | 462 $('gpu-mode-checkbox').getAttribute('pref'), |
| 463 updateGpuRestartButton); | 463 updateGpuRestartButton); |
| 464 $('gpu-mode-reset-restart-button').onclick = function(event) { | 464 $('gpu-mode-reset-restart-button').onclick = function(event) { |
| 465 chrome.send('restartBrowser'); | 465 chrome.send('restartBrowser'); |
| 466 }; | 466 }; |
| 467 updateGpuRestartButton(); | 467 updateGpuRestartButton(); |
| 468 } | 468 } |
| 469 |
| 470 // Reset profile settings section. |
| 471 $('reset-profile-settings-section').hidden = |
| 472 !loadTimeData.getValue('enableResetProfileSettingsSection'); |
| 473 $('reset-profile-settings').onclick = function(event) { |
| 474 OptionsPage.navigateToPage('resetProfileSettings'); |
| 475 }; |
| 469 }, | 476 }, |
| 470 | 477 |
| 471 /** @override */ | 478 /** @override */ |
| 472 didShowPage: function() { | 479 didShowPage: function() { |
| 473 $('search-field').focus(); | 480 $('search-field').focus(); |
| 474 }, | 481 }, |
| 475 | 482 |
| 476 /** | 483 /** |
| 477 * Called after all C++ UI handlers have called InitializePage to notify | 484 * Called after all C++ UI handlers have called InitializePage to notify |
| 478 * that initialization is complete. | 485 * that initialization is complete. |
| (...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1454 BrowserOptions.getLoggedInUsername = function() { | 1461 BrowserOptions.getLoggedInUsername = function() { |
| 1455 return BrowserOptions.getInstance().username_; | 1462 return BrowserOptions.getInstance().username_; |
| 1456 }; | 1463 }; |
| 1457 } | 1464 } |
| 1458 | 1465 |
| 1459 // Export | 1466 // Export |
| 1460 return { | 1467 return { |
| 1461 BrowserOptions: BrowserOptions | 1468 BrowserOptions: BrowserOptions |
| 1462 }; | 1469 }; |
| 1463 }); | 1470 }); |
| OLD | NEW |