Chromium Code Reviews| 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: |
| 10 type: String, | 10 {type: String, notify: true}, |
|
tsergeant
2016/08/15 07:05:17
No need for a newline here
calamity
2016/08/17 03:15:29
Done.
| |
| 11 notify: true | |
| 12 }, | |
| 13 | 11 |
| 14 route: Object, | 12 route: Object, |
| 15 | 13 |
| 16 showFooter: Boolean, | 14 showFooter: Boolean, |
| 17 | 15 |
| 18 // If true, the sidebar is contained within an app-drawer. | 16 // If true, the sidebar is contained within an app-drawer. |
| 19 drawer: { | 17 drawer: {type: Boolean, reflectToAttribute: true}, |
| 20 type: Boolean, | |
| 21 reflectToAttribute: true | |
| 22 }, | |
| 23 }, | 18 }, |
| 24 | 19 |
| 25 /** @private */ | 20 /** |
| 26 onSelectorActivate_: function() { | 21 * @param {Event} e |
| 22 * @private | |
| 23 */ | |
| 24 onSelectorActivate_: function(e) { | |
|
tsergeant
2016/08/15 07:05:18
No need to add the e parameter here.
calamity
2016/08/17 03:15:29
Done.
| |
| 27 this.fire('history-close-drawer'); | 25 this.fire('history-close-drawer'); |
| 28 }, | 26 }, |
| 29 | 27 |
| 30 /** | 28 /** |
| 31 * Relocates the user to the clear browsing data section of the settings page. | 29 * Relocates the user to the clear browsing data section of the settings page. |
| 32 * @param {Event} e | 30 * @param {Event} e |
| 33 * @private | 31 * @private |
| 34 */ | 32 */ |
| 35 onClearBrowsingDataTap_: function(e) { | 33 onClearBrowsingDataTap_: function(e) { |
| 34 md_history.BrowserService.getInstance().recordAction( | |
| 35 ['HistoryPage_InitClearBrowsingData']); | |
| 36 md_history.BrowserService.getInstance().openClearBrowsingData(); | 36 md_history.BrowserService.getInstance().openClearBrowsingData(); |
| 37 e.preventDefault(); | 37 e.preventDefault(); |
| 38 }, | 38 }, |
| 39 | 39 |
| 40 /** | 40 /** |
| 41 * @param {Object} route | 41 * @param {Object} route |
| 42 * @private | 42 * @private |
| 43 */ | 43 */ |
| 44 getQueryString_: function(route) { | 44 getQueryString_: function(route) { return window.location.search; } |
| 45 return window.location.search; | |
| 46 } | |
| 47 }); | 45 }); |
| OLD | NEW |