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

Unified Diff: chrome/browser/ui/gtk/infobars/media_stream_infobar_gtk.cc

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/ui/gtk/infobars/media_stream_infobar_gtk.cc
diff --git a/chrome/browser/ui/gtk/infobars/media_stream_infobar_gtk.cc b/chrome/browser/ui/gtk/infobars/media_stream_infobar_gtk.cc
index 6418ce3ba46f946519ace7cfc0265b89fc85fcc9..acc329cf10220c1a57ec9945ad60d7e4adbd1326 100644
--- a/chrome/browser/ui/gtk/infobars/media_stream_infobar_gtk.cc
+++ b/chrome/browser/ui/gtk/infobars/media_stream_infobar_gtk.cc
@@ -36,12 +36,12 @@ void MediaStreamInfoBarGtk::Init() {
gtk_util::CenterWidgetInHBox(hbox_, hbox, false, 0);
size_t offset = 0;
- int message_id = IDS_MEDIA_CAPTURE_MIC_AND_VIDEO;
- DCHECK(GetDelegate()->has_audio() || GetDelegate()->has_video());
- if (!GetDelegate()->has_audio())
+ int message_id = IDS_MEDIA_CAPTURE_AUDIO_AND_VIDEO;
+ DCHECK(GetDelegate()->HasAudio() || GetDelegate()->HasVideo());
+ if (!GetDelegate()->HasAudio())
message_id = IDS_MEDIA_CAPTURE_VIDEO_ONLY;
- else if (!GetDelegate()->has_video())
- message_id = IDS_MEDIA_CAPTURE_MIC_ONLY;
+ else if (!GetDelegate()->HasVideo())
+ message_id = IDS_MEDIA_CAPTURE_AUDIO_ONLY;
string16 security_origin = UTF8ToUTF16(
GetDelegate()->GetSecurityOrigin().spec());
@@ -82,7 +82,8 @@ void MediaStreamInfoBarGtk::OnAllowButton(GtkWidget* widget) {
content::MEDIA_STREAM_DEVICE_TYPE_AUDIO_CAPTURE, &audio_id);
devices_menu_model_->GetSelectedDeviceId(
content::MEDIA_STREAM_DEVICE_TYPE_VIDEO_CAPTURE, &video_id);
- GetDelegate()->Accept(audio_id, video_id);
+ bool always_allow = devices_menu_model_->always_allow();
+ GetDelegate()->Accept(audio_id, video_id, always_allow);
RemoveSelf();
}
« no previous file with comments | « chrome/browser/ui/cocoa/infobars/media_stream_infobar_controller.mm ('k') | chrome/browser/ui/media_stream_infobar_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698