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-button').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 957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1436 BrowserOptions.getLoggedInUsername = function() { | 1443 BrowserOptions.getLoggedInUsername = function() { |
1437 return BrowserOptions.getInstance().username_; | 1444 return BrowserOptions.getInstance().username_; |
1438 }; | 1445 }; |
1439 } | 1446 } |
1440 | 1447 |
1441 // Export | 1448 // Export |
1442 return { | 1449 return { |
1443 BrowserOptions: BrowserOptions | 1450 BrowserOptions: BrowserOptions |
1444 }; | 1451 }; |
1445 }); | 1452 }); |
OLD | NEW |