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

Unified Diff: chrome/browser/media/media_stream_devices_menu_model.h

Issue 10537099: add "always allow" option to the mediastream infobar and allow user to allow/not allow acces to devi (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use only content settings, added a device controller, addressed all the comments Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/media/media_stream_devices_menu_model.h
diff --git a/chrome/browser/media/media_stream_devices_menu_model.h b/chrome/browser/media/media_stream_devices_menu_model.h
index 866234762ad63d7a7610e9ddb6a9d8ccd69fdcd8..21f17871f2708981de07cdcd281ccdd3bcbe4ecc 100644
--- a/chrome/browser/media/media_stream_devices_menu_model.h
+++ b/chrome/browser/media/media_stream_devices_menu_model.h
@@ -30,6 +30,8 @@ class MediaStreamDevicesMenuModel : public ui::SimpleMenuModel,
content::MediaStreamDeviceType type,
std::string* device_id) const;
+ bool IsAlwaysAllowChecked() const { return always_allow_; }
Ivan Korotkov 2012/06/14 17:14:12 If this method is non-virtual, it should be named
no longer working on chromium 2012/06/15 16:52:07 Done.
+
// ui::SimpleMenuModel::Delegate implementation:
virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
@@ -44,6 +46,9 @@ class MediaStreamDevicesMenuModel : public ui::SimpleMenuModel,
// Internal method to add the |devices| to the current menu.
void AddDevices(const content::MediaStreamDevices& devices);
+ // Internal method to add "always allow" option to the current menu.
+ void AddAlwaysAllowOption(bool audio, bool video);
+
// Map of command IDs to devices.
CommandMap commands_;
@@ -52,6 +57,8 @@ class MediaStreamDevicesMenuModel : public ui::SimpleMenuModel,
int selected_command_id_audio_;
int selected_command_id_video_;
+ bool always_allow_;
+
DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesMenuModel);
};

Powered by Google App Engine
This is Rietveld 408576698