| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_PROTECTED_MEDIA_IDENTIFIER_PERMISSION_CONTEXT_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_PROTECTED_MEDIA_IDENTIFIER_PERMISSION_CONTEXT_H_ |
| 6 #define CHROME_BROWSER_MEDIA_PROTECTED_MEDIA_IDENTIFIER_PERMISSION_CONTEXT_H_ | 6 #define CHROME_BROWSER_MEDIA_PROTECTED_MEDIA_IDENTIFIER_PERMISSION_CONTEXT_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/content_settings/permission_context_base.h" | 8 #include "chrome/browser/content_settings/permission_context_base.h" |
| 9 #include "components/content_settings/core/common/permission_request_id.h" | 9 #include "components/content_settings/core/common/permission_request_id.h" |
| 10 | 10 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 const GURL& embedding_origin) const override; | 50 const GURL& embedding_origin) const override; |
| 51 void CancelPermissionRequest(content::WebContents* web_contents, | 51 void CancelPermissionRequest(content::WebContents* web_contents, |
| 52 const PermissionRequestID& id) override; | 52 const PermissionRequestID& id) override; |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 ~ProtectedMediaIdentifierPermissionContext() override; | 55 ~ProtectedMediaIdentifierPermissionContext() override; |
| 56 | 56 |
| 57 void UpdateTabContext(const PermissionRequestID& id, | 57 void UpdateTabContext(const PermissionRequestID& id, |
| 58 const GURL& requesting_frame, | 58 const GURL& requesting_frame, |
| 59 bool allowed) override; | 59 bool allowed) override; |
| 60 bool IsRestrictedToSecureOrigins() const override; |
| 60 | 61 |
| 61 // Returns whether "Protected content" is enabled based on factors other | 62 // Returns whether "Protected content" is enabled based on factors other |
| 62 // than the protected media identifier content setting itself. For example, | 63 // than the protected media identifier content setting itself. For example, |
| 63 // it can be disabled by a master switch in content settings, in incognito or | 64 // it can be disabled by a master switch in content settings, in incognito or |
| 64 // guest mode, or by the device policy. | 65 // guest mode, or by the device policy. |
| 65 bool IsProtectedMediaIdentifierEnabled() const; | 66 bool IsProtectedMediaIdentifierEnabled() const; |
| 66 | 67 |
| 67 #if defined(OS_CHROMEOS) | 68 #if defined(OS_CHROMEOS) |
| 68 void OnPlatformVerificationConsentResponse( | 69 void OnPlatformVerificationConsentResponse( |
| 69 content::WebContents* web_contents, | 70 content::WebContents* web_contents, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 84 | 85 |
| 85 // Must be the last member, to ensure that it will be | 86 // Must be the last member, to ensure that it will be |
| 86 // destroyed first, which will invalidate weak pointers | 87 // destroyed first, which will invalidate weak pointers |
| 87 base::WeakPtrFactory<ProtectedMediaIdentifierPermissionContext> weak_factory_; | 88 base::WeakPtrFactory<ProtectedMediaIdentifierPermissionContext> weak_factory_; |
| 88 #endif | 89 #endif |
| 89 | 90 |
| 90 DISALLOW_COPY_AND_ASSIGN(ProtectedMediaIdentifierPermissionContext); | 91 DISALLOW_COPY_AND_ASSIGN(ProtectedMediaIdentifierPermissionContext); |
| 91 }; | 92 }; |
| 92 | 93 |
| 93 #endif // CHROME_BROWSER_MEDIA_PROTECTED_MEDIA_IDENTIFIER_PERMISSION_CONTEXT_H_ | 94 #endif // CHROME_BROWSER_MEDIA_PROTECTED_MEDIA_IDENTIFIER_PERMISSION_CONTEXT_H_ |
| OLD | NEW |