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

Side by Side Diff: chrome/browser/resources/md_history/side_bar.js

Issue 2352293002: MD History: Replace app-route with a custom router (Closed)
Patch Set: Delete stray newline Created 4 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 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 Polymer({ 5 Polymer({
6 is: 'history-side-bar', 6 is: 'history-side-bar',
7 7
8 behaviors: [Polymer.IronA11yKeysBehavior], 8 behaviors: [Polymer.IronA11yKeysBehavior],
9 9
10 properties: { 10 properties: {
11 selectedPage: {type: String, notify: true}, 11 selectedPage: {type: String, notify: true},
12 12
13 route: Object,
14
15 showFooter: Boolean, 13 showFooter: Boolean,
16 14
17 // If true, the sidebar is contained within an app-drawer. 15 // If true, the sidebar is contained within an app-drawer.
18 drawer: {type: Boolean, reflectToAttribute: true}, 16 drawer: {type: Boolean, reflectToAttribute: true},
19 }, 17 },
20 18
21 keyBindings: { 19 keyBindings: {
22 'space:keydown': 'onSpacePressed_', 20 'space:keydown': 'onSpacePressed_',
23 }, 21 },
24 22
(...skipping 17 matching lines...) Expand all
42 */ 40 */
43 onClearBrowsingDataTap_: function(e) { 41 onClearBrowsingDataTap_: function(e) {
44 var browserService = md_history.BrowserService.getInstance(); 42 var browserService = md_history.BrowserService.getInstance();
45 browserService.recordAction('InitClearBrowsingData'); 43 browserService.recordAction('InitClearBrowsingData');
46 browserService.openClearBrowsingData(); 44 browserService.openClearBrowsingData();
47 /** @type {PaperRippleElement} */(this.$['cbd-ripple']).upAction(); 45 /** @type {PaperRippleElement} */(this.$['cbd-ripple']).upAction();
48 e.preventDefault(); 46 e.preventDefault();
49 }, 47 },
50 48
51 /** 49 /**
52 * @param {Object} route 50 * Prevent clicks on sidebar items from navigating. These are only links for
51 * accessibility purposes, taps are handled separately by <iron-selector>.
53 * @private 52 * @private
54 */ 53 */
55 getQueryString_: function(route) { return window.location.search; } 54 onItemClick_: function(e) {
55 e.preventDefault();
56 },
56 }); 57 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_history/side_bar.html ('k') | chrome/browser/ui/webui/md_history_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698