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

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

Issue 2076193003: [MD settings] Remove old side nav code; remove extra toolbar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reveiw nit Created 4 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
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-ui' implements the UI for the Settings page. 7 * 'settings-ui' implements the UI for the Settings page.
8 * 8 *
9 * Example: 9 * Example:
10 * 10 *
(...skipping 10 matching lines...) Expand all
21 prefs: Object, 21 prefs: Object,
22 22
23 /** @type {?settings.DirectionDelegate} */ 23 /** @type {?settings.DirectionDelegate} */
24 directionDelegate: { 24 directionDelegate: {
25 observer: 'directionDelegateChanged_', 25 observer: 'directionDelegateChanged_',
26 type: Object, 26 type: Object,
27 }, 27 },
28 }, 28 },
29 29
30 listeners: { 30 listeners: {
31 'sideNav.iron-select': 'onIronSelect_', 31 'sideNav.iron-activate': 'onIronActivate_',
32 'paper-responsive-change': 'onPaperResponsiveChange_',
33 }, 32 },
34 33
35 /** 34 /**
36 * @param {!CustomEvent} e 35 * @param {!CustomEvent} e
37 * @private 36 * @private
38 */ 37 */
39 onIronSelect_: function(e) { 38 onIronActivate_: function(e) {
Dan Beam 2016/06/17 23:38:38 nit: if you don't use |e|, arguably remove it and
dschuyler 2016/06/17 23:57:46 Done.
40 if (Polymer.dom(e).path.indexOf(this.$.panel) >= 0) { 39 this.$.panel.closeDrawer();
41 this.classList.remove('narrowing');
42 this.$.panel.closeDrawer();
43 }
44 },
45
46 /**
47 * @param {!CustomEvent} e
48 * @private
49 */
50 onPaperResponsiveChange_: function(e) {
51 if (Polymer.dom(e).rootTarget == this.$.panel)
52 this.classList.toggle('narrowing', e.detail.narrow);
53 }, 40 },
54 41
55 /** @private */ 42 /** @private */
56 directionDelegateChanged_: function() { 43 directionDelegateChanged_: function() {
57 this.$.panel.rightDrawer = this.directionDelegate.isRtl(); 44 this.$.panel.rightDrawer = this.directionDelegate.isRtl();
58 }, 45 },
59 }); 46 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698