| Index: chrome/browser/resources/options2/browser_options.js
|
| ===================================================================
|
| --- chrome/browser/resources/options2/browser_options.js (revision 119922)
|
| +++ chrome/browser/resources/options2/browser_options.js (working copy)
|
| @@ -213,6 +213,9 @@
|
| function(event) {
|
| chrome.send('becomeDefaultBrowser');
|
| });
|
| +
|
| + $('autoLaunch').addEventListener('click',
|
| + this.handleAutoLaunchChanged_);
|
| }
|
|
|
| // Under the hood section.
|
| @@ -323,6 +326,16 @@
|
| },
|
|
|
| /**
|
| + * Shows the autoLaunch preference and initializes its checkbox value.
|
| + * @param {bool} enabled Whether autolaunch is enabled or or not.
|
| + * @private
|
| + */
|
| + updateAutoLaunchState_: function(enabled) {
|
| + $('autoLaunchOption').hidden = false;
|
| + $('autoLaunch').checked = enabled;
|
| + },
|
| +
|
| + /**
|
| * Called when the value of the instant.confirm_dialog_shown preference
|
| * changes. Cache this value.
|
| * @param {Event} event Change event.
|
| @@ -445,6 +458,13 @@
|
| },
|
|
|
| /**
|
| + * Sets or clear whether Chrome should Auto-launch on computer startup.
|
| + */
|
| + handleAutoLaunchChanged_: function() {
|
| + chrome.send('toggleAutoLaunch', [Boolean($('autoLaunch').checked)]);
|
| + },
|
| +
|
| + /**
|
| * Sends an asynchronous request for new autocompletion suggestions for the
|
| * the given query. When new suggestions are available, the C++ handler will
|
| * call updateAutocompleteSuggestions_.
|
| @@ -587,6 +607,7 @@
|
| 'setThemesResetButtonEnabled',
|
| 'updateAccountPicture',
|
| 'updateAutocompleteSuggestions',
|
| + 'updateAutoLaunchState',
|
| 'updateHomePageLabel',
|
| 'updateSearchEngines',
|
| 'updateStartupPages',
|
|
|