| Index: chrome/browser/resources/help/help.js
|
| diff --git a/chrome/browser/resources/help/help.js b/chrome/browser/resources/help/help.js
|
| index f03dcdee6b607e083598b66e23d27de580fa32f4..a3d7d1b3a505b6f9612f87eaaff011e79fc3239b 100644
|
| --- a/chrome/browser/resources/help/help.js
|
| +++ b/chrome/browser/resources/help/help.js
|
| @@ -6,46 +6,46 @@
|
| // <include src="../uber/uber_utils.js">
|
|
|
| (function() {
|
| - var HelpPage = help.HelpPage;
|
| - var PageManager = cr.ui.pageManager.PageManager;
|
| -
|
| - /**
|
| - * DOMContentLoaded handler, sets up the page.
|
| - */
|
| - function load() {
|
| - PageManager.register(HelpPage.getInstance());
|
| -
|
| - if (help.ChannelChangePage) {
|
| - PageManager.registerOverlay(help.ChannelChangePage.getInstance(),
|
| - HelpPage.getInstance());
|
| - }
|
| - PageManager.addObserver(new uber.PageManagerObserver());
|
| - PageManager.initialize(HelpPage.getInstance());
|
| - uber.onContentFrameLoaded();
|
| -
|
| - var pageName = PageManager.getPageNameFromPath();
|
| - // Still update history so that chrome://help/nonexistant redirects
|
| - // appropriately to chrome://help/. If the URL matches, updateHistory
|
| - // will avoid adding the extra state.
|
| - var updateHistory = true;
|
| - PageManager.showPageByName(pageName, updateHistory, {replaceState: true});
|
| +var HelpPage = help.HelpPage;
|
| +var PageManager = cr.ui.pageManager.PageManager;
|
| +
|
| +/**
|
| + * DOMContentLoaded handler, sets up the page.
|
| + */
|
| +function load() {
|
| + PageManager.register(HelpPage.getInstance());
|
| +
|
| + if (help.ChannelChangePage) {
|
| + PageManager.registerOverlay(
|
| + help.ChannelChangePage.getInstance(), HelpPage.getInstance());
|
| }
|
| -
|
| - document.addEventListener('DOMContentLoaded', load);
|
| -
|
| - /**
|
| - * Listener for the |beforeunload| event.
|
| - */
|
| - window.onbeforeunload = function() {
|
| - PageManager.willClose();
|
| - };
|
| -
|
| - /**
|
| - * Listener for the |popstate| event.
|
| - * @param {Event} e The |popstate| event.
|
| - */
|
| - window.onpopstate = function(e) {
|
| - var pageName = PageManager.getPageNameFromPath();
|
| - PageManager.setState(pageName, location.hash, e.state);
|
| - };
|
| + PageManager.addObserver(new uber.PageManagerObserver());
|
| + PageManager.initialize(HelpPage.getInstance());
|
| + uber.onContentFrameLoaded();
|
| +
|
| + var pageName = PageManager.getPageNameFromPath();
|
| + // Still update history so that chrome://help/nonexistant redirects
|
| + // appropriately to chrome://help/. If the URL matches, updateHistory
|
| + // will avoid adding the extra state.
|
| + var updateHistory = true;
|
| + PageManager.showPageByName(pageName, updateHistory, {replaceState: true});
|
| +}
|
| +
|
| +document.addEventListener('DOMContentLoaded', load);
|
| +
|
| +/**
|
| + * Listener for the |beforeunload| event.
|
| + */
|
| +window.onbeforeunload = function() {
|
| + PageManager.willClose();
|
| +};
|
| +
|
| +/**
|
| + * Listener for the |popstate| event.
|
| + * @param {Event} e The |popstate| event.
|
| + */
|
| +window.onpopstate = function(e) {
|
| + var pageName = PageManager.getPageNameFromPath();
|
| + PageManager.setState(pageName, location.hash, e.state);
|
| +};
|
| })();
|
|
|