Index: chrome/browser/media/protected_media_identifier_permission_context.h |
diff --git a/chrome/browser/media/protected_media_identifier_permission_context.h b/chrome/browser/media/protected_media_identifier_permission_context.h |
index 58fba09724b6f1f310d3be24aab60322f11f654f..65e9d6b6a2364ae3a97ee1762af666fb437bf472 100644 |
--- a/chrome/browser/media/protected_media_identifier_permission_context.h |
+++ b/chrome/browser/media/protected_media_identifier_permission_context.h |
@@ -6,10 +6,20 @@ |
#define CHROME_BROWSER_MEDIA_PROTECTED_MEDIA_IDENTIFIER_PERMISSION_CONTEXT_H_ |
#include "chrome/browser/content_settings/permission_context_base.h" |
+#include "components/content_settings/core/common/permission_request_id.h" |
+ |
+#if defined(OS_CHROMEOS) |
+#include "base/memory/weak_ptr.h" |
+#include "chrome/browser/chromeos/attestation/platform_verification_dialog.h" |
+#include "chrome/browser/chromeos/attestation/platform_verification_flow.h" |
+#endif |
-class PermissionRequestID; |
class Profile; |
+namespace views { |
+class Widget; |
+} |
+ |
namespace content { |
class RenderViewHost; |
class WebContents; |
@@ -26,12 +36,14 @@ class ProtectedMediaIdentifierPermissionContext |
// valid iframes. It also adds special logic when called through an extension. |
void RequestPermission(content::WebContents* web_contents, |
const PermissionRequestID& id, |
- const GURL& requesting_frame_origin, |
+ const GURL& requesting_origin, |
bool user_gesture, |
const BrowserPermissionCallback& callback) override; |
ContentSetting GetPermissionStatus( |
const GURL& requesting_origin, |
const GURL& embedding_origin) const override; |
+ void CancelPermissionRequest(content::WebContents* web_contents, |
+ const PermissionRequestID& id) override; |
private: |
~ProtectedMediaIdentifierPermissionContext() override; |
@@ -44,6 +56,26 @@ class ProtectedMediaIdentifierPermissionContext |
// user in the master switch in content settings, or by the device policy. |
bool IsProtectedMediaIdentifierEnabled() const; |
+#if defined(OS_CHROMEOS) |
+ void OnPlatformVerificationResult( |
+ const PermissionRequestID& id, |
+ const GURL& requesting_origin, |
+ const GURL& embedding_origin, |
+ const BrowserPermissionCallback& callback, |
+ chromeos::attestation::PlatformVerificationFlow::ConsentResponse |
+ response); |
+ |
+ // ID for the pending permission request. Invalid when no request is pending, |
+ // or the request has been canceled. |
+ PermissionRequestID pending_id_; |
+ |
+ views::Widget* widget_; |
+ |
+ // Must be the last member, to ensure that it will be |
+ // destroyed first, which will invalidate weak pointers |
+ base::WeakPtrFactory<ProtectedMediaIdentifierPermissionContext> weak_factory_; |
+#endif |
+ |
DISALLOW_COPY_AND_ASSIGN(ProtectedMediaIdentifierPermissionContext); |
}; |