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 <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 // Forces the permissions to be denied (without being persisted) regardless | 44 // Forces the permissions to be denied (without being persisted) regardless |
45 // of what the previous state was. If the user had previously allowed the | 45 // of what the previous state was. If the user had previously allowed the |
46 // site video or audio access, this ignores that and informs the site it was | 46 // site video or audio access, this ignores that and informs the site it was |
47 // denied. | 47 // denied. |
48 // | 48 // |
49 // This differs from PermissionGranted/PermissionDenied as they only operate | 49 // This differs from PermissionGranted/PermissionDenied as they only operate |
50 // on the permissions if they are in the ASK state. | 50 // on the permissions if they are in the ASK state. |
51 void ForcePermissionDeniedTemporarily(); | 51 void ForcePermissionDeniedTemporarily(); |
52 | 52 |
| 53 // Answers a permission request with (possibly) different values for |
| 54 // |audio_accepted| and |video_accepted|. Intended for use from |
| 55 // MediaStreamInfobarDelegateAndroid. |
| 56 // TODO(tsergeant): Remove this by refactoring Android to use |
| 57 // PermissionBubbleRequest instead of a custom infobar delegate. |
| 58 void GroupedRequestFinished(bool audio_accepted, bool video_accepted); |
| 59 |
53 // PermissionBubbleRequest: | 60 // PermissionBubbleRequest: |
54 int GetIconId() const override; | 61 int GetIconId() const override; |
55 base::string16 GetMessageTextFragment() const override; | 62 base::string16 GetMessageTextFragment() const override; |
56 GURL GetOrigin() const override; | 63 GURL GetOrigin() const override; |
57 void PermissionGranted() override; | 64 void PermissionGranted() override; |
58 void PermissionDenied() override; | 65 void PermissionDenied() override; |
59 void Cancelled() override; | 66 void Cancelled() override; |
60 void RequestFinished() override; | 67 void RequestFinished() override; |
61 PermissionBubbleType GetPermissionBubbleType() const override; | 68 PermissionBubbleType GetPermissionBubbleType() const override; |
62 | 69 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 // audio/video devices was granted or not. | 131 // audio/video devices was granted or not. |
125 content::MediaResponseCallback callback_; | 132 content::MediaResponseCallback callback_; |
126 | 133 |
127 // Whether the permissions granted or denied by the user should be persisted. | 134 // Whether the permissions granted or denied by the user should be persisted. |
128 bool persist_permission_changes_; | 135 bool persist_permission_changes_; |
129 | 136 |
130 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController); | 137 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController); |
131 }; | 138 }; |
132 | 139 |
133 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ | 140 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ |
OLD | NEW |