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

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

Issue 1965913003: [MD History] Add grouped history toolbar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cbd_move
Patch Set: Created 4 years, 7 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/history_toolbar.js
diff --git a/chrome/browser/resources/md_history/history_toolbar.js b/chrome/browser/resources/md_history/history_toolbar.js
index db33f9c35c373c290bca4255ca8c7b9305faab38..d5d4bb6d96b5355e243774775e5466838e984cbc 100644
--- a/chrome/browser/resources/md_history/history_toolbar.js
+++ b/chrome/browser/resources/md_history/history_toolbar.js
@@ -43,11 +43,37 @@ Polymer({
value: ''
},
- // True if it's searching at the backend.
+ // True if waiting on the search backend.
searching: {
type: Boolean,
value: false
},
+
+ // Whether domain-grouped history is enabled.
+ isGroupedMode: {
+ type: Boolean,
+ reflectToAttribute: true,
+ observer: 'groupedModeChanged_'
+ },
+
+ // Whether the page is displaying in RTL.
+ isRtl_: {
+ type: Boolean,
+ reflectToAttribute: true
+ },
+
+ // The period to search over. Matches BrowsingHistoryHandler::Range.
+ groupedPeriod: {
+ type: Number,
+ value: 0,
+ reflectToAttribute: true
+ },
+
+ // The start time of the query range.
+ queryStartTime: String,
+
+ // The end time of the query range.
+ queryEndTime: String,
},
/**
@@ -108,5 +134,15 @@ Polymer({
numberOfItemsSelected_: function(count) {
return count > 0 ? loadTimeData.getStringF('itemsSelected', count) : '';
+ },
+
+ groupedModeChanged_: function() {
+ this.isRtl_ = isRTL();
+ },
+
+ getHistoryInterval_: function(queryStartTime, queryEndTime) {
+ // TODO(calamity): Fix the format of these dates.
+ return loadTimeData.getStringF(
+ 'historyInterval', queryStartTime, queryEndTime);
}
});

Powered by Google App Engine
This is Rietveld 408576698