| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 * @fileoverview | 6 * @fileoverview |
| 7 * 'settings-menu' shows a menu with a hardcoded set of pages and subpages. | 7 * 'settings-menu' shows a menu with a hardcoded set of pages and subpages. |
| 8 */ | 8 */ |
| 9 Polymer({ | 9 Polymer({ |
| 10 is: 'settings-menu', | 10 is: 'settings-menu', |
| 11 | 11 |
| 12 behaviors: [settings.RouteObserverBehavior], | 12 behaviors: [settings.RouteObserverBehavior], |
| 13 | 13 |
| 14 properties: { | 14 properties: { |
| 15 advancedOpened: { | 15 advancedOpened: { |
| 16 type: Boolean, | 16 type: Boolean, |
| 17 notify: true, | 17 notify: true, |
| 18 }, | 18 }, |
| 19 | 19 |
| 20 /** | 20 /** |
| 21 * Dictionary defining page visibility. | 21 * Dictionary defining page visibility. |
| 22 * @type {!GuestModePageVisibility} | 22 * @type {!GuestModePageVisibility} |
| 23 */ | 23 */ |
| 24 pageVisibility: { | 24 pageVisibility: Object, |
| 25 type: Object, | |
| 26 }, | |
| 27 }, | 25 }, |
| 28 | 26 |
| 29 listeners: { | 27 listeners: { |
| 30 'topMenu.tap': 'onLinkTap_', | 28 'topMenu.tap': 'onLinkTap_', |
| 31 'subMenu.tap': 'onLinkTap_', | 29 'subMenu.tap': 'onLinkTap_', |
| 32 }, | 30 }, |
| 33 | 31 |
| 34 /** @param {!settings.Route} newRoute */ | 32 /** @param {!settings.Route} newRoute */ |
| 35 currentRouteChanged: function(newRoute) { | 33 currentRouteChanged: function(newRoute) { |
| 36 var currentPath = newRoute.path; | 34 var currentPath = newRoute.path; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 | 81 |
| 84 /** | 82 /** |
| 85 * @param {boolean} opened Whether the menu is expanded. | 83 * @param {boolean} opened Whether the menu is expanded. |
| 86 * @return {string} Which icon to use. | 84 * @return {string} Which icon to use. |
| 87 * @private | 85 * @private |
| 88 * */ | 86 * */ |
| 89 arrowState_: function(opened) { | 87 arrowState_: function(opened) { |
| 90 return opened ? 'cr:arrow-drop-up' : 'cr:arrow-drop-down'; | 88 return opened ? 'cr:arrow-drop-up' : 'cr:arrow-drop-down'; |
| 91 }, | 89 }, |
| 92 }); | 90 }); |
| OLD | NEW |