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

Unified Diff: chrome/browser/media/webrtc/media_stream_devices_controller.h

Issue 2814993003: Simplify the code for updating Android permissions in MediaStreamDevicesController (Closed)
Patch Set: Simplify the code for updating Android permissions in MediaStreamDevicesController Created 3 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/media/webrtc/media_stream_devices_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media/webrtc/media_stream_devices_controller.h
diff --git a/chrome/browser/media/webrtc/media_stream_devices_controller.h b/chrome/browser/media/webrtc/media_stream_devices_controller.h
index 4b8dd59c2cfbacfc8ca605adb20d2c676ab7ff8d..2c6d996243e75125c5f158e376bac1b69605a0ae 100644
--- a/chrome/browser/media/webrtc/media_stream_devices_controller.h
+++ b/chrome/browser/media/webrtc/media_stream_devices_controller.h
@@ -114,6 +114,9 @@ class MediaStreamDevicesController {
void AndroidOSPromptAnswered(bool allowed);
#endif // defined(OS_ANDROID)
+ // Called when the request is finished and no prompt is required.
+ void RequestFinishedNoPrompt();
+
private:
friend class MediaStreamDevicesControllerTest;
friend class test::MediaStreamDevicesControllerTestApi;
@@ -138,12 +141,8 @@ class MediaStreamDevicesController {
content::MediaStreamDevices GetDevices(ContentSetting audio_setting,
ContentSetting video_setting);
- // Runs |callback_| with the given audio/video permission settings. If neither
- // |audio_setting| or |video_setting| is set to allow, |denial_reason| should
- // be set to the error to be reported when running |callback_|.
- void RunCallback(ContentSetting audio_setting,
- ContentSetting video_setting,
- content::MediaStreamRequestResult denial_reason);
+ // Runs |callback_| with the current audio/video permission settings.
+ void RunCallback();
// Called when the permission has been set to update the
// TabSpecificContentSettings.
@@ -160,9 +159,11 @@ class MediaStreamDevicesController {
// requested devices.
bool IsUserAcceptAllowed(ContentSettingsType content_type) const;
- // The audio/video content settings BEFORE the user clicks accept/deny.
- ContentSetting old_audio_setting_;
- ContentSetting old_video_setting_;
+ // The current state of the audio/video content settings which may be updated
+ // through the lifetime of the request.
+ ContentSetting audio_setting_;
+ ContentSetting video_setting_;
+ content::MediaStreamRequestResult denial_reason_;
content::WebContents* web_contents_;
« no previous file with comments | « no previous file | chrome/browser/media/webrtc/media_stream_devices_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698