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

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

Issue 2816773002: Added switch for bypassing protected media identifier permission (Closed)
Patch Set: Added switch for bypassing permissions Created 3 years, 7 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 "base/macros.h" 8 #include "base/macros.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "chrome/browser/permissions/permission_context_base.h" 10 #include "chrome/browser/permissions/permission_context_base.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 bool user_gesture, 45 bool user_gesture,
46 const BrowserPermissionCallback& callback) override; 46 const BrowserPermissionCallback& callback) override;
47 #endif // defined(OS_CHROMEOS) 47 #endif // defined(OS_CHROMEOS)
48 ContentSetting GetPermissionStatusInternal( 48 ContentSetting GetPermissionStatusInternal(
49 content::RenderFrameHost* render_frame_host, 49 content::RenderFrameHost* render_frame_host,
50 const GURL& requesting_origin, 50 const GURL& requesting_origin,
51 const GURL& embedding_origin) const override; 51 const GURL& embedding_origin) const override;
52 void CancelPermissionRequest(content::WebContents* web_contents, 52 void CancelPermissionRequest(content::WebContents* web_contents,
53 const PermissionRequestID& id) override; 53 const PermissionRequestID& id) override;
54 54
55 static bool IsOriginWhitelisted(const GURL& requesting_origin);
xhwang 2017/05/05 16:55:57 You can make this private, and declare ProtectedMe
Vaage 2017/05/05 20:23:55 Done.
56
55 private: 57 private:
56 void UpdateTabContext(const PermissionRequestID& id, 58 void UpdateTabContext(const PermissionRequestID& id,
57 const GURL& requesting_frame, 59 const GURL& requesting_frame,
58 bool allowed) override; 60 bool allowed) override;
59 bool IsRestrictedToSecureOrigins() const override; 61 bool IsRestrictedToSecureOrigins() const override;
60 62
61 // Returns whether "Protected content" is enabled based on factors other 63 // Returns whether "Protected content" is enabled based on factors other
62 // than the protected media identifier content setting itself. For example, 64 // 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 65 // it can be disabled by a master switch in content settings, in incognito or
64 // guest mode, or by the device policy. 66 // guest mode, or by the device policy.
(...skipping 19 matching lines...) Expand all
84 86
85 // Must be the last member, to ensure that it will be 87 // Must be the last member, to ensure that it will be
86 // destroyed first, which will invalidate weak pointers 88 // destroyed first, which will invalidate weak pointers
87 base::WeakPtrFactory<ProtectedMediaIdentifierPermissionContext> weak_factory_; 89 base::WeakPtrFactory<ProtectedMediaIdentifierPermissionContext> weak_factory_;
88 #endif 90 #endif
89 91
90 DISALLOW_COPY_AND_ASSIGN(ProtectedMediaIdentifierPermissionContext); 92 DISALLOW_COPY_AND_ASSIGN(ProtectedMediaIdentifierPermissionContext);
91 }; 93 };
92 94
93 #endif // CHROME_BROWSER_MEDIA_PROTECTED_MEDIA_IDENTIFIER_PERMISSION_CONTEXT_H_ 95 #endif // CHROME_BROWSER_MEDIA_PROTECTED_MEDIA_IDENTIFIER_PERMISSION_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698