Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Unified Diff: chrome/browser/resources/help/help.js

Issue 449623003: Integrate About page into Settings for Chrome OS settings in a window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/help/channel_change_page.html ('k') | chrome/browser/resources/help/help_page.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/help/help.js
diff --git a/chrome/browser/resources/help/help.js b/chrome/browser/resources/help/help.js
index e6c3f15f4cb2034a988490cb2930c6e5cb054514..88ba4b70e20e8b8a77abacf1b2a259b5f2124b41 100644
--- a/chrome/browser/resources/help/help.js
+++ b/chrome/browser/resources/help/help.js
@@ -5,47 +5,48 @@
<include src="../uber/uber_page_manager_observer.js">
<include src="../uber/uber_utils.js">
-var ChannelChangePage = help.ChannelChangePage;
-var HelpPage = help.HelpPage;
-var PageManager = cr.ui.pageManager.PageManager;
-
-/**
- * DOMContentLoaded handler, sets up the page.
- */
-function load() {
- PageManager.register(HelpPage.getInstance());
-
- if (cr.isChromeOS) {
- PageManager.registerOverlay(ChannelChangePage.getInstance(),
- HelpPage.getInstance());
+(function() {
+ var HelpPage = help.HelpPage;
+ var PageManager = cr.ui.pageManager.PageManager;
+
+ /**
+ * DOMContentLoaded handler, sets up the page.
+ */
+ function load() {
+ PageManager.register(HelpPage.getInstance());
+
+ if (cr.isChromeOS) {
+ PageManager.registerOverlay(help.ChannelChangePage.getInstance(),
+ HelpPage.getInstance());
+ }
+ cr.ui.FocusManager.disableMouseFocusOnButtons();
+ 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});
}
- cr.ui.FocusManager.disableMouseFocusOnButtons();
- 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, e.state);
-};
+
+ 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, e.state);
+ };
+})();
« no previous file with comments | « chrome/browser/resources/help/channel_change_page.html ('k') | chrome/browser/resources/help/help_page.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698