Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1326)

Unified Diff: chrome/browser/resources/md_history/list_container.js

Issue 2341923005: MD WebUI: Make cr-lazy-render get() synchronous (Closed)
Patch Set: Simplify test more Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/md_history/list_container.js
diff --git a/chrome/browser/resources/md_history/list_container.js b/chrome/browser/resources/md_history/list_container.js
index 1ccf05c45ee354ec69f40e2f127a3b0badff3649..24a66c7a87a09b2a156f3c8e685ba77bdc38e171 100644
--- a/chrome/browser/resources/md_history/list_container.js
+++ b/chrome/browser/resources/md_history/list_container.js
@@ -123,9 +123,7 @@ Polymer({
browserService.recordAction('RemoveSelected');
if (this.queryState.searchTerm != '')
browserService.recordAction('SearchResultRemove');
- this.$.dialog.get().then(function(dialog) {
- dialog.showModal();
- });
+ this.$.dialog.get().showModal();
},
/**
@@ -202,15 +200,12 @@ Polymer({
* Opens the overflow menu unless the menu is already open and the same button
* is pressed.
* @param {{detail: {item: !HistoryEntry, target: !HTMLElement}}} e
- * @return {Promise<Element>}
* @private
*/
toggleMenu_: function(e) {
var target = e.detail.target;
- return this.$.sharedMenu.get().then(function(menu) {
- /** @type {CrSharedMenuElement} */(menu).toggleMenu(
- target, e.detail);
- });
+ var menu = /** @type {CrSharedMenuElement} */this.$.sharedMenu.get();
+ menu.toggleMenu(target, e.detail);
},
/** @private */

Powered by Google App Engine
This is Rietveld 408576698