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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 content::MediaStreamDevice default_device; | 105 content::MediaStreamDevice default_device; |
106 content::MediaStreamDevice selected_device; | 106 content::MediaStreamDevice selected_device; |
107 bool disabled; | 107 bool disabled; |
108 }; | 108 }; |
109 typedef std::map<content::MediaStreamType, MediaMenu> MediaMenuMap; | 109 typedef std::map<content::MediaStreamType, MediaMenu> MediaMenuMap; |
110 | 110 |
111 struct BubbleContent { | 111 struct BubbleContent { |
112 BubbleContent(); | 112 BubbleContent(); |
113 ~BubbleContent(); | 113 ~BubbleContent(); |
114 | 114 |
115 std::string title; | 115 base::string16 title; |
| 116 base::string16 message; |
116 ListItems list_items; | 117 ListItems list_items; |
117 RadioGroup radio_group; | 118 RadioGroup radio_group; |
118 bool radio_group_enabled; | 119 bool radio_group_enabled; |
119 std::vector<DomainList> domain_lists; | 120 std::vector<DomainList> domain_lists; |
120 std::string custom_link; | 121 std::string custom_link; |
121 bool custom_link_enabled; | 122 bool custom_link_enabled; |
122 std::string manage_link; | 123 std::string manage_link; |
123 MediaMenuMap media_menus; | 124 MediaMenuMap media_menus; |
124 std::string learn_more_link; | 125 std::string learn_more_link; |
125 | 126 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 protected: | 182 protected: |
182 ContentSettingBubbleModel( | 183 ContentSettingBubbleModel( |
183 Delegate* delegate, | 184 Delegate* delegate, |
184 content::WebContents* web_contents, | 185 content::WebContents* web_contents, |
185 Profile* profile); | 186 Profile* profile); |
186 | 187 |
187 content::WebContents* web_contents() const { return web_contents_; } | 188 content::WebContents* web_contents() const { return web_contents_; } |
188 Profile* profile() const { return profile_; } | 189 Profile* profile() const { return profile_; } |
189 Delegate* delegate() const { return delegate_; } | 190 Delegate* delegate() const { return delegate_; } |
190 | 191 |
191 void set_title(const std::string& title) { bubble_content_.title = title; } | 192 void set_title(const base::string16& title) { bubble_content_.title = title; } |
| 193 void set_message(const base::string16& message) { |
| 194 bubble_content_.message = message; |
| 195 } |
192 void add_list_item(const ListItem& item) { | 196 void add_list_item(const ListItem& item) { |
193 bubble_content_.list_items.push_back(item); | 197 bubble_content_.list_items.push_back(item); |
194 } | 198 } |
195 void set_radio_group(const RadioGroup& radio_group) { | 199 void set_radio_group(const RadioGroup& radio_group) { |
196 bubble_content_.radio_group = radio_group; | 200 bubble_content_.radio_group = radio_group; |
197 } | 201 } |
198 void set_radio_group_enabled(bool enabled) { | 202 void set_radio_group_enabled(bool enabled) { |
199 bubble_content_.radio_group_enabled = enabled; | 203 bubble_content_.radio_group_enabled = enabled; |
200 } | 204 } |
201 void add_domain_list(const DomainList& domain_list) { | 205 void add_domain_list(const DomainList& domain_list) { |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 content::WebContents* web_contents, | 313 content::WebContents* web_contents, |
310 Profile* profile); | 314 Profile* profile); |
311 | 315 |
312 ~ContentSettingSubresourceFilterBubbleModel() override; | 316 ~ContentSettingSubresourceFilterBubbleModel() override; |
313 | 317 |
314 void OnManageLinkClicked() override; | 318 void OnManageLinkClicked() override; |
315 ContentSettingSubresourceFilterBubbleModel* AsSubresourceFilterBubbleModel() | 319 ContentSettingSubresourceFilterBubbleModel* AsSubresourceFilterBubbleModel() |
316 override; | 320 override; |
317 | 321 |
318 private: | 322 private: |
| 323 void SetMessage(); |
| 324 |
319 // ContentSettingBubbleModel: | 325 // ContentSettingBubbleModel: |
320 void SetTitle() override; | 326 void SetTitle() override; |
321 void SetManageLink() override; | 327 void SetManageLink() override; |
322 | 328 |
323 DISALLOW_COPY_AND_ASSIGN(ContentSettingSubresourceFilterBubbleModel); | 329 DISALLOW_COPY_AND_ASSIGN(ContentSettingSubresourceFilterBubbleModel); |
324 }; | 330 }; |
325 | 331 |
326 // The model of the content settings bubble for media settings. | 332 // The model of the content settings bubble for media settings. |
327 class ContentSettingMediaStreamBubbleModel : public ContentSettingBubbleModel { | 333 class ContentSettingMediaStreamBubbleModel : public ContentSettingBubbleModel { |
328 public: | 334 public: |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 // The content settings that are associated with the individual radio | 379 // The content settings that are associated with the individual radio |
374 // buttons. | 380 // buttons. |
375 ContentSetting radio_item_setting_[2]; | 381 ContentSetting radio_item_setting_[2]; |
376 // The state of the microphone and camera access. | 382 // The state of the microphone and camera access. |
377 TabSpecificContentSettings::MicrophoneCameraState state_; | 383 TabSpecificContentSettings::MicrophoneCameraState state_; |
378 | 384 |
379 DISALLOW_COPY_AND_ASSIGN(ContentSettingMediaStreamBubbleModel); | 385 DISALLOW_COPY_AND_ASSIGN(ContentSettingMediaStreamBubbleModel); |
380 }; | 386 }; |
381 | 387 |
382 #endif // CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_BUBBLE_MODEL_H_ | 388 #endif // CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_BUBBLE_MODEL_H_ |
OLD | NEW |