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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 Preferences.getInstance().addEventListener( | 465 Preferences.getInstance().addEventListener( |
466 $('gpu-mode-checkbox').getAttribute('pref'), | 466 $('gpu-mode-checkbox').getAttribute('pref'), |
467 updateGpuRestartButton); | 467 updateGpuRestartButton); |
468 $('gpu-mode-reset-restart-button').onclick = function(event) { | 468 $('gpu-mode-reset-restart-button').onclick = function(event) { |
469 chrome.send('restartBrowser'); | 469 chrome.send('restartBrowser'); |
470 }; | 470 }; |
471 updateGpuRestartButton(); | 471 updateGpuRestartButton(); |
472 } | 472 } |
473 | 473 |
474 // Reset profile settings section. | 474 // Reset profile settings section. |
475 $('reset-profile-settings-section').hidden = | |
476 !loadTimeData.getValue('enableResetProfileSettingsSection'); | |
477 $('reset-profile-settings').onclick = function(event) { | 475 $('reset-profile-settings').onclick = function(event) { |
478 OptionsPage.navigateToPage('resetProfileSettings'); | 476 OptionsPage.navigateToPage('resetProfileSettings'); |
479 }; | 477 }; |
480 }, | 478 }, |
481 | 479 |
482 /** @override */ | 480 /** @override */ |
483 didShowPage: function() { | 481 didShowPage: function() { |
484 $('search-field').focus(); | 482 $('search-field').focus(); |
485 }, | 483 }, |
486 | 484 |
(...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1497 BrowserOptions.getLoggedInUsername = function() { | 1495 BrowserOptions.getLoggedInUsername = function() { |
1498 return BrowserOptions.getInstance().username_; | 1496 return BrowserOptions.getInstance().username_; |
1499 }; | 1497 }; |
1500 } | 1498 } |
1501 | 1499 |
1502 // Export | 1500 // Export |
1503 return { | 1501 return { |
1504 BrowserOptions: BrowserOptions | 1502 BrowserOptions: BrowserOptions |
1505 }; | 1503 }; |
1506 }); | 1504 }); |
OLD | NEW |