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

Side by Side Diff: chrome/browser/media/protected_media_identifier_permission_context.h

Issue 1153873003: Add way for PermissionContext to be automatically restricted to secure origins. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@midi_permission_sysex
Patch Set: typo Created 5 years, 6 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 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
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
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_
OLDNEW
« no previous file with comments | « chrome/browser/media/midi_permission_context.cc ('k') | chrome/browser/media/protected_media_identifier_permission_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698