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

Unified Diff: chrome/browser/ui/content_settings/content_setting_bubble_model.h

Issue 1025503002: Use same base class for popup and plugin blocking UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use actual types in for loops instead of auto Created 5 years, 9 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/ui/content_settings/content_setting_bubble_model.h
diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model.h b/chrome/browser/ui/content_settings/content_setting_bubble_model.h
index 81ccd9e39e02531c026eecd2d91f9fee2478ee6a..b6b9f7b19520efe47a9d66d3b5452667ae5f6ccf 100644
--- a/chrome/browser/ui/content_settings/content_setting_bubble_model.h
+++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.h
@@ -34,15 +34,19 @@ class ContentSettingBubbleModel : public content::NotificationObserver {
public:
typedef ContentSettingBubbleModelDelegate Delegate;
- struct PopupItem {
- PopupItem(const gfx::Image& image, const std::string& title, int32 popup_id)
- : image(image), title(title), popup_id(popup_id) {}
+ struct ListItem {
+ ListItem(const gfx::Image& image,
+ const std::string& title,
+ bool has_link,
+ int32 item_id)
+ : image(image), title(title), has_link(has_link), item_id(item_id) {}
gfx::Image image;
std::string title;
- int32 popup_id;
+ bool has_link;
+ int32 item_id;
};
- typedef std::vector<PopupItem> PopupItems;
+ typedef std::vector<ListItem> ListItems;
typedef std::vector<std::string> RadioItems;
struct RadioGroup {
@@ -79,8 +83,7 @@ class ContentSettingBubbleModel : public content::NotificationObserver {
~BubbleContent();
std::string title;
- base::string16 plugin_names;
- PopupItems popup_items;
+ ListItems list_items;
RadioGroup radio_group;
bool radio_group_enabled;
std::vector<DomainList> domain_lists;
@@ -112,7 +115,7 @@ class ContentSettingBubbleModel : public content::NotificationObserver {
const content::NotificationDetails& details) override;
virtual void OnRadioClicked(int radio_index) {}
- virtual void OnPopupClicked(int index) {}
+ virtual void OnListItemClicked(int index) {}
virtual void OnCustomLinkClicked() {}
virtual void OnManageLinkClicked() {}
virtual void OnLearnMoreLinkClicked() {}
@@ -133,11 +136,8 @@ class ContentSettingBubbleModel : public content::NotificationObserver {
Profile* profile() const { return profile_; }
void set_title(const std::string& title) { bubble_content_.title = title; }
- void set_plugin_names(const base::string16& plugin_names) {
- bubble_content_.plugin_names = plugin_names;
- }
- void add_popup(const PopupItem& popup) {
- bubble_content_.popup_items.push_back(popup);
+ void add_list_item(const ListItem& item) {
+ bubble_content_.list_items.push_back(item);
}
void set_radio_group(const RadioGroup& radio_group) {
bubble_content_.radio_group = radio_group;
@@ -213,8 +213,7 @@ class ContentSettingRPHBubbleModel : public ContentSettingTitleAndLinkModel {
ContentSettingRPHBubbleModel(Delegate* delegate,
content::WebContents* web_contents,
Profile* profile,
- ProtocolHandlerRegistry* registry,
- ContentSettingsType content_type);
+ ProtocolHandlerRegistry* registry);
void OnRadioClicked(int radio_index) override;
void OnDoneClicked() override;

Powered by Google App Engine
This is Rietveld 408576698