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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 } | 151 } |
152 | 152 |
153 // Search section. | 153 // Search section. |
154 $('manage-default-search-engines').onclick = function(event) { | 154 $('manage-default-search-engines').onclick = function(event) { |
155 OptionsPage.navigateToPage('searchEngines'); | 155 OptionsPage.navigateToPage('searchEngines'); |
156 chrome.send('coreOptionsUserMetricsAction', | 156 chrome.send('coreOptionsUserMetricsAction', |
157 ['Options_ManageSearchEngines']); | 157 ['Options_ManageSearchEngines']); |
158 }; | 158 }; |
159 $('default-search-engine').addEventListener('change', | 159 $('default-search-engine').addEventListener('change', |
160 this.setDefaultSearchEngine_); | 160 this.setDefaultSearchEngine_); |
| 161 if (loadTimeData.getValue('instant_enabled') == |
| 162 'instant_extended.enabled') { |
| 163 // We don't want to see the confirm dialog for instant extended. |
| 164 $('instant-enabled-control').removeAttribute('dialog-pref'); |
| 165 $('instant-enabled-indicator').removeAttribute('dialog-pref'); |
| 166 } |
161 | 167 |
162 // Users section. | 168 // Users section. |
163 if (loadTimeData.valueExists('profilesInfo')) { | 169 if (loadTimeData.valueExists('profilesInfo')) { |
164 $('profiles-section').hidden = false; | 170 $('profiles-section').hidden = false; |
165 | 171 |
166 var profilesList = $('profiles-list'); | 172 var profilesList = $('profiles-list'); |
167 options.browser_options.ProfileList.decorate(profilesList); | 173 options.browser_options.ProfileList.decorate(profilesList); |
168 profilesList.autoExpands = true; | 174 profilesList.autoExpands = true; |
169 | 175 |
170 this.setProfilesInfo_(loadTimeData.getValue('profilesInfo')); | 176 this.setProfilesInfo_(loadTimeData.getValue('profilesInfo')); |
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1362 BrowserOptions.getLoggedInUsername = function() { | 1368 BrowserOptions.getLoggedInUsername = function() { |
1363 return BrowserOptions.getInstance().username_; | 1369 return BrowserOptions.getInstance().username_; |
1364 }; | 1370 }; |
1365 } | 1371 } |
1366 | 1372 |
1367 // Export | 1373 // Export |
1368 return { | 1374 return { |
1369 BrowserOptions: BrowserOptions | 1375 BrowserOptions: BrowserOptions |
1370 }; | 1376 }; |
1371 }); | 1377 }); |
OLD | NEW |