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_WEBRTC_MEDIA_STREAM_DEVICES_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_STREAM_DEVICES_CONTROLLER_H_ |
6 #define CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_STREAM_DEVICES_CONTROLLER_H_ | 6 #define CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_STREAM_DEVICES_CONTROLLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 // Registers the prefs backing the audio and video policies. | 53 // Registers the prefs backing the audio and video policies. |
54 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 54 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
55 | 55 |
56 ~MediaStreamDevicesController() override; | 56 ~MediaStreamDevicesController() override; |
57 | 57 |
58 bool IsAskingForAudio() const; | 58 bool IsAskingForAudio() const; |
59 bool IsAskingForVideo() const; | 59 bool IsAskingForVideo() const; |
60 base::string16 GetMessageText() const; | 60 base::string16 GetMessageText() const; |
61 | 61 |
62 // Forces the permissions to be denied (without being persisted) regardless | 62 #if defined(OS_ANDROID) |
63 // of what the previous state was. If the user had previously allowed the | 63 // Called when the Android OS-level prompt is answered. |
64 // site video or audio access, this ignores that and informs the site it was | 64 void AndroidOSPromptAnswered(bool allowed); |
65 // denied. | 65 #endif // defined(OS_ANDROID) |
66 // | |
67 // This differs from PermissionGranted/PermissionDenied as they only operate | |
68 // on the permissions if they are in the ASK state. | |
69 void ForcePermissionDeniedTemporarily(); | |
70 | 66 |
71 bool ShouldShowPersistenceToggle() const override; | 67 bool ShouldShowPersistenceToggle() const override; |
72 | 68 |
73 // PermissionRequest: | 69 // PermissionRequest: |
74 IconId GetIconId() const override; | 70 IconId GetIconId() const override; |
75 base::string16 GetMessageTextFragment() const override; | 71 base::string16 GetMessageTextFragment() const override; |
76 GURL GetOrigin() const override; | 72 GURL GetOrigin() const override; |
77 void PermissionGranted() override; | 73 void PermissionGranted() override; |
78 void PermissionDenied() override; | 74 void PermissionDenied() override; |
79 void Cancelled() override; | 75 void Cancelled() override; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 // The callback that needs to be Run to notify WebRTC of whether access to | 157 // The callback that needs to be Run to notify WebRTC of whether access to |
162 // audio/video devices was granted or not. | 158 // audio/video devices was granted or not. |
163 content::MediaResponseCallback callback_; | 159 content::MediaResponseCallback callback_; |
164 | 160 |
165 std::unique_ptr<internal::PermissionPromptDelegate> delegate_; | 161 std::unique_ptr<internal::PermissionPromptDelegate> delegate_; |
166 | 162 |
167 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController); | 163 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController); |
168 }; | 164 }; |
169 | 165 |
170 #endif // CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_STREAM_DEVICES_CONTROLLER_H_ | 166 #endif // CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_STREAM_DEVICES_CONTROLLER_H_ |
OLD | NEW |