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 <include src="../uber/uber_page_manager_observer.js"> | 5 <include src="../uber/uber_page_manager_observer.js"> |
6 <include src="../uber/uber_utils.js"> | 6 <include src="../uber/uber_utils.js"> |
7 | 7 |
8 (function() { | 8 (function() { |
9 var HelpPage = help.HelpPage; | 9 var HelpPage = help.HelpPage; |
10 var PageManager = cr.ui.pageManager.PageManager; | 10 var PageManager = cr.ui.pageManager.PageManager; |
(...skipping 29 matching lines...) Expand all Loading... |
40 window.onbeforeunload = function() { | 40 window.onbeforeunload = function() { |
41 PageManager.willClose(); | 41 PageManager.willClose(); |
42 }; | 42 }; |
43 | 43 |
44 /** | 44 /** |
45 * Listener for the |popstate| event. | 45 * Listener for the |popstate| event. |
46 * @param {Event} e The |popstate| event. | 46 * @param {Event} e The |popstate| event. |
47 */ | 47 */ |
48 window.onpopstate = function(e) { | 48 window.onpopstate = function(e) { |
49 var pageName = PageManager.getPageNameFromPath(); | 49 var pageName = PageManager.getPageNameFromPath(); |
50 PageManager.setState(pageName, e.state); | 50 PageManager.setState(pageName, location.hash, e.state); |
51 }; | 51 }; |
52 })(); | 52 })(); |
OLD | NEW |