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 "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 27 matching lines...) Expand all Loading... |
38 | 38 |
39 // PermissionContextBase implementation. | 39 // PermissionContextBase implementation. |
40 #if defined(OS_CHROMEOS) | 40 #if defined(OS_CHROMEOS) |
41 void DecidePermission(content::WebContents* web_contents, | 41 void DecidePermission(content::WebContents* web_contents, |
42 const PermissionRequestID& id, | 42 const PermissionRequestID& id, |
43 const GURL& requesting_origin, | 43 const GURL& requesting_origin, |
44 const GURL& embedding_origin, | 44 const GURL& embedding_origin, |
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 PermissionResult 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 private: | 55 private: |
56 friend class ProtectedMediaIdentifierPermissionContextTest; | 56 friend class ProtectedMediaIdentifierPermissionContextTest; |
57 static bool IsOriginWhitelisted(const GURL& origin); | 57 static bool IsOriginWhitelisted(const GURL& origin); |
58 | 58 |
(...skipping 28 matching lines...) Expand all Loading... |
87 | 87 |
88 // Must be the last member, to ensure that it will be | 88 // Must be the last member, to ensure that it will be |
89 // destroyed first, which will invalidate weak pointers | 89 // destroyed first, which will invalidate weak pointers |
90 base::WeakPtrFactory<ProtectedMediaIdentifierPermissionContext> weak_factory_; | 90 base::WeakPtrFactory<ProtectedMediaIdentifierPermissionContext> weak_factory_; |
91 #endif | 91 #endif |
92 | 92 |
93 DISALLOW_COPY_AND_ASSIGN(ProtectedMediaIdentifierPermissionContext); | 93 DISALLOW_COPY_AND_ASSIGN(ProtectedMediaIdentifierPermissionContext); |
94 }; | 94 }; |
95 | 95 |
96 #endif // CHROME_BROWSER_MEDIA_PROTECTED_MEDIA_IDENTIFIER_PERMISSION_CONTEXT_H_ | 96 #endif // CHROME_BROWSER_MEDIA_PROTECTED_MEDIA_IDENTIFIER_PERMISSION_CONTEXT_H_ |
OLD | NEW |