| 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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 } | 475 } |
| 476 | 476 |
| 477 if (loadTimeData.getBoolean('managedUsersEnabled') && | 477 if (loadTimeData.getBoolean('managedUsersEnabled') && |
| 478 loadTimeData.getBoolean('profileIsManaged')) { | 478 loadTimeData.getBoolean('profileIsManaged')) { |
| 479 $('managed-user-settings-section').hidden = false; | 479 $('managed-user-settings-section').hidden = false; |
| 480 | 480 |
| 481 $('open-managed-user-settings-button').onclick = function(event) { | 481 $('open-managed-user-settings-button').onclick = function(event) { |
| 482 OptionsPage.navigateToPage('managedUser'); | 482 OptionsPage.navigateToPage('managedUser'); |
| 483 }; | 483 }; |
| 484 } | 484 } |
| 485 |
| 486 // Reset profile settings section. |
| 487 $('reset-profile-settings-section').hidden = |
| 488 !loadTimeData.getValue('enableProfileSection'); |
| 489 $('reset-profile-settings-button').onclick = function(event) { |
| 490 OptionsPage.navigateToPage('resetProfileSettings'); |
| 491 }; |
| 485 }, | 492 }, |
| 486 | 493 |
| 487 /** @override */ | 494 /** @override */ |
| 488 didShowPage: function() { | 495 didShowPage: function() { |
| 489 $('search-field').focus(); | 496 $('search-field').focus(); |
| 490 }, | 497 }, |
| 491 | 498 |
| 492 /** | 499 /** |
| 493 * Called after all C++ UI handlers have called InitializePage to notify | 500 * Called after all C++ UI handlers have called InitializePage to notify |
| 494 * that initialization is complete. | 501 * that initialization is complete. |
| (...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1451 BrowserOptions.getLoggedInUsername = function() { | 1458 BrowserOptions.getLoggedInUsername = function() { |
| 1452 return BrowserOptions.getInstance().username_; | 1459 return BrowserOptions.getInstance().username_; |
| 1453 }; | 1460 }; |
| 1454 } | 1461 } |
| 1455 | 1462 |
| 1456 // Export | 1463 // Export |
| 1457 return { | 1464 return { |
| 1458 BrowserOptions: BrowserOptions | 1465 BrowserOptions: BrowserOptions |
| 1459 }; | 1466 }; |
| 1460 }); | 1467 }); |
| OLD | NEW |