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

Side by Side Diff: chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.h

Issue 143333008: [Android] Remove the "Always show" button for blocked popups if the setting is controlled by policy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue340704a
Patch Set: x Created 6 years, 10 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_UI_ANDROID_CONTENT_SETTINGS_POPUP_BLOCKED_INFOBAR_DELEGAT E_H_ 5 #ifndef CHROME_BROWSER_UI_ANDROID_CONTENT_SETTINGS_POPUP_BLOCKED_INFOBAR_DELEGAT E_H_
6 #define CHROME_BROWSER_UI_ANDROID_CONTENT_SETTINGS_POPUP_BLOCKED_INFOBAR_DELEGAT E_H_ 6 #define CHROME_BROWSER_UI_ANDROID_CONTENT_SETTINGS_POPUP_BLOCKED_INFOBAR_DELEGAT E_H_
7 7
8 #include "chrome/browser/infobars/confirm_infobar_delegate.h" 8 #include "chrome/browser/infobars/confirm_infobar_delegate.h"
9 #include "url/gurl.h"
9 10
10 class InfoBarService; 11 namespace content {
12 class WebContents;
13 } // namespace content
14
15 class HostContentSettingsMap;
11 16
12 class PopupBlockedInfoBarDelegate : public ConfirmInfoBarDelegate { 17 class PopupBlockedInfoBarDelegate : public ConfirmInfoBarDelegate {
13 public: 18 public:
14 // Creates a popup blocked infobar and delegate and adds the infobar to 19 // Creates a popup blocked infobar and delegate and adds the infobar to
15 // |infobar_service|. 20 // |infobar_service|.
16 static void Create(InfoBarService* infobar_service, int num_popups); 21 static void Create(content::WebContents* web_contents, int num_popups);
17 22
18 virtual ~PopupBlockedInfoBarDelegate(); 23 virtual ~PopupBlockedInfoBarDelegate();
19 24
20 private: 25 private:
21 explicit PopupBlockedInfoBarDelegate(int num_popups); 26 PopupBlockedInfoBarDelegate(int num_popups,
27 const GURL& url,
28 HostContentSettingsMap* map);
22 29
23 // ConfirmInfoBarDelegate: 30 // ConfirmInfoBarDelegate:
24 virtual int GetIconID() const OVERRIDE; 31 virtual int GetIconID() const OVERRIDE;
25 virtual PopupBlockedInfoBarDelegate* AsPopupBlockedInfoBarDelegate() OVERRIDE; 32 virtual PopupBlockedInfoBarDelegate* AsPopupBlockedInfoBarDelegate() OVERRIDE;
26 virtual base::string16 GetMessageText() const OVERRIDE; 33 virtual base::string16 GetMessageText() const OVERRIDE;
27 virtual int GetButtons() const OVERRIDE; 34 virtual int GetButtons() const OVERRIDE;
28 virtual base::string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; 35 virtual base::string16 GetButtonLabel(InfoBarButton button) const OVERRIDE;
29 virtual bool Accept() OVERRIDE; 36 virtual bool Accept() OVERRIDE;
30 37
31 int num_popups_; 38 int num_popups_;
39 GURL url_;
40 HostContentSettingsMap* map_;
41 bool can_show_popups_;
32 42
33 DISALLOW_COPY_AND_ASSIGN(PopupBlockedInfoBarDelegate); 43 DISALLOW_COPY_AND_ASSIGN(PopupBlockedInfoBarDelegate);
34 }; 44 };
35 45
36 #endif // CHROME_BROWSER_UI_ANDROID_CONTENT_SETTINGS_POPUP_BLOCKED_INFOBAR_DELE GATE_H_ 46 #endif // CHROME_BROWSER_UI_ANDROID_CONTENT_SETTINGS_POPUP_BLOCKED_INFOBAR_DELE GATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/tab_android.cc ('k') | chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698