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" |
(...skipping 15 matching lines...) Expand all Loading... |
26 const content::MediaStreamRequest& request, | 26 const content::MediaStreamRequest& request, |
27 const content::MediaResponseCallback& callback); | 27 const content::MediaResponseCallback& callback); |
28 | 28 |
29 virtual ~MediaStreamDevicesController(); | 29 virtual ~MediaStreamDevicesController(); |
30 | 30 |
31 // TODO(tommi): Clean up all the policy code and integrate with | 31 // TODO(tommi): Clean up all the policy code and integrate with |
32 // HostContentSettingsMap instead. This will make creating the UI simpler | 32 // HostContentSettingsMap instead. This will make creating the UI simpler |
33 // and the code cleaner. crbug.com/244389. | 33 // and the code cleaner. crbug.com/244389. |
34 | 34 |
35 // Registers the prefs backing the audio and video policies. | 35 // Registers the prefs backing the audio and video policies. |
36 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry); | 36 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
37 | 37 |
38 // Public method to be called before creating the MediaStreamInfoBarDelegate. | 38 // Public method to be called before creating the MediaStreamInfoBarDelegate. |
39 // This function will check the content settings exceptions and take the | 39 // This function will check the content settings exceptions and take the |
40 // corresponding action on exception which matches the request. | 40 // corresponding action on exception which matches the request. |
41 bool DismissInfoBarAndTakeActionOnSettings(); | 41 bool DismissInfoBarAndTakeActionOnSettings(); |
42 | 42 |
43 // Public methods to be called by MediaStreamInfoBarDelegate; | 43 // Public methods to be called by MediaStreamInfoBarDelegate; |
44 bool has_audio() const { return microphone_requested_; } | 44 bool has_audio() const { return microphone_requested_; } |
45 bool has_video() const { return webcam_requested_; } | 45 bool has_video() const { return webcam_requested_; } |
46 const std::string& GetSecurityOriginSpec() const; | 46 const std::string& GetSecurityOriginSpec() const; |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 // audio/video devices was granted or not. | 109 // audio/video devices was granted or not. |
110 content::MediaResponseCallback callback_; | 110 content::MediaResponseCallback callback_; |
111 | 111 |
112 bool microphone_requested_; | 112 bool microphone_requested_; |
113 bool webcam_requested_; | 113 bool webcam_requested_; |
114 | 114 |
115 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController); | 115 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController); |
116 }; | 116 }; |
117 | 117 |
118 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ | 118 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ |
OLD | NEW |