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

Side by Side Diff: chrome/browser/ui/content_settings/content_setting_bubble_model.h

Issue 106713004: Remove kEnableResourceContentSettings and all the code that uses it since it's been behind a flag f… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_CONTENT_SETTINGS_CONTENT_SETTING_BUBBLE_MODEL_H_ 5 #ifndef CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_BUBBLE_MODEL_H_
6 #define CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_BUBBLE_MODEL_H_ 6 #define CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_BUBBLE_MODEL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 struct BubbleContent { 77 struct BubbleContent {
78 BubbleContent(); 78 BubbleContent();
79 ~BubbleContent(); 79 ~BubbleContent();
80 80
81 std::string title; 81 std::string title;
82 PopupItems popup_items; 82 PopupItems popup_items;
83 RadioGroup radio_group; 83 RadioGroup radio_group;
84 bool radio_group_enabled; 84 bool radio_group_enabled;
85 std::vector<DomainList> domain_lists; 85 std::vector<DomainList> domain_lists;
86 std::set<std::string> resource_identifiers;
87 std::string custom_link; 86 std::string custom_link;
88 bool custom_link_enabled; 87 bool custom_link_enabled;
89 std::string manage_link; 88 std::string manage_link;
90 MediaMenuMap media_menus; 89 MediaMenuMap media_menus;
91 90
92 private: 91 private:
93 DISALLOW_COPY_AND_ASSIGN(BubbleContent); 92 DISALLOW_COPY_AND_ASSIGN(BubbleContent);
94 }; 93 };
95 94
96 static ContentSettingBubbleModel* CreateContentSettingBubbleModel( 95 static ContentSettingBubbleModel* CreateContentSettingBubbleModel(
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 } 150 }
152 void set_manage_link(const std::string& link) { 151 void set_manage_link(const std::string& link) {
153 bubble_content_.manage_link = link; 152 bubble_content_.manage_link = link;
154 } 153 }
155 void add_media_menu(content::MediaStreamType type, const MediaMenu& menu) { 154 void add_media_menu(content::MediaStreamType type, const MediaMenu& menu) {
156 bubble_content_.media_menus[type] = menu; 155 bubble_content_.media_menus[type] = menu;
157 } 156 }
158 void set_selected_device(const content::MediaStreamDevice& device) { 157 void set_selected_device(const content::MediaStreamDevice& device) {
159 bubble_content_.media_menus[device.type].selected_device = device; 158 bubble_content_.media_menus[device.type].selected_device = device;
160 } 159 }
161 void AddBlockedResource(const std::string& resource_identifier);
162 160
163 private: 161 private:
164 content::WebContents* web_contents_; 162 content::WebContents* web_contents_;
165 Profile* profile_; 163 Profile* profile_;
166 ContentSettingsType content_type_; 164 ContentSettingsType content_type_;
167 BubbleContent bubble_content_; 165 BubbleContent bubble_content_;
168 // A registrar for listening for WEB_CONTENTS_DESTROYED notifications. 166 // A registrar for listening for WEB_CONTENTS_DESTROYED notifications.
169 content::NotificationRegistrar registrar_; 167 content::NotificationRegistrar registrar_;
170 168
171 DISALLOW_COPY_AND_ASSIGN(ContentSettingBubbleModel); 169 DISALLOW_COPY_AND_ASSIGN(ContentSettingBubbleModel);
172 }; 170 };
173 171
174 class ContentSettingTitleAndLinkModel : public ContentSettingBubbleModel { 172 class ContentSettingTitleAndLinkModel : public ContentSettingBubbleModel {
175 public: 173 public:
176 ContentSettingTitleAndLinkModel(Delegate* delegate, 174 ContentSettingTitleAndLinkModel(Delegate* delegate,
177 content::WebContents* web_contents, 175 content::WebContents* web_contents,
178 Profile* profile, 176 Profile* profile,
179 ContentSettingsType content_type); 177 ContentSettingsType content_type);
180 virtual ~ContentSettingTitleAndLinkModel() {} 178 virtual ~ContentSettingTitleAndLinkModel() {}
181 Delegate* delegate() const { return delegate_; } 179 Delegate* delegate() const { return delegate_; }
182 180
183 private: 181 private:
184 void SetBlockedResources();
185 void SetTitle(); 182 void SetTitle();
186 void SetManageLink(); 183 void SetManageLink();
187 virtual void OnManageLinkClicked() OVERRIDE; 184 virtual void OnManageLinkClicked() OVERRIDE;
188 185
189 Delegate* delegate_; 186 Delegate* delegate_;
190 }; 187 };
191 188
192 class ContentSettingRPHBubbleModel : public ContentSettingTitleAndLinkModel { 189 class ContentSettingRPHBubbleModel : public ContentSettingTitleAndLinkModel {
193 public: 190 public:
194 ContentSettingRPHBubbleModel(Delegate* delegate, 191 ContentSettingRPHBubbleModel(Delegate* delegate,
(...skipping 19 matching lines...) Expand all
214 void IgnoreProtocolHandler(); 211 void IgnoreProtocolHandler();
215 void ClearOrSetPreviousHandler(); 212 void ClearOrSetPreviousHandler();
216 213
217 int selected_item_; 214 int selected_item_;
218 ProtocolHandlerRegistry* registry_; 215 ProtocolHandlerRegistry* registry_;
219 ProtocolHandler pending_handler_; 216 ProtocolHandler pending_handler_;
220 ProtocolHandler previous_handler_; 217 ProtocolHandler previous_handler_;
221 }; 218 };
222 219
223 #endif // CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_BUBBLE_MODEL_H_ 220 #endif // CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_BUBBLE_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698