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 Profile; |
| 13 class TabSpecificContentSettings; |
| 14 |
12 namespace content { | 15 namespace content { |
13 class WebContents; | 16 class WebContents; |
14 } | 17 } |
15 | 18 |
| 19 namespace user_prefs { |
16 class PrefRegistrySyncable; | 20 class PrefRegistrySyncable; |
17 class Profile; | 21 } |
18 class TabSpecificContentSettings; | |
19 | 22 |
20 class MediaStreamDevicesController { | 23 class MediaStreamDevicesController { |
21 public: | 24 public: |
22 MediaStreamDevicesController(content::WebContents* web_contents, | 25 MediaStreamDevicesController(content::WebContents* web_contents, |
23 const content::MediaStreamRequest& request, | 26 const content::MediaStreamRequest& request, |
24 const content::MediaResponseCallback& callback); | 27 const content::MediaResponseCallback& callback); |
25 | 28 |
26 virtual ~MediaStreamDevicesController(); | 29 virtual ~MediaStreamDevicesController(); |
27 | 30 |
28 // Registers the prefs backing the audio and video policies. | 31 // Registers the prefs backing the audio and video policies. |
29 static void RegisterUserPrefs(PrefRegistrySyncable* registry); | 32 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry); |
30 | 33 |
31 // Public method to be called before creating the MediaStreamInfoBarDelegate. | 34 // Public method to be called before creating the MediaStreamInfoBarDelegate. |
32 // This function will check the content settings exceptions and take the | 35 // This function will check the content settings exceptions and take the |
33 // corresponding action on exception which matches the request. | 36 // corresponding action on exception which matches the request. |
34 bool DismissInfoBarAndTakeActionOnSettings(); | 37 bool DismissInfoBarAndTakeActionOnSettings(); |
35 | 38 |
36 // Public methods to be called by MediaStreamInfoBarDelegate; | 39 // Public methods to be called by MediaStreamInfoBarDelegate; |
37 bool has_audio() const { return microphone_requested_; } | 40 bool has_audio() const { return microphone_requested_; } |
38 bool has_video() const { return webcam_requested_; } | 41 bool has_video() const { return webcam_requested_; } |
39 const std::string& GetSecurityOriginSpec() const; | 42 const std::string& GetSecurityOriginSpec() const; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 // audio/video devices was granted or not. | 96 // audio/video devices was granted or not. |
94 content::MediaResponseCallback callback_; | 97 content::MediaResponseCallback callback_; |
95 | 98 |
96 bool microphone_requested_; | 99 bool microphone_requested_; |
97 bool webcam_requested_; | 100 bool webcam_requested_; |
98 | 101 |
99 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController); | 102 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController); |
100 }; | 103 }; |
101 | 104 |
102 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ | 105 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ |
OLD | NEW |