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

Unified Diff: chrome/browser/previews/previews_infobar_delegate.h

Issue 2956733002: Add 'Updated just now' timestamp to the Previews infobar (Closed)
Patch Set: Created 3 years, 6 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/previews/previews_infobar_delegate.h
diff --git a/chrome/browser/previews/previews_infobar_delegate.h b/chrome/browser/previews/previews_infobar_delegate.h
index 09ccb4931b2aedbbbeac53e7ded678ca49586941..ae14d8ed40b92ae98e0561db1d78a2b61febb8e8 100644
--- a/chrome/browser/previews/previews_infobar_delegate.h
+++ b/chrome/browser/previews/previews_infobar_delegate.h
@@ -11,6 +11,8 @@
#include "components/infobars/core/confirm_infobar_delegate.h"
#include "components/previews/core/previews_experiments.h"
+class PreviewsInfoBarTabHelper;
+
namespace content {
class WebContents;
}
@@ -43,6 +45,7 @@ class PreviewsInfoBarDelegate : public ConfirmInfoBarDelegate {
TIMESTAMP_NOT_SHOWN_PREVIEW_NOT_STALE = 1,
TIMESTAMP_NOT_SHOWN_STALENESS_NEGATIVE = 2,
TIMESTAMP_NOT_SHOWN_STALENESS_GREATER_THAN_MAX = 3,
+ TIMESTAMP_UPDATED_NOW_SHOWN = 4,
TIMESTAMP_INDEX_BOUNDARY
};
@@ -55,6 +58,7 @@ class PreviewsInfoBarDelegate : public ConfirmInfoBarDelegate {
previews::PreviewsType previews_type,
base::Time previews_freshness,
bool is_data_saver_user,
+ bool is_reload,
const OnDismissPreviewsInfobarCallback& on_dismiss_callback);
// ConfirmInfoBarDelegate overrides:
@@ -66,10 +70,11 @@ class PreviewsInfoBarDelegate : public ConfirmInfoBarDelegate {
private:
PreviewsInfoBarDelegate(
- content::WebContents* web_contents,
+ PreviewsInfoBarTabHelper* infobar_tab_helper,
previews::PreviewsType previews_type,
base::Time previews_freshness,
bool is_data_saver_user,
+ bool is_reload,
const OnDismissPreviewsInfobarCallback& on_dismiss_callback);
// ConfirmInfoBarDelegate overrides:
@@ -79,10 +84,12 @@ class PreviewsInfoBarDelegate : public ConfirmInfoBarDelegate {
int GetButtons() const override;
bool LinkClicked(WindowOpenDisposition disposition) override;
+ PreviewsInfoBarTabHelper* infobar_tab_helper_;
tbansal1 2017/06/23 23:13:31 Is this guaranteed to be non-null? May be add a co
megjablon 2017/06/23 23:39:24 Added a check in GetTimestampText instead. With th
previews::PreviewsType previews_type_;
// The time at which the preview associated with this infobar was created. A
// value of zero means that the creation time is unknown.
const base::Time previews_freshness_;
+ const bool is_reload_;
mutable PreviewsInfoBarAction infobar_dismissed_action_;
const base::string16 message_text_;

Powered by Google App Engine
This is Rietveld 408576698