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 var AddLanguageOverlay = options.AddLanguageOverlay; | 5 var AddLanguageOverlay = options.AddLanguageOverlay; |
6 var AlertOverlay = options.AlertOverlay; | 6 var AlertOverlay = options.AlertOverlay; |
7 var AutofillEditAddressOverlay = options.AutofillEditAddressOverlay; | 7 var AutofillEditAddressOverlay = options.AutofillEditAddressOverlay; |
8 var AutofillEditCreditCardOverlay = options.AutofillEditCreditCardOverlay; | 8 var AutofillEditCreditCardOverlay = options.AutofillEditCreditCardOverlay; |
9 var AutofillOptions = options.AutofillOptions; | 9 var AutofillOptions = options.AutofillOptions; |
10 var AutomaticSettingsResetBanner = options.AutomaticSettingsResetBanner; | 10 var AutomaticSettingsResetBanner = options.AutomaticSettingsResetBanner; |
(...skipping 16 matching lines...) Expand all Loading... |
27 var HotwordConfirmDialog = options.HotwordConfirmDialog; | 27 var HotwordConfirmDialog = options.HotwordConfirmDialog; |
28 var ImportDataOverlay = options.ImportDataOverlay; | 28 var ImportDataOverlay = options.ImportDataOverlay; |
29 var LanguageOptions = options.LanguageOptions; | 29 var LanguageOptions = options.LanguageOptions; |
30 var ManageProfileOverlay = options.ManageProfileOverlay; | 30 var ManageProfileOverlay = options.ManageProfileOverlay; |
31 var OptionsFocusManager = options.OptionsFocusManager; | 31 var OptionsFocusManager = options.OptionsFocusManager; |
32 var OptionsPage = options.OptionsPage; | 32 var OptionsPage = options.OptionsPage; |
33 var PageManager = cr.ui.pageManager.PageManager; | 33 var PageManager = cr.ui.pageManager.PageManager; |
34 var PasswordManager = options.PasswordManager; | 34 var PasswordManager = options.PasswordManager; |
35 var Preferences = options.Preferences; | 35 var Preferences = options.Preferences; |
36 var PreferredNetworks = options.PreferredNetworks; | 36 var PreferredNetworks = options.PreferredNetworks; |
37 var ResetProfileSettingsBanner = options.ResetProfileSettingsBanner; | |
38 var ResetProfileSettingsOverlay = options.ResetProfileSettingsOverlay; | 37 var ResetProfileSettingsOverlay = options.ResetProfileSettingsOverlay; |
39 var SearchEngineManager = options.SearchEngineManager; | 38 var SearchEngineManager = options.SearchEngineManager; |
40 var SearchPage = options.SearchPage; | 39 var SearchPage = options.SearchPage; |
41 var StartupOverlay = options.StartupOverlay; | 40 var StartupOverlay = options.StartupOverlay; |
42 var SupervisedUserCreateConfirmOverlay = | 41 var SupervisedUserCreateConfirmOverlay = |
43 options.SupervisedUserCreateConfirmOverlay; | 42 options.SupervisedUserCreateConfirmOverlay; |
44 var SupervisedUserImportOverlay = options.SupervisedUserImportOverlay; | 43 var SupervisedUserImportOverlay = options.SupervisedUserImportOverlay; |
45 var SupervisedUserLearnMoreOverlay = options.SupervisedUserLearnMoreOverlay; | 44 var SupervisedUserLearnMoreOverlay = options.SupervisedUserLearnMoreOverlay; |
46 var SyncSetupOverlay = options.SyncSetupOverlay; | 45 var SyncSetupOverlay = options.SyncSetupOverlay; |
47 var WebsiteSettingsManager = options.WebsiteSettingsManager; | 46 var WebsiteSettingsManager = options.WebsiteSettingsManager; |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 PageManager.registerOverlay(CertificateManager.getInstance(), | 217 PageManager.registerOverlay(CertificateManager.getInstance(), |
219 BrowserOptions.getInstance(), | 218 BrowserOptions.getInstance(), |
220 [$('certificatesManageButton')]); | 219 [$('certificatesManageButton')]); |
221 PageManager.registerOverlay(CertificateRestoreOverlay.getInstance(), | 220 PageManager.registerOverlay(CertificateRestoreOverlay.getInstance(), |
222 CertificateManager.getInstance()); | 221 CertificateManager.getInstance()); |
223 } | 222 } |
224 | 223 |
225 cr.ui.FocusManager.disableMouseFocusOnButtons(); | 224 cr.ui.FocusManager.disableMouseFocusOnButtons(); |
226 OptionsFocusManager.getInstance().initialize(); | 225 OptionsFocusManager.getInstance().initialize(); |
227 Preferences.getInstance().initialize(); | 226 Preferences.getInstance().initialize(); |
228 ResetProfileSettingsBanner.getInstance().initialize(); | |
229 AutomaticSettingsResetBanner.getInstance().initialize(); | 227 AutomaticSettingsResetBanner.getInstance().initialize(); |
230 OptionsPage.initialize(); | 228 OptionsPage.initialize(); |
231 | 229 |
232 var pageName = PageManager.getPageNameFromPath(); | 230 var pageName = PageManager.getPageNameFromPath(); |
233 // Still update history so that chrome://settings/nonexistant redirects | 231 // Still update history so that chrome://settings/nonexistant redirects |
234 // appropriately to chrome://settings/. If the URL matches, updateHistory_ | 232 // appropriately to chrome://settings/. If the URL matches, updateHistory_ |
235 // will avoid the extra replaceState. | 233 // will avoid the extra replaceState. |
236 PageManager.showPageByName(pageName, true, {replaceState: true}); | 234 PageManager.showPageByName(pageName, true, {replaceState: true}); |
237 | 235 |
238 var subpagesNavTabs = document.querySelectorAll('.subpages-nav-tabs'); | 236 var subpagesNavTabs = document.querySelectorAll('.subpages-nav-tabs'); |
(...skipping 20 matching lines...) Expand all Loading... |
259 }; | 257 }; |
260 | 258 |
261 /** | 259 /** |
262 * Listener for the |popstate| event. | 260 * Listener for the |popstate| event. |
263 * @param {Event} e The |popstate| event. | 261 * @param {Event} e The |popstate| event. |
264 */ | 262 */ |
265 window.onpopstate = function(e) { | 263 window.onpopstate = function(e) { |
266 var pageName = PageManager.getPageNameFromPath(); | 264 var pageName = PageManager.getPageNameFromPath(); |
267 PageManager.setState(pageName, e.state); | 265 PageManager.setState(pageName, e.state); |
268 }; | 266 }; |
OLD | NEW |