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