| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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-list', | 6 is: 'history-list', |
| 7 | 7 |
| 8 properties: { | 8 properties: { |
| 9 // The search term for the current query. Set when the query returns. | 9 // The search term for the current query. Set when the query returns. |
| 10 searchedTerm: { | 10 searchedTerm: { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 for (var i = 0; i < this.historyData_.length; i++) { | 66 for (var i = 0; i < this.historyData_.length; i++) { |
| 67 if (this.historyData_[i].url == url) | 67 if (this.historyData_[i].url == url) |
| 68 this.set('historyData_.' + i + '.starred', false); | 68 this.set('historyData_.' + i + '.starred', false); |
| 69 } | 69 } |
| 70 }, | 70 }, |
| 71 | 71 |
| 72 /** @private */ | 72 /** @private */ |
| 73 onMoreFromSiteTap_: function() { | 73 onMoreFromSiteTap_: function() { |
| 74 var menu = /** @type {CrSharedMenuElement} */(this.$.sharedMenu); | 74 var menu = /** @type {CrSharedMenuElement} */(this.$.sharedMenu); |
| 75 this.fire('search-domain', {domain: menu.itemData.domain}); | 75 this.fire('search-domain', {domain: menu.itemData.domain}); |
| 76 menu.closeMenu(); | 76 menu.closeMenuNoRefocus(); |
| 77 }, | 77 }, |
| 78 | 78 |
| 79 /** @private */ | 79 /** @private */ |
| 80 onRemoveFromHistoryTap_: function() { | 80 onRemoveFromHistoryTap_: function() { |
| 81 var menu = /** @type {CrSharedMenuElement} */(this.$.sharedMenu); | 81 var menu = /** @type {CrSharedMenuElement} */(this.$.sharedMenu); |
| 82 md_history.BrowserService.getInstance() | 82 md_history.BrowserService.getInstance() |
| 83 .deleteItems([menu.itemData]) | 83 .deleteItems([menu.itemData]) |
| 84 .then(function(items) { | 84 .then(function(items) { |
| 85 this.removeDeletedHistory_(items); | 85 this.removeDeletedHistory_(items); |
| 86 // This unselect-all is to reset the toolbar when deleting a selected | 86 // This unselect-all is to reset the toolbar when deleting a selected |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 | 265 |
| 266 /** | 266 /** |
| 267 * @param {number} index | 267 * @param {number} index |
| 268 * @return {boolean} | 268 * @return {boolean} |
| 269 * @private | 269 * @private |
| 270 */ | 270 */ |
| 271 isFirstItem_: function(index) { | 271 isFirstItem_: function(index) { |
| 272 return index == 0; | 272 return index == 0; |
| 273 } | 273 } |
| 274 }); | 274 }); |
| OLD | NEW |