OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_DEVICE_PERMISSION_CONTEXT_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_STREAM_DEVICE_PERMISSION_CONTEXT_H_ |
6 #define CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_STREAM_DEVICE_PERMISSION_CONTEXT_H_ | 6 #define CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_STREAM_DEVICE_PERMISSION_CONTEXT_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "chrome/browser/permissions/permission_context_base.h" | 9 #include "chrome/browser/permissions/permission_context_base.h" |
10 #include "components/content_settings/core/common/content_settings_types.h" | 10 #include "components/content_settings/core/common/content_settings_types.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 // PermissionContextBase: | 25 // PermissionContextBase: |
26 void RequestPermission(content::WebContents* web_contents, | 26 void RequestPermission(content::WebContents* web_contents, |
27 const PermissionRequestID& id, | 27 const PermissionRequestID& id, |
28 const GURL& requesting_frame, | 28 const GURL& requesting_frame, |
29 bool user_gesture, | 29 bool user_gesture, |
30 const BrowserPermissionCallback& callback) override; | 30 const BrowserPermissionCallback& callback) override; |
31 | 31 |
32 // TODO(xhwang): GURL.GetOrigin() shouldn't be used as the origin. Need to | 32 // TODO(xhwang): GURL.GetOrigin() shouldn't be used as the origin. Need to |
33 // refactor to use url::Origin. crbug.com/527149 is filed for this. | 33 // refactor to use url::Origin. crbug.com/527149 is filed for this. |
34 ContentSetting GetPermissionStatus( | 34 ContentSetting GetPermissionStatusInternal( |
35 const GURL& requesting_origin, | 35 const GURL& requesting_origin, |
36 const GURL& embedding_origin) const override; | 36 const GURL& embedding_origin) const override; |
37 | 37 |
38 void ResetPermission(const GURL& requesting_origin, | 38 void ResetPermission(const GURL& requesting_origin, |
39 const GURL& embedding_origin) override; | 39 const GURL& embedding_origin) override; |
40 | 40 |
41 void CancelPermissionRequest(content::WebContents* web_contents, | 41 void CancelPermissionRequest(content::WebContents* web_contents, |
42 const PermissionRequestID& id) override; | 42 const PermissionRequestID& id) override; |
43 | 43 |
44 private: | 44 private: |
45 // PermissionContextBase: | 45 // PermissionContextBase: |
46 bool IsRestrictedToSecureOrigins() const override; | 46 bool IsRestrictedToSecureOrigins() const override; |
47 | 47 |
48 ContentSettingsType content_settings_type_; | 48 ContentSettingsType content_settings_type_; |
49 | 49 |
50 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicePermissionContext); | 50 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicePermissionContext); |
51 }; | 51 }; |
52 | 52 |
53 #endif // CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_STREAM_DEVICE_PERMISSION_CONTEXT_H_ | 53 #endif // CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_STREAM_DEVICE_PERMISSION_CONTEXT_H_ |
OLD | NEW |