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

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: addressed sky's comment and replaced "Do not allow any site to" with "Do not allow sites to" 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..530b19aa5c2813d193ea5cbf99f37ecfc9914e36 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 always_allow() const { return always_allow_; }
+
// 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);
};
« no previous file with comments | « chrome/browser/media/media_stream_devices_controller.cc ('k') | chrome/browser/media/media_stream_devices_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698