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

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

Issue 2684693004: MD History: Remove list-container and list-behavior (Closed)
Patch Set: Rename listeners Created 3 years, 10 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/app.js
diff --git a/chrome/browser/resources/md_history/app.js b/chrome/browser/resources/md_history/app.js
index afe3b04132b292737fe7af6cf43828280e16731e..e13e57a31efc2a4cc4e904c4035e0db279c0ad7c 100644
--- a/chrome/browser/resources/md_history/app.js
+++ b/chrome/browser/resources/md_history/app.js
@@ -176,7 +176,7 @@ Polymer({
*/
checkboxSelected: function(e) {
var toolbar = /** @type {HistoryToolbarElement} */ (this.$.toolbar);
- toolbar.count = /** @type {HistoryListContainerElement} */ (this.$.history)
+ toolbar.count = /** @type {HistoryListElement} */ (this.$.history)
.getSelectedItemCount();
},
@@ -186,10 +186,9 @@ Polymer({
* @private
*/
unselectAll: function() {
- var listContainer =
- /** @type {HistoryListContainerElement} */ (this.$.history);
+ var list = /** @type {HistoryListElement} */ (this.$.history);
var toolbar = /** @type {HistoryToolbarElement} */ (this.$.toolbar);
- listContainer.unselectAllItems(toolbar.count);
+ list.unselectAllItems();
toolbar.count = 0;
},
@@ -206,9 +205,8 @@ Polymer({
this.set('queryState_.querying', false);
this.set('queryResult_.info', info);
this.set('queryResult_.results', results);
- var listContainer =
- /** @type {HistoryListContainerElement} */ (this.$['history']);
- listContainer.historyResult(info, results);
+ var list = /** @type {HistoryListElement} */ (this.$['history']);
+ list.historyResult(info, results);
},
/**
@@ -311,15 +309,7 @@ Polymer({
// This allows the synced-device-manager to render so that it can be set as
// the scroll target.
requestAnimationFrame(function() {
- md_history.ensureLazyLoaded().then(function() {
- // <iron-pages> can occasionally end up with no item selected during
- // tests.
- if (!this.$.content.selectedItem)
- return;
- this.scrollTarget =
- this.$.content.selectedItem.getContentScrollTarget();
- this._scrollHandler();
- }.bind(this));
+ this._scrollHandler();
}.bind(this));
this.recordHistoryPageView_();
},
« no previous file with comments | « chrome/browser/resources/md_history/app.html ('k') | chrome/browser/resources/md_history/compiled_resources2.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698