Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Side by Side Diff: chrome/browser/media/webrtc/media_stream_devices_controller.h

Issue 2675483002: Replace PermissionType in chrome/ with ContentSettingsType (Closed)
Patch Set: rebase + include content_settings_types.h more Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "chrome/browser/permissions/permission_request.h" 12 #include "chrome/browser/permissions/permission_request.h"
13 #include "components/content_settings/core/common/content_settings.h" 13 #include "components/content_settings/core/common/content_settings.h"
14 #include "content/public/browser/permission_type.h"
15 #include "content/public/browser/web_contents_delegate.h" 14 #include "content/public/browser/web_contents_delegate.h"
16 15
17 class Profile; 16 class Profile;
18 class TabSpecificContentSettings; 17 class TabSpecificContentSettings;
19 18
20 namespace content { 19 namespace content {
21 class WebContents; 20 class WebContents;
22 } 21 }
23 22
24 namespace user_prefs { 23 namespace user_prefs {
(...skipping 10 matching lines...) Expand all
35 34
36 // Registers the prefs backing the audio and video policies. 35 // Registers the prefs backing the audio and video policies.
37 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); 36 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
38 37
39 bool IsAllowedForAudio() const; 38 bool IsAllowedForAudio() const;
40 bool IsAllowedForVideo() const; 39 bool IsAllowedForVideo() const;
41 bool IsAskingForAudio() const; 40 bool IsAskingForAudio() const;
42 bool IsAskingForVideo() const; 41 bool IsAskingForVideo() const;
43 base::string16 GetMessageText() const; 42 base::string16 GetMessageText() const;
44 43
45 // Returns the PermissionsType associated with the provided
46 // ContentSettingsType. |content_type| must be a media stream type.
47 content::PermissionType GetPermissionTypeForContentSettingsType(
48 ContentSettingsType content_type) const;
49
50 // Forces the permissions to be denied (without being persisted) regardless 44 // Forces the permissions to be denied (without being persisted) regardless
51 // 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
52 // 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
53 // denied. 47 // denied.
54 // 48 //
55 // This differs from PermissionGranted/PermissionDenied as they only operate 49 // This differs from PermissionGranted/PermissionDenied as they only operate
56 // on the permissions if they are in the ASK state. 50 // on the permissions if they are in the ASK state.
57 void ForcePermissionDeniedTemporarily(); 51 void ForcePermissionDeniedTemporarily();
58 52
59 bool ShouldShowPersistenceToggle() const override; 53 bool ShouldShowPersistenceToggle() const override;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 const content::MediaStreamRequest request_; 123 const content::MediaStreamRequest request_;
130 124
131 // The callback that needs to be Run to notify WebRTC of whether access to 125 // The callback that needs to be Run to notify WebRTC of whether access to
132 // audio/video devices was granted or not. 126 // audio/video devices was granted or not.
133 content::MediaResponseCallback callback_; 127 content::MediaResponseCallback callback_;
134 128
135 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController); 129 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController);
136 }; 130 };
137 131
138 #endif // CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_STREAM_DEVICES_CONTROLLER_H_ 132 #endif // CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_STREAM_DEVICES_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698