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

Side by Side Diff: chrome/browser/resources/settings/settings_menu/settings_menu.js

Issue 2469393004: MD Settings: Preserve search URL param in subpages. (Closed)
Patch Set: Fix test. Created 4 years, 1 month 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 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',
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 68 }
69 }, 69 },
70 70
71 /** 71 /**
72 * @param {!Event} event 72 * @param {!Event} event
73 * @private 73 * @private
74 */ 74 */
75 openPage_: function(event) { 75 openPage_: function(event) {
76 var route = settings.getRouteForPath(event.currentTarget.dataset.path); 76 var route = settings.getRouteForPath(event.currentTarget.dataset.path);
77 assert(route, 'settings-menu has an an entry with an invalid path'); 77 assert(route, 'settings-menu has an an entry with an invalid path');
78 settings.navigateTo(route); 78 settings.navigateTo(route, null, false);
dschuyler 2016/11/09 23:10:14 I find null, false unclear. Could we do settings.
dpapad 2016/11/09 23:19:16 Done.
79 }, 79 },
80 80
81 /** 81 /**
82 * @param {boolean} opened Whether the menu is expanded. 82 * @param {boolean} opened Whether the menu is expanded.
83 * @return {string} Which icon to use. 83 * @return {string} Which icon to use.
84 * @private 84 * @private
85 * */ 85 * */
86 arrowState_: function(opened) { 86 arrowState_: function(opened) {
87 return opened ? 'settings:arrow-drop-up' : 'cr:arrow-drop-down'; 87 return opened ? 'settings:arrow-drop-up' : 'cr:arrow-drop-down';
88 }, 88 },
89 }); 89 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698