| 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..9ac50965f207b500eb8b6135a12f42e414fb160c 100644
|
| --- a/chrome/browser/ui/content_settings/content_setting_bubble_model.h
|
| +++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.h
|
| @@ -5,6 +5,7 @@
|
| #ifndef CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_BUBBLE_MODEL_H_
|
| #define CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_BUBBLE_MODEL_H_
|
|
|
| +#include <map>
|
| #include <set>
|
| #include <string>
|
| #include <vector>
|
| @@ -14,6 +15,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 +59,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;
|
| +
|
| struct BubbleContent {
|
| BubbleContent();
|
| ~BubbleContent();
|
| @@ -70,6 +79,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 +106,8 @@ class ContentSettingBubbleModel : public content::NotificationObserver {
|
| virtual void OnPopupClicked(int index) {}
|
| virtual void OnCustomLinkClicked() {}
|
| virtual void OnManageLinkClicked() {}
|
| + virtual void OnMediaMenuClicked(content::MediaStreamType type,
|
| + 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 +144,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:
|
|
|