OLD | NEW |
---|---|
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 Loading... | |
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 managed_setting() { return managed_setting_; } | |
Bernhard Bauer
2014/01/07 18:08:00
Nit: Can you put the method body on a new line?
markusheintz_
2014/01/07 18:42:22
Done.
| |
161 void set_managed_setting(bool managed) { | |
162 managed_setting_ = managed; | |
163 } | |
160 | 164 |
161 private: | 165 private: |
162 content::WebContents* web_contents_; | 166 content::WebContents* web_contents_; |
163 Profile* profile_; | 167 Profile* profile_; |
164 ContentSettingsType content_type_; | 168 ContentSettingsType content_type_; |
165 BubbleContent bubble_content_; | 169 BubbleContent bubble_content_; |
166 // A registrar for listening for WEB_CONTENTS_DESTROYED notifications. | 170 // A registrar for listening for WEB_CONTENTS_DESTROYED notifications. |
167 content::NotificationRegistrar registrar_; | 171 content::NotificationRegistrar registrar_; |
172 bool managed_setting_; | |
Bernhard Bauer
2014/01/07 18:08:00
It's not clear what this flag means from the name
markusheintz_
2014/01/07 18:42:22
Done.
| |
168 | 173 |
169 DISALLOW_COPY_AND_ASSIGN(ContentSettingBubbleModel); | 174 DISALLOW_COPY_AND_ASSIGN(ContentSettingBubbleModel); |
170 }; | 175 }; |
171 | 176 |
172 class ContentSettingTitleAndLinkModel : public ContentSettingBubbleModel { | 177 class ContentSettingTitleAndLinkModel : public ContentSettingBubbleModel { |
173 public: | 178 public: |
174 ContentSettingTitleAndLinkModel(Delegate* delegate, | 179 ContentSettingTitleAndLinkModel(Delegate* delegate, |
175 content::WebContents* web_contents, | 180 content::WebContents* web_contents, |
176 Profile* profile, | 181 Profile* profile, |
177 ContentSettingsType content_type); | 182 ContentSettingsType content_type); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
211 void IgnoreProtocolHandler(); | 216 void IgnoreProtocolHandler(); |
212 void ClearOrSetPreviousHandler(); | 217 void ClearOrSetPreviousHandler(); |
213 | 218 |
214 int selected_item_; | 219 int selected_item_; |
215 ProtocolHandlerRegistry* registry_; | 220 ProtocolHandlerRegistry* registry_; |
216 ProtocolHandler pending_handler_; | 221 ProtocolHandler pending_handler_; |
217 ProtocolHandler previous_handler_; | 222 ProtocolHandler previous_handler_; |
218 }; | 223 }; |
219 | 224 |
220 #endif // CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_BUBBLE_MODEL_H_ | 225 #endif // CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_BUBBLE_MODEL_H_ |
OLD | NEW |