| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ | 6 #define CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "content/public/browser/web_contents_delegate.h" | 10 #include "content/public/browser/web_contents_delegate.h" |
| 11 | 11 |
| 12 class PrefServiceSyncable; | 12 class PrefRegistrySyncable; |
| 13 class Profile; | 13 class Profile; |
| 14 class TabSpecificContentSettings; | 14 class TabSpecificContentSettings; |
| 15 | 15 |
| 16 class MediaStreamDevicesController { | 16 class MediaStreamDevicesController { |
| 17 public: | 17 public: |
| 18 MediaStreamDevicesController(Profile* profile, | 18 MediaStreamDevicesController(Profile* profile, |
| 19 TabSpecificContentSettings* content_settings, | 19 TabSpecificContentSettings* content_settings, |
| 20 const content::MediaStreamRequest& request, | 20 const content::MediaStreamRequest& request, |
| 21 const content::MediaResponseCallback& callback); | 21 const content::MediaResponseCallback& callback); |
| 22 | 22 |
| 23 virtual ~MediaStreamDevicesController(); | 23 virtual ~MediaStreamDevicesController(); |
| 24 | 24 |
| 25 // Registers the prefs backing the audio and video policies. | 25 // Registers the prefs backing the audio and video policies. |
| 26 static void RegisterUserPrefs(PrefServiceSyncable* prefs); | 26 static void RegisterUserPrefs(PrefRegistrySyncable* registry); |
| 27 | 27 |
| 28 // Public method to be called before creating the MediaStreamInfoBarDelegate. | 28 // Public method to be called before creating the MediaStreamInfoBarDelegate. |
| 29 // This function will check the content settings exceptions and take the | 29 // This function will check the content settings exceptions and take the |
| 30 // corresponding action on exception which matches the request. | 30 // corresponding action on exception which matches the request. |
| 31 bool DismissInfoBarAndTakeActionOnSettings(); | 31 bool DismissInfoBarAndTakeActionOnSettings(); |
| 32 | 32 |
| 33 // Public methods to be called by MediaStreamInfoBarDelegate; | 33 // Public methods to be called by MediaStreamInfoBarDelegate; |
| 34 bool has_audio() const { return has_audio_; } | 34 bool has_audio() const { return has_audio_; } |
| 35 bool has_video() const { return has_video_; } | 35 bool has_video() const { return has_video_; } |
| 36 const std::string& GetSecurityOriginSpec() const; | 36 const std::string& GetSecurityOriginSpec() const; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // The callback that needs to be Run to notify WebRTC of whether access to | 90 // The callback that needs to be Run to notify WebRTC of whether access to |
| 91 // audio/video devices was granted or not. | 91 // audio/video devices was granted or not. |
| 92 content::MediaResponseCallback callback_; | 92 content::MediaResponseCallback callback_; |
| 93 | 93 |
| 94 bool has_audio_; | 94 bool has_audio_; |
| 95 bool has_video_; | 95 bool has_video_; |
| 96 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController); | 96 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController); |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ | 99 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ |
| OLD | NEW |