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

Side by Side Diff: chrome/browser/resources/uber/uber_page_manager_observer.js

Issue 443553002: Typecheck chrome://help using CompilerPass.java, everything except dependency to options (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@true_master
Patch Set: fixed one nit Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 cr.define('uber', function() { 5 cr.define('uber', function() {
6 var PageManager = cr.ui.pageManager.PageManager; 6 var PageManager = cr.ui.pageManager.PageManager;
7 7
8 /** 8 /**
9 * A PageManager observer that updates the uber page. 9 * A PageManager observer that updates the uber page.
10 * @constructor 10 * @constructor
11 * @implements {PageManager.Observer} 11 * @implements {cr.ui.pageManager.PageManager.Observer}
12 */ 12 */
13 function PageManagerObserver() {} 13 function PageManagerObserver() {}
14 14
15 PageManagerObserver.prototype = { 15 PageManagerObserver.prototype = {
16 __proto__: PageManager.Observer.prototype, 16 __proto__: PageManager.Observer.prototype,
17 17
18 /** 18 /**
19 * Informs the uber page when a top-level overlay is opened or closed. 19 * Informs the uber page when a top-level overlay is opened or closed.
20 * @param {Page} page The page that is being shown or was hidden. 20 * @param {cr.ui.pageManager.Page} page The page that is being shown or was
21 * hidden.
21 * @override 22 * @override
22 */ 23 */
23 onPageVisibilityChanged: function(page) { 24 onPageVisibilityChanged: function(page) {
24 if (PageManager.isTopLevelOverlay(page)) { 25 if (PageManager.isTopLevelOverlay(page)) {
25 if (page.visible) 26 if (page.visible)
26 uber.invokeMethodOnParent('beginInterceptingEvents'); 27 uber.invokeMethodOnParent('beginInterceptingEvents');
27 else 28 else
28 uber.invokeMethodOnParent('stopInterceptingEvents'); 29 uber.invokeMethodOnParent('stopInterceptingEvents');
29 } 30 }
30 }, 31 },
(...skipping 18 matching lines...) Expand all
49 var historyFunction = replace ? uber.replaceState : uber.pushState; 50 var historyFunction = replace ? uber.replaceState : uber.pushState;
50 historyFunction({}, path); 51 historyFunction({}, path);
51 }, 52 },
52 }; 53 };
53 54
54 // Export 55 // Export
55 return { 56 return {
56 PageManagerObserver: PageManagerObserver 57 PageManagerObserver: PageManagerObserver
57 }; 58 };
58 }); 59 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698