| 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 BrowserOptions = options.BrowserOptions; | 10 var BrowserOptions = options.BrowserOptions; |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 CertificateManager.getInstance()); | 221 CertificateManager.getInstance()); |
| 222 OptionsPage.registerOverlay(CertificateImportErrorOverlay.getInstance(), | 222 OptionsPage.registerOverlay(CertificateImportErrorOverlay.getInstance(), |
| 223 CertificateManager.getInstance()); | 223 CertificateManager.getInstance()); |
| 224 OptionsPage.registerOverlay(CertificateManager.getInstance(), | 224 OptionsPage.registerOverlay(CertificateManager.getInstance(), |
| 225 BrowserOptions.getInstance(), | 225 BrowserOptions.getInstance(), |
| 226 [$('certificatesManageButton')]); | 226 [$('certificatesManageButton')]); |
| 227 OptionsPage.registerOverlay(CertificateRestoreOverlay.getInstance(), | 227 OptionsPage.registerOverlay(CertificateRestoreOverlay.getInstance(), |
| 228 CertificateManager.getInstance()); | 228 CertificateManager.getInstance()); |
| 229 } | 229 } |
| 230 | 230 |
| 231 cr.ui.FocusManager.disableMouseFocusOnButtons(); |
| 231 OptionsFocusManager.getInstance().initialize(); | 232 OptionsFocusManager.getInstance().initialize(); |
| 232 Preferences.getInstance().initialize(); | 233 Preferences.getInstance().initialize(); |
| 233 OptionsPage.initialize(); | 234 OptionsPage.initialize(); |
| 234 | 235 |
| 235 var path = document.location.pathname; | 236 var path = document.location.pathname; |
| 236 | 237 |
| 237 if (path.length > 1) { | 238 if (path.length > 1) { |
| 238 // Skip starting slash and remove trailing slash (if any). | 239 // Skip starting slash and remove trailing slash (if any). |
| 239 var pageName = path.slice(1).replace(/\/$/, ''); | 240 var pageName = path.slice(1).replace(/\/$/, ''); |
| 240 OptionsPage.showPageByName(pageName, true, {replaceState: true}); | 241 OptionsPage.showPageByName(pageName, true, {replaceState: true}); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 267 options.OptionsPage.willClose(); | 268 options.OptionsPage.willClose(); |
| 268 }; | 269 }; |
| 269 | 270 |
| 270 /** | 271 /** |
| 271 * Listener for the |popstate| event. | 272 * Listener for the |popstate| event. |
| 272 * @param {Event} e The |popstate| event. | 273 * @param {Event} e The |popstate| event. |
| 273 */ | 274 */ |
| 274 window.onpopstate = function(e) { | 275 window.onpopstate = function(e) { |
| 275 options.OptionsPage.setState(e.state); | 276 options.OptionsPage.setState(e.state); |
| 276 }; | 277 }; |
| OLD | NEW |