| 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');
|
| @@ -304,6 +307,13 @@
|
| },
|
|
|
| /**
|
| + * Set 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,15 @@
|
| return;
|
| list.suggestions = suggestions;
|
| },
|
| +
|
| + /**
|
| + * A handler for the C++ code to call us and and let us know whether the
|
| + * auto-launch option should be visible and what its value should be.
|
| + */
|
| + updateAutoLaunchState_: function(enabled) {
|
| + $('autoLaunchOption').hidden = false;
|
| + $('autoLaunch').checked = enabled;
|
| + },
|
| };
|
|
|
| BrowserOptions.updateDefaultBrowserState = function(statusString, isDefault,
|
| @@ -353,6 +372,10 @@
|
| BrowserOptions.getInstance().updateAutocompleteSuggestions_(suggestions);
|
| };
|
|
|
| + BrowserOptions.updateAutoLaunchState = function(enabled) {
|
| + BrowserOptions.getInstance().updateAutoLaunchState_(enabled);
|
| + };
|
| +
|
| BrowserOptions.setInstantFieldTrialStatus = function(enabled) {
|
| BrowserOptions.getInstance().setInstantFieldTrialStatus_(enabled);
|
| };
|
|
|