| 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-app', | 6 is: 'history-app', |
| 7 | 7 |
| 8 properties: { | 8 properties: { |
| 9 showSidebarFooter: Boolean, | 9 showSidebarFooter: Boolean, |
| 10 | 10 |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 break; | 159 break; |
| 160 case 'slash-command': | 160 case 'slash-command': |
| 161 e.canExecute = !this.$.toolbar.searchBar.isSearchFocused(); | 161 e.canExecute = !this.$.toolbar.searchBar.isSearchFocused(); |
| 162 break; | 162 break; |
| 163 case 'delete-command': | 163 case 'delete-command': |
| 164 e.canExecute = this.$.toolbar.count > 0; | 164 e.canExecute = this.$.toolbar.count > 0; |
| 165 break; | 165 break; |
| 166 } | 166 } |
| 167 }, | 167 }, |
| 168 | 168 |
| 169 /** @private */ | |
| 170 onDrawerFocus_: function() { | |
| 171 var sideBar = this.$$('#drawer-side-bar'); | |
| 172 if (sideBar) | |
| 173 sideBar.focusCurrentPage(); | |
| 174 }, | |
| 175 | |
| 176 /** | 169 /** |
| 177 * @param {string} searchTerm | 170 * @param {string} searchTerm |
| 178 * @private | 171 * @private |
| 179 */ | 172 */ |
| 180 searchTermChanged_: function(searchTerm) { | 173 searchTermChanged_: function(searchTerm) { |
| 181 this.set('queryParams_.q', searchTerm || null); | 174 this.set('queryParams_.q', searchTerm || null); |
| 182 this.$['history'].queryHistory(false); | 175 this.$['history'].queryHistory(false); |
| 183 }, | 176 }, |
| 184 | 177 |
| 185 /** | 178 /** |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 return selectedPage; | 269 return selectedPage; |
| 277 }, | 270 }, |
| 278 | 271 |
| 279 /** @private */ | 272 /** @private */ |
| 280 closeDrawer_: function() { | 273 closeDrawer_: function() { |
| 281 var drawer = this.$$('#drawer'); | 274 var drawer = this.$$('#drawer'); |
| 282 if (drawer) | 275 if (drawer) |
| 283 drawer.close(); | 276 drawer.close(); |
| 284 }, | 277 }, |
| 285 }); | 278 }); |
| OLD | NEW |