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

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

Issue 126143002: Disable the "run all plugins" link on the plugins settings bubble if the setting is managed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix indentation. Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/content_settings/content_setting_bubble_model.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 (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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 } 150 }
151 void set_manage_link(const std::string& link) { 151 void set_manage_link(const std::string& link) {
152 bubble_content_.manage_link = link; 152 bubble_content_.manage_link = link;
153 } 153 }
154 void add_media_menu(content::MediaStreamType type, const MediaMenu& menu) { 154 void add_media_menu(content::MediaStreamType type, const MediaMenu& menu) {
155 bubble_content_.media_menus[type] = menu; 155 bubble_content_.media_menus[type] = menu;
156 } 156 }
157 void set_selected_device(const content::MediaStreamDevice& device) { 157 void set_selected_device(const content::MediaStreamDevice& device) {
158 bubble_content_.media_menus[device.type].selected_device = device; 158 bubble_content_.media_menus[device.type].selected_device = device;
159 } 159 }
160 bool setting_is_managed() {
161 return setting_is_managed_;
162 }
163 void set_setting_is_managed(bool managed) {
164 setting_is_managed_ = managed;
165 }
160 166
161 private: 167 private:
162 content::WebContents* web_contents_; 168 content::WebContents* web_contents_;
163 Profile* profile_; 169 Profile* profile_;
164 ContentSettingsType content_type_; 170 ContentSettingsType content_type_;
165 BubbleContent bubble_content_; 171 BubbleContent bubble_content_;
166 // A registrar for listening for WEB_CONTENTS_DESTROYED notifications. 172 // A registrar for listening for WEB_CONTENTS_DESTROYED notifications.
167 content::NotificationRegistrar registrar_; 173 content::NotificationRegistrar registrar_;
174 // A flag that indicates if the content setting is managed and can't be
Bernhard Bauer 2014/01/07 18:54:05 "managed" == "can't be controlled by the user", ri
markusheintz_ 2014/01/08 08:24:36 Good point. I replaced "and" with "i.e". Thanks fo
175 // controlled by the user.
176 bool setting_is_managed_;
168 177
169 DISALLOW_COPY_AND_ASSIGN(ContentSettingBubbleModel); 178 DISALLOW_COPY_AND_ASSIGN(ContentSettingBubbleModel);
170 }; 179 };
171 180
172 class ContentSettingTitleAndLinkModel : public ContentSettingBubbleModel { 181 class ContentSettingTitleAndLinkModel : public ContentSettingBubbleModel {
173 public: 182 public:
174 ContentSettingTitleAndLinkModel(Delegate* delegate, 183 ContentSettingTitleAndLinkModel(Delegate* delegate,
175 content::WebContents* web_contents, 184 content::WebContents* web_contents,
176 Profile* profile, 185 Profile* profile,
177 ContentSettingsType content_type); 186 ContentSettingsType content_type);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 void IgnoreProtocolHandler(); 220 void IgnoreProtocolHandler();
212 void ClearOrSetPreviousHandler(); 221 void ClearOrSetPreviousHandler();
213 222
214 int selected_item_; 223 int selected_item_;
215 ProtocolHandlerRegistry* registry_; 224 ProtocolHandlerRegistry* registry_;
216 ProtocolHandler pending_handler_; 225 ProtocolHandler pending_handler_;
217 ProtocolHandler previous_handler_; 226 ProtocolHandler previous_handler_;
218 }; 227 };
219 228
220 #endif // CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_BUBBLE_MODEL_H_ 229 #endif // CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_BUBBLE_MODEL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/content_settings/content_setting_bubble_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698