Chromium Code Reviews| 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 5d0a67992eb2d882236ef6088676b1d63e4fc10a..a515302be3f29a6c30631a14fed8a012de22a7a8 100644 |
| --- a/chrome/browser/ui/content_settings/content_setting_bubble_model.h |
| +++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.h |
| @@ -14,6 +14,7 @@ |
| #include "chrome/common/custom_handlers/protocol_handler.h" |
| #include "content/public/browser/notification_observer.h" |
| #include "content/public/browser/notification_registrar.h" |
| +#include "content/public/common/media_stream_request.h" |
| #include "googleurl/src/gurl.h" |
| #include "ui/gfx/image/image.h" |
| @@ -57,6 +58,13 @@ class ContentSettingBubbleModel : public content::NotificationObserver { |
| std::set<std::string> hosts; |
| }; |
| + struct MediaMenu { |
| + std::string label; |
| + content::MediaStreamDevice default_device; |
| + content::MediaStreamDevice selected_device; |
| + }; |
| + typedef std::map<content::MediaStreamType, MediaMenu> MediaMenuMap; |
|
markusheintz_
2013/02/06 11:03:26
Please add "#include <map>" in line 8
no longer working on chromium
2013/02/06 13:31:52
Done.
|
| + |
| struct BubbleContent { |
| BubbleContent(); |
| ~BubbleContent(); |
| @@ -70,6 +78,7 @@ class ContentSettingBubbleModel : public content::NotificationObserver { |
| std::string custom_link; |
| bool custom_link_enabled; |
| std::string manage_link; |
| + MediaMenuMap media_menus; |
| private: |
| DISALLOW_COPY_AND_ASSIGN(BubbleContent); |
| @@ -96,6 +105,8 @@ class ContentSettingBubbleModel : public content::NotificationObserver { |
| virtual void OnPopupClicked(int index) {} |
| virtual void OnCustomLinkClicked() {} |
| virtual void OnManageLinkClicked() {} |
| + virtual void OnMeiaMenuClicked(content::MediaStreamType type, |
|
markusheintz_
2013/02/06 11:03:26
Please fix the typo here.
s/OnMeiaMenuClicked/OnMe
no longer working on chromium
2013/02/06 13:31:52
Done.
|
| + const std::string& selected_device_id) {} |
| // Called by the view code when the bubble is closed by the user using the |
| // Done button. |
| @@ -132,6 +143,12 @@ class ContentSettingBubbleModel : public content::NotificationObserver { |
| void set_manage_link(const std::string& link) { |
| bubble_content_.manage_link = link; |
| } |
| + void add_media_menu(content::MediaStreamType type, const MediaMenu& menu) { |
| + bubble_content_.media_menus[type] = menu; |
| + } |
| + void set_selected_device(const content::MediaStreamDevice& device) { |
| + bubble_content_.media_menus[device.type].selected_device = device; |
| + } |
| void AddBlockedResource(const std::string& resource_identifier); |
| private: |