| 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 /** | 5 /** |
| 6 * @param {!Element} root | 6 * @param {!Element} root |
| 7 * @param {?Element} boundary | 7 * @param {?Element} boundary |
| 8 * @param {cr.ui.FocusRow.Delegate} delegate | 8 * @param {cr.ui.FocusRow.Delegate} delegate |
| 9 * @constructor | 9 * @constructor |
| 10 * @extends {cr.ui.FocusRow} | 10 * @extends {cr.ui.FocusRow} |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 browserService.recordAction('BookmarkStarClicked'); | 251 browserService.recordAction('BookmarkStarClicked'); |
| 252 | 252 |
| 253 this.fire('remove-bookmark-stars', this.item.url); | 253 this.fire('remove-bookmark-stars', this.item.url); |
| 254 }, | 254 }, |
| 255 | 255 |
| 256 /** | 256 /** |
| 257 * Fires a custom event when the menu button is clicked. Sends the details | 257 * Fires a custom event when the menu button is clicked. Sends the details |
| 258 * of the history item and where the menu should appear. | 258 * of the history item and where the menu should appear. |
| 259 */ | 259 */ |
| 260 onMenuButtonTap_: function(e) { | 260 onMenuButtonTap_: function(e) { |
| 261 this.fire('toggle-menu', { | 261 this.fire('open-menu', { |
| 262 target: Polymer.dom(e).localTarget, | 262 target: Polymer.dom(e).localTarget, |
| 263 index: this.index, | 263 index: this.index, |
| 264 item: this.item, | 264 item: this.item, |
| 265 path: this.path, | 265 path: this.path, |
| 266 }); | 266 }); |
| 267 | 267 |
| 268 // Stops the 'tap' event from closing the menu when it opens. | 268 // Stops the 'tap' event from closing the menu when it opens. |
| 269 e.stopPropagation(); | 269 e.stopPropagation(); |
| 270 }, | 270 }, |
| 271 | 271 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 */ | 361 */ |
| 362 HistoryItem.searchResultsTitle = function(numberOfResults, searchTerm) { | 362 HistoryItem.searchResultsTitle = function(numberOfResults, searchTerm) { |
| 363 var resultId = numberOfResults == 1 ? 'searchResult' : 'searchResults'; | 363 var resultId = numberOfResults == 1 ? 'searchResult' : 'searchResults'; |
| 364 return loadTimeData.getStringF( | 364 return loadTimeData.getStringF( |
| 365 'foundSearchResults', numberOfResults, loadTimeData.getString(resultId), | 365 'foundSearchResults', numberOfResults, loadTimeData.getString(resultId), |
| 366 searchTerm); | 366 searchTerm); |
| 367 }; | 367 }; |
| 368 | 368 |
| 369 return {HistoryItem: HistoryItem}; | 369 return {HistoryItem: HistoryItem}; |
| 370 }); | 370 }); |
| OLD | NEW |