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

Side by Side Diff: chrome/browser/resources/md_history/history-card.js

Issue 1574063003: MD History: Add basic material design history cards and history items (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 Polymer({
6 is: 'history-card',
Dan Beam 2016/01/16 02:54:36 nit: \n
yingran 2016/01/18 05:40:29 Done.
7 properties: {
8 // The date of these history items.
9 historyDate: {
10 type: String,
11 value: ''
12 },
13 // The list of history results that were accessed for a particular day in
14 // reverse chronological order.
15 historyItems: {
16 type: Array,
17 value: []
Dan Beam 2016/01/16 02:54:36 this should be: value: function() { return [];
yingran 2016/01/18 05:40:29 Done.
18 }
19 },
20
21 /**
22 * Check whether the time difference between the given historyItem and the
23 * next one is large enough for a spacer to be required.
24 * @param {number} index The index number of the first item being compared.
25 * @return {boolean} Whether or not time gap separator is required.
26 * @private
27 */
28 needsTimeGap_: function(index) {
29 var items = this.historyItems;
30 return ((index + 1 < items.length) &&
31 (items[index].time - items[index + 1].time > BROWSING_GAP_TIME));
Dan Beam 2016/01/16 02:54:36 isn't this equivalent to return index + 1 < items
yingran 2016/01/18 05:40:29 yep
32 }
33 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698