| 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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 var subpagesNavTabs = document.querySelectorAll('.subpages-nav-tabs'); | 283 var subpagesNavTabs = document.querySelectorAll('.subpages-nav-tabs'); |
| 284 for (var i = 0; i < subpagesNavTabs.length; i++) { | 284 for (var i = 0; i < subpagesNavTabs.length; i++) { |
| 285 subpagesNavTabs[i].onclick = function(event) { | 285 subpagesNavTabs[i].onclick = function(event) { |
| 286 OptionsPage.showTab(event.srcElement); | 286 OptionsPage.showTab(event.srcElement); |
| 287 }; | 287 }; |
| 288 } | 288 } |
| 289 | 289 |
| 290 window.setTimeout(function() { | 290 window.setTimeout(function() { |
| 291 document.documentElement.classList.remove('loading'); | 291 document.documentElement.classList.remove('loading'); |
| 292 chrome.send('onFinishedLoadingOptions'); | 292 chrome.send('onFinishedLoadingOptions'); |
| 293 chrome.send( |
| 294 'metricsHandler:recordTime', |
| 295 ['Settings.TimeUntilInteractive', window.performance.now()]); |
| 293 }, 0); | 296 }, 0); |
| 294 } | 297 } |
| 295 | 298 |
| 296 document.documentElement.classList.add('loading'); | 299 document.documentElement.classList.add('loading'); |
| 297 document.addEventListener('DOMContentLoaded', load); | 300 document.addEventListener('DOMContentLoaded', load); |
| 298 | 301 |
| 299 /** | 302 /** |
| 300 * Listener for the |beforeunload| event. | 303 * Listener for the |beforeunload| event. |
| 301 */ | 304 */ |
| 302 window.onbeforeunload = function() { | 305 window.onbeforeunload = function() { |
| 303 PageManager.willClose(); | 306 PageManager.willClose(); |
| 304 }; | 307 }; |
| 305 | 308 |
| 306 /** | 309 /** |
| 307 * Listener for the |popstate| event. | 310 * Listener for the |popstate| event. |
| 308 * @param {Event} e The |popstate| event. | 311 * @param {Event} e The |popstate| event. |
| 309 */ | 312 */ |
| 310 window.onpopstate = function(e) { | 313 window.onpopstate = function(e) { |
| 311 var pageName = PageManager.getPageNameFromPath(); | 314 var pageName = PageManager.getPageNameFromPath(); |
| 312 PageManager.setState(pageName, location.hash, e.state); | 315 PageManager.setState(pageName, location.hash, e.state); |
| 313 }; | 316 }; |
| OLD | NEW |