OLD | NEW |
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 properties: { | 8 properties: { |
9 selectedPage: {type: String, notify: true}, | 9 selectedPage: {type: String, notify: true}, |
10 | 10 |
11 route: Object, | 11 route: Object, |
12 | 12 |
13 showFooter: Boolean, | 13 showFooter: Boolean, |
14 | 14 |
15 // If true, the sidebar is contained within an app-drawer. | 15 // If true, the sidebar is contained within an app-drawer. |
16 drawer: {type: Boolean, reflectToAttribute: true}, | 16 drawer: {type: Boolean, reflectToAttribute: true}, |
17 }, | 17 }, |
18 | 18 |
19 /** | 19 /** |
20 * @private | 20 * @private |
21 */ | 21 */ |
22 onSelectorActivate_: function() { this.fire('history-close-drawer'); }, | 22 onSelectorActivate_: function() { this.fire('history-close-drawer'); }, |
23 | 23 |
24 /** | 24 /** |
25 * Relocates the user to the clear browsing data section of the settings page. | 25 * Relocates the user to the clear browsing data section of the settings page. |
26 * @param {Event} e | 26 * @param {Event} e |
27 * @private | 27 * @private |
28 */ | 28 */ |
29 onClearBrowsingDataTap_: function(e) { | 29 onClearBrowsingDataTap_: function(e) { |
30 md_history.BrowserService.getInstance().recordAction( | 30 var browserService = md_history.BrowserService.getInstance(); |
31 'HistoryPage_InitClearBrowsingData'); | 31 browserService.getInstance().recordAction('InitClearBrowsingData'); |
32 md_history.BrowserService.getInstance().openClearBrowsingData(); | 32 browserService.openClearBrowsingData(); |
33 e.preventDefault(); | 33 e.preventDefault(); |
34 }, | 34 }, |
35 | 35 |
36 /** | 36 /** |
37 * @param {Object} route | 37 * @param {Object} route |
38 * @private | 38 * @private |
39 */ | 39 */ |
40 getQueryString_: function(route) { return window.location.search; } | 40 getQueryString_: function(route) { return window.location.search; } |
41 }); | 41 }); |
OLD | NEW |