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

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

Issue 2684693004: MD History: Remove list-container and list-behavior (Closed)
Patch Set: Fix test 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..1bc8b0ce1548c4de6183d1523c3ae3f1d35bde83 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);
},
/**
@@ -242,7 +240,7 @@ Polymer({
onCommand_: function(e) {
if (e.command.id == 'find-command' || e.command.id == 'slash-command')
this.focusToolbarSearchField();
- else if (e.command.id == 'delete-command')
calamity 2017/02/21 02:40:06 nit: Did this change for a reason?
tsergeant 2017/02/21 23:24:12 Oh, just me messing up git. Done.
Dan Beam 2017/02/21 23:26:55 fwiw: I liked this ^ version better.
+ if (e.command.id == 'delete-command')
this.deleteSelected();
},
@@ -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;
calamity 2017/02/21 02:40:06 Do we still need this for synced-device-manager? I
tsergeant 2017/02/21 23:24:12 I'm pretty sure that the new version of this funct
- this.scrollTarget =
- this.$.content.selectedItem.getContentScrollTarget();
- this._scrollHandler();
- }.bind(this));
+ this._scrollHandler();
}.bind(this));
this.recordHistoryPageView_();
},

Powered by Google App Engine
This is Rietveld 408576698