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

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

Issue 2557113004: Seperate reloads when reporting previews infobar dismissal (Closed)
Patch Set: rebase fix Created 3 years, 12 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 | « no previous file | 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 18 matching lines...) Expand all
29 29
30 typedef base::Callback<void(bool opt_out)> OnDismissPreviewsInfobarCallback; 30 typedef base::Callback<void(bool opt_out)> OnDismissPreviewsInfobarCallback;
31 31
32 // Actions on the previews infobar. This enum must remain synchronized with 32 // Actions on the previews infobar. This enum must remain synchronized with
33 // the enum of the same name in metrics/histograms/histograms.xml. 33 // the enum of the same name in metrics/histograms/histograms.xml.
34 enum PreviewsInfoBarAction { 34 enum PreviewsInfoBarAction {
35 INFOBAR_SHOWN = 0, 35 INFOBAR_SHOWN = 0,
36 INFOBAR_LOAD_ORIGINAL_CLICKED = 1, 36 INFOBAR_LOAD_ORIGINAL_CLICKED = 1,
37 INFOBAR_DISMISSED_BY_USER = 2, 37 INFOBAR_DISMISSED_BY_USER = 2,
38 INFOBAR_DISMISSED_BY_NAVIGATION = 3, 38 INFOBAR_DISMISSED_BY_NAVIGATION = 3,
39 INFOBAR_DISMISSED_BY_RELOAD = 4,
39 INFOBAR_INDEX_BOUNDARY 40 INFOBAR_INDEX_BOUNDARY
40 }; 41 };
41 42
42 ~PreviewsInfoBarDelegate() override; 43 ~PreviewsInfoBarDelegate() override;
43 44
44 // Creates a preview infobar and corresponding delegate and adds the infobar 45 // Creates a preview infobar and corresponding delegate and adds the infobar
45 // to InfoBarService. 46 // to InfoBarService.
46 static void Create( 47 static void Create(
47 content::WebContents* web_contents, 48 content::WebContents* web_contents,
48 PreviewsInfoBarType infobar_type, 49 PreviewsInfoBarType infobar_type,
(...skipping 20 matching lines...) Expand all
69 PreviewsInfoBarType infobar_type_; 70 PreviewsInfoBarType infobar_type_;
70 71
71 const base::string16 message_text_; 72 const base::string16 message_text_;
72 73
73 OnDismissPreviewsInfobarCallback on_dismiss_callback_; 74 OnDismissPreviewsInfobarCallback on_dismiss_callback_;
74 75
75 DISALLOW_COPY_AND_ASSIGN(PreviewsInfoBarDelegate); 76 DISALLOW_COPY_AND_ASSIGN(PreviewsInfoBarDelegate);
76 }; 77 };
77 78
78 #endif // CHROME_BROWSER_PREVIEWS_PREVIEWS_INFOBAR_DELEGATE_H_ 79 #endif // CHROME_BROWSER_PREVIEWS_PREVIEWS_INFOBAR_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/previews/previews_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698