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

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

Issue 2256383002: Add PreviewsInfoBarTabHelper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@newLoFiInfoBarWithoutPercent
Patch Set: Created 4 years, 3 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 2016 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 #ifndef CHROME_BROWSER_PREVIEWS_PREVIEWS_INFOBAR_TAB_HELPER_H_
6 #define CHROME_BROWSER_PREVIEWS_PREVIEWS_INFOBAR_TAB_HELPER_H_
7
8 #include "base/macros.h"
9 #include "content/public/browser/web_contents_observer.h"
10 #include "content/public/browser/web_contents_user_data.h"
11
12 class GURL;
13
14 namespace content {
15 class RenderFrameHost;
16 }
17
18 class PreviewsInfoBarTabHelper
19 : public content::WebContentsObserver,
20 public content::WebContentsUserData<PreviewsInfoBarTabHelper> {
21 public:
22 ~PreviewsInfoBarTabHelper() override;
23
24 // Indicates whether the InfoBar for Data Reduction Proxy preview has been
25 // shown for the page.
26 bool DisplayedPreviewInfoBar() const;
27 void SetDisplayedPreviewInfoBar(bool displayed);
28
29 private:
30 friend class content::WebContentsUserData<PreviewsInfoBarTabHelper>;
31
32 explicit PreviewsInfoBarTabHelper(content::WebContents* web_contents);
33
34 // Overridden from content::WebContentsObserver:
35 void DidStartProvisionalLoadForFrame(
36 content::RenderFrameHost* render_frame_host,
37 const GURL& validated_url,
38 bool is_error_page,
39 bool is_iframe_srcdoc) override;
40 void DidFinishNavigation(
41 content::NavigationHandle* navigation_handle) override;
42
43 // True if the InfoBar for Data Reduction Proxy preview has been shown for
44 // the page.
45 bool displayed_preview_infobar_;
46
47 DISALLOW_COPY_AND_ASSIGN(PreviewsInfoBarTabHelper);
48 };
49
50 #endif // CHROME_BROWSER_PREVIEWS_PREVIEWS_INFOBAR_TAB_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698