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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 } | 466 } |
467 | 467 |
468 if (loadTimeData.getBoolean('managedUsersEnabled') && | 468 if (loadTimeData.getBoolean('managedUsersEnabled') && |
469 loadTimeData.getBoolean('profileIsManaged')) { | 469 loadTimeData.getBoolean('profileIsManaged')) { |
470 $('managed-user-settings-section').hidden = false; | 470 $('managed-user-settings-section').hidden = false; |
471 | 471 |
472 $('open-managed-user-settings-button').onclick = function(event) { | 472 $('open-managed-user-settings-button').onclick = function(event) { |
473 OptionsPage.navigateToPage('managedUser'); | 473 OptionsPage.navigateToPage('managedUser'); |
474 }; | 474 }; |
475 } | 475 } |
| 476 |
| 477 // Reset profile settings section. |
| 478 $('reset-profile-settings-section').hidden = |
| 479 !loadTimeData.getValue('enableResetProfileSettingsSection'); |
| 480 $('reset-profile-settings-button').onclick = function(event) { |
| 481 OptionsPage.navigateToPage('resetProfileSettings'); |
| 482 }; |
476 }, | 483 }, |
477 | 484 |
478 /** @override */ | 485 /** @override */ |
479 didShowPage: function() { | 486 didShowPage: function() { |
480 $('search-field').focus(); | 487 $('search-field').focus(); |
481 }, | 488 }, |
482 | 489 |
483 /** | 490 /** |
484 * Called after all C++ UI handlers have called InitializePage to notify | 491 * Called after all C++ UI handlers have called InitializePage to notify |
485 * that initialization is complete. | 492 * that initialization is complete. |
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1443 BrowserOptions.getLoggedInUsername = function() { | 1450 BrowserOptions.getLoggedInUsername = function() { |
1444 return BrowserOptions.getInstance().username_; | 1451 return BrowserOptions.getInstance().username_; |
1445 }; | 1452 }; |
1446 } | 1453 } |
1447 | 1454 |
1448 // Export | 1455 // Export |
1449 return { | 1456 return { |
1450 BrowserOptions: BrowserOptions | 1457 BrowserOptions: BrowserOptions |
1451 }; | 1458 }; |
1452 }); | 1459 }); |
OLD | NEW |