| 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 20 matching lines...) Expand all Loading... |
| 31 class PrefRegistrySyncable; | 31 class PrefRegistrySyncable; |
| 32 } | 32 } |
| 33 | 33 |
| 34 // Manages protected media identifier permissions flow, and delegates UI | 34 // Manages protected media identifier permissions flow, and delegates UI |
| 35 // handling via PermissionQueueController. | 35 // handling via PermissionQueueController. |
| 36 class ProtectedMediaIdentifierPermissionContext | 36 class ProtectedMediaIdentifierPermissionContext |
| 37 : public PermissionContextBase { | 37 : public PermissionContextBase { |
| 38 public: | 38 public: |
| 39 explicit ProtectedMediaIdentifierPermissionContext(Profile* profile); | 39 explicit ProtectedMediaIdentifierPermissionContext(Profile* profile); |
| 40 | 40 |
| 41 #if defined(OS_CHROMEOS) | |
| 42 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* prefs); | |
| 43 #endif | |
| 44 | |
| 45 // In addition to the base class flow checks that it is only code from | 41 // In addition to the base class flow checks that it is only code from |
| 46 // valid iframes. It also adds special logic when called through an extension. | 42 // valid iframes. It also adds special logic when called through an extension. |
| 47 void RequestPermission(content::WebContents* web_contents, | 43 void RequestPermission(content::WebContents* web_contents, |
| 48 const PermissionRequestID& id, | 44 const PermissionRequestID& id, |
| 49 const GURL& requesting_origin, | 45 const GURL& requesting_origin, |
| 50 bool user_gesture, | 46 bool user_gesture, |
| 51 const BrowserPermissionCallback& callback) override; | 47 const BrowserPermissionCallback& callback) override; |
| 52 ContentSetting GetPermissionStatus( | 48 ContentSetting GetPermissionStatus( |
| 53 const GURL& requesting_origin, | 49 const GURL& requesting_origin, |
| 54 const GURL& embedding_origin) const override; | 50 const GURL& embedding_origin) const override; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 84 |
| 89 // Must be the last member, to ensure that it will be | 85 // Must be the last member, to ensure that it will be |
| 90 // destroyed first, which will invalidate weak pointers | 86 // destroyed first, which will invalidate weak pointers |
| 91 base::WeakPtrFactory<ProtectedMediaIdentifierPermissionContext> weak_factory_; | 87 base::WeakPtrFactory<ProtectedMediaIdentifierPermissionContext> weak_factory_; |
| 92 #endif | 88 #endif |
| 93 | 89 |
| 94 DISALLOW_COPY_AND_ASSIGN(ProtectedMediaIdentifierPermissionContext); | 90 DISALLOW_COPY_AND_ASSIGN(ProtectedMediaIdentifierPermissionContext); |
| 95 }; | 91 }; |
| 96 | 92 |
| 97 #endif // CHROME_BROWSER_MEDIA_PROTECTED_MEDIA_IDENTIFIER_PERMISSION_CONTEXT_H_ | 93 #endif // CHROME_BROWSER_MEDIA_PROTECTED_MEDIA_IDENTIFIER_PERMISSION_CONTEXT_H_ |
| OLD | NEW |