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

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: Addressed reviewer's comments & changed default values of history result 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',
7
8 properties: {
9 // The date of these history items.
10 historyDate: {
11 type: String,
12 value: ''
13 },
Dan Beam 2016/01/27 03:07:30 nit: \n between props
yingran 2016/01/27 05:05:03 Done.
Dan Beam 2016/01/27 18:20:07 (not yet done)
yingran 2016/01/28 00:51:00 Done.
14 // The list of history results that were accessed for a particular day in
15 // reverse chronological order.
16 historyItems: {
17 type: Array,
18 value: function() { return []; }
19 }
20 },
21
22 /**
23 * Check whether the time difference between the given historyItem and the
24 * next one is large enough for a spacer to be required.
25 * @param {number} index The index number of the first item being compared.
26 * @return {boolean} Whether or not time gap separator is required.
27 * @private
28 */
29 needsTimeGap_: function(index) {
30 var items = this.historyItems;
31 return index + 1 < items.length &&
32 items[index].time - items[index + 1].time > BROWSING_GAP_TIME;
33 }
34 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698