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

Side by Side Diff: chrome/browser/previews/previews_infobar_delegate.h

Issue 2860083003: Add timestamp support to the Previews infobar (Closed)
Patch Set: sync and rebase Created 3 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/previews/previews_infobar_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_PREVIEWS_PREVIEWS_INFOBAR_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_PREVIEWS_PREVIEWS_INFOBAR_DELEGATE_H_
6 #define CHROME_BROWSER_PREVIEWS_PREVIEWS_INFOBAR_DELEGATE_H_ 6 #define CHROME_BROWSER_PREVIEWS_PREVIEWS_INFOBAR_DELEGATE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "components/infobars/core/confirm_infobar_delegate.h" 10 #include "components/infobars/core/confirm_infobar_delegate.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 ~PreviewsInfoBarDelegate() override; 46 ~PreviewsInfoBarDelegate() override;
47 47
48 // Creates a preview infobar and corresponding delegate and adds the infobar 48 // Creates a preview infobar and corresponding delegate and adds the infobar
49 // to InfoBarService. 49 // to InfoBarService.
50 static void Create( 50 static void Create(
51 content::WebContents* web_contents, 51 content::WebContents* web_contents,
52 PreviewsInfoBarType infobar_type, 52 PreviewsInfoBarType infobar_type,
53 bool is_data_saver_user, 53 bool is_data_saver_user,
54 const OnDismissPreviewsInfobarCallback& on_dismiss_callback); 54 const OnDismissPreviewsInfobarCallback& on_dismiss_callback);
55 55
56 // ConfirmInfoBarDelegate overrides:
57 base::string16 GetMessageText() const override;
58 base::string16 GetLinkText() const override;
59
60 base::string16 GetTimestampText() const;
61
56 private: 62 private:
57 PreviewsInfoBarDelegate( 63 PreviewsInfoBarDelegate(
58 content::WebContents* web_contents, 64 content::WebContents* web_contents,
59 PreviewsInfoBarType infobar_type, 65 PreviewsInfoBarType infobar_type,
60 bool is_data_saver_user, 66 bool is_data_saver_user,
61 const OnDismissPreviewsInfobarCallback& on_dismiss_callback); 67 const OnDismissPreviewsInfobarCallback& on_dismiss_callback);
62 68
63 // ConfirmInfoBarDelegate overrides: 69 // ConfirmInfoBarDelegate overrides:
64 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; 70 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
65 int GetIconId() const override; 71 int GetIconId() const override;
66 bool ShouldExpire(const NavigationDetails& details) const override; 72 bool ShouldExpire(const NavigationDetails& details) const override;
67 void InfoBarDismissed() override; 73 void InfoBarDismissed() override;
68 base::string16 GetMessageText() const override;
69 int GetButtons() const override; 74 int GetButtons() const override;
70 base::string16 GetLinkText() const override;
71 bool LinkClicked(WindowOpenDisposition disposition) override; 75 bool LinkClicked(WindowOpenDisposition disposition) override;
72 76
73 PreviewsInfoBarType infobar_type_; 77 PreviewsInfoBarType infobar_type_;
74 mutable PreviewsInfoBarAction infobar_dismissed_action_; 78 mutable PreviewsInfoBarAction infobar_dismissed_action_;
75 79
76 const base::string16 message_text_; 80 const base::string16 message_text_;
77 81
78 OnDismissPreviewsInfobarCallback on_dismiss_callback_; 82 OnDismissPreviewsInfobarCallback on_dismiss_callback_;
79 83
80 DISALLOW_COPY_AND_ASSIGN(PreviewsInfoBarDelegate); 84 DISALLOW_COPY_AND_ASSIGN(PreviewsInfoBarDelegate);
81 }; 85 };
82 86
83 #endif // CHROME_BROWSER_PREVIEWS_PREVIEWS_INFOBAR_DELEGATE_H_ 87 #endif // CHROME_BROWSER_PREVIEWS_PREVIEWS_INFOBAR_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/previews/previews_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698