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

Side by Side Diff: chrome/browser/resources/settings/settings_page/main_page_behavior.js

Issue 2912473004: [MD settings] rename lastRoutChangeWasPopstate var (Closed)
Patch Set: updated test Created 3 years, 6 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
« no previous file with comments | « chrome/browser/resources/settings/route.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 /** 5 /**
6 * Responds to route changes by expanding, collapsing, or scrolling to sections 6 * Responds to route changes by expanding, collapsing, or scrolling to sections
7 * on the page. Expanded sections take up the full height of the container. At 7 * on the page. Expanded sections take up the full height of the container. At
8 * most one section should be expanded at any given time. 8 * most one section should be expanded at any given time.
9 * @polymerBehavior MainPageBehavior 9 * @polymerBehavior MainPageBehavior
10 */ 10 */
11 var MainPageBehaviorImpl = { 11 var MainPageBehaviorImpl = {
12 properties: { 12 properties: {
13 /** 13 /**
14 * Help CSS to alter style during the horizontal swipe animation. 14 * Help CSS to alter style during the horizontal swipe animation.
15 * Note that this is unrelated to the |currentAnimation_| (which refers to 15 * Note that this is unrelated to the |currentAnimation_| (which refers to
16 * the vertical exapand animation). 16 * the vertical expand animation).
17 */ 17 */
18 isSubpageAnimating: { 18 isSubpageAnimating: {
19 reflectToAttribute: true, 19 reflectToAttribute: true,
20 type: Boolean, 20 type: Boolean,
21 }, 21 },
22 22
23 /** 23 /**
24 * Whether a search operation is in progress or previous search results are 24 * Whether a search operation is in progress or previous search results are
25 * being displayed. 25 * being displayed.
26 * @private {boolean} 26 * @private {boolean}
27 */ 27 */
28 inSearchMode: { 28 inSearchMode: {
29 type: Boolean, 29 type: Boolean,
30 value: false, 30 value: false,
31 observer: 'inSearchModeChanged_', 31 observer: 'inSearchModeChanged_',
32 }, 32 },
33 }, 33 },
34 34
35 /** @type {?HTMLElement} The scrolling container. */ 35 /** @type {?HTMLElement} The scrolling container. */
36 scroller: null, 36 scroller: null,
37 37
38 listeners: { 38 listeners: {'neon-animation-finish': 'onNeonAnimationFinish_'},
39 'neon-animation-finish': 'onNeonAnimationFinish_'
40 },
41 39
42 /** @override */ 40 /** @override */
43 attached: function() { 41 attached: function() {
44 this.scroller = this.domHost ? this.domHost.parentNode : document.body; 42 this.scroller = this.domHost ? this.domHost.parentNode : document.body;
45 }, 43 },
46 44
47 /** 45 /**
48 * Remove the is-animating attribute once the animation is complete. 46 * Remove the is-animating attribute once the animation is complete.
49 * This may catch animations finishing more often than needed, which is not 47 * This may catch animations finishing more often than needed, which is not
50 * known to cause any issues (e.g. when animating from a shallower page to a 48 * known to cause any issues (e.g. when animating from a shallower page to a
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 return /** @type {?SettingsSectionElement} */( 347 return /** @type {?SettingsSectionElement} */(
350 this.$$('settings-section[section="' + section + '"]')); 348 this.$$('settings-section[section="' + section + '"]'));
351 }, 349 },
352 }; 350 };
353 351
354 /** @polymerBehavior */ 352 /** @polymerBehavior */
355 var MainPageBehavior = [ 353 var MainPageBehavior = [
356 settings.RouteObserverBehavior, 354 settings.RouteObserverBehavior,
357 MainPageBehaviorImpl, 355 MainPageBehaviorImpl,
358 ]; 356 ];
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/route.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698