| Index: chrome/browser/resources/options/browser_options.js
|
| ===================================================================
|
| --- chrome/browser/resources/options/browser_options.js (revision 111708)
|
| +++ chrome/browser/resources/options/browser_options.js (working copy)
|
| @@ -113,6 +113,9 @@
|
| $('defaultBrowserUseAsDefaultButton').onclick = function(event) {
|
| chrome.send('becomeDefaultBrowser');
|
| };
|
| +
|
| + $('autoLaunch').addEventListener('click',
|
| + this.handleAutoLaunchChanged_);
|
| }
|
|
|
| var startupPagesList = $('startupPagesList');
|
| @@ -281,7 +284,7 @@
|
| },
|
|
|
| /**
|
| - * Handle change events of the preference
|
| + * Handles change events of the preference
|
| * 'session.urls_to_restore_on_startup'.
|
| * @param {event} preference changed event.
|
| * @private
|
| @@ -292,7 +295,7 @@
|
| },
|
|
|
| /**
|
| - * Set the default search engine based on the popup selection.
|
| + * Sets the default search engine based on the popup selection.
|
| */
|
| setDefaultSearchEngine_: function() {
|
| var engineSelect = $('defaultSearchEngine');
|
| @@ -304,6 +307,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_.
|
| @@ -328,6 +338,14 @@
|
| return;
|
| list.suggestions = suggestions;
|
| },
|
| +
|
| + /**
|
| + * Shows the autoLaunch preference and initializes its checkbox value.
|
| + */
|
| + updateAutoLaunchState_: function(enabled) {
|
| + $('autoLaunchOption').hidden = false;
|
| + $('autoLaunch').checked = enabled;
|
| + },
|
| };
|
|
|
| BrowserOptions.updateDefaultBrowserState = function(statusString, isDefault,
|
| @@ -353,6 +371,10 @@
|
| BrowserOptions.getInstance().updateAutocompleteSuggestions_(suggestions);
|
| };
|
|
|
| + BrowserOptions.updateAutoLaunchState = function(enabled) {
|
| + BrowserOptions.getInstance().updateAutoLaunchState_(enabled);
|
| + };
|
| +
|
| BrowserOptions.setInstantFieldTrialStatus = function(enabled) {
|
| BrowserOptions.getInstance().setInstantFieldTrialStatus_(enabled);
|
| };
|
|
|