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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
218 BrowserOptions.getInstance(), | 218 BrowserOptions.getInstance(), |
219 [$('certificatesManageButton')]); | 219 [$('certificatesManageButton')]); |
220 PageManager.registerOverlay(CertificateRestoreOverlay.getInstance(), | 220 PageManager.registerOverlay(CertificateRestoreOverlay.getInstance(), |
221 CertificateManager.getInstance()); | 221 CertificateManager.getInstance()); |
222 } | 222 } |
223 | 223 |
224 cr.ui.FocusManager.disableMouseFocusOnButtons(); | 224 cr.ui.FocusManager.disableMouseFocusOnButtons(); |
225 OptionsFocusManager.getInstance().initialize(); | 225 OptionsFocusManager.getInstance().initialize(); |
226 Preferences.getInstance().initialize(); | 226 Preferences.getInstance().initialize(); |
227 AutomaticSettingsResetBanner.getInstance().initialize(); | 227 AutomaticSettingsResetBanner.getInstance().initialize(); |
228 PageManager.addObserver(new uber.PageManagerObserver()); | |
228 OptionsPage.initialize(); | 229 OptionsPage.initialize(); |
230 uber.onContentFrameLoaded(); | |
Dan Beam
2014/08/06 18:30:54
why are these calls here and not at the bottom of
michaelpg
2014/08/06 21:58:18
i've moved these around a bit:
PageManager.initia
| |
229 | 231 |
230 var pageName = PageManager.getPageNameFromPath(); | 232 var pageName = PageManager.getPageNameFromPath(); |
231 // Still update history so that chrome://settings/nonexistant redirects | 233 // Still update history so that chrome://settings/nonexistant redirects |
232 // appropriately to chrome://settings/. If the URL matches, updateHistory_ | 234 // appropriately to chrome://settings/. If the URL matches, updateHistory_ |
233 // will avoid the extra replaceState. | 235 // will avoid the extra replaceState. |
234 PageManager.showPageByName(pageName, true, {replaceState: true}); | 236 PageManager.showPageByName(pageName, true, {replaceState: true}); |
235 | 237 |
236 var subpagesNavTabs = document.querySelectorAll('.subpages-nav-tabs'); | 238 var subpagesNavTabs = document.querySelectorAll('.subpages-nav-tabs'); |
237 for (var i = 0; i < subpagesNavTabs.length; i++) { | 239 for (var i = 0; i < subpagesNavTabs.length; i++) { |
238 subpagesNavTabs[i].onclick = function(event) { | 240 subpagesNavTabs[i].onclick = function(event) { |
(...skipping 18 matching lines...) Expand all Loading... | |
257 }; | 259 }; |
258 | 260 |
259 /** | 261 /** |
260 * Listener for the |popstate| event. | 262 * Listener for the |popstate| event. |
261 * @param {Event} e The |popstate| event. | 263 * @param {Event} e The |popstate| event. |
262 */ | 264 */ |
263 window.onpopstate = function(e) { | 265 window.onpopstate = function(e) { |
264 var pageName = PageManager.getPageNameFromPath(); | 266 var pageName = PageManager.getPageNameFromPath(); |
265 PageManager.setState(pageName, e.state); | 267 PageManager.setState(pageName, e.state); |
266 }; | 268 }; |
OLD | NEW |