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 29 matching lines...) Expand all Loading... |
40 public: | 40 public: |
41 explicit ProtectedMediaIdentifierPermissionContext(Profile* profile); | 41 explicit ProtectedMediaIdentifierPermissionContext(Profile* profile); |
42 ~ProtectedMediaIdentifierPermissionContext() override; | 42 ~ProtectedMediaIdentifierPermissionContext() override; |
43 | 43 |
44 // PermissionContextBase implementation. | 44 // PermissionContextBase implementation. |
45 #if defined(OS_CHROMEOS) | 45 #if defined(OS_CHROMEOS) |
46 void DecidePermission(content::WebContents* web_contents, | 46 void DecidePermission(content::WebContents* web_contents, |
47 const PermissionRequestID& id, | 47 const PermissionRequestID& id, |
48 const GURL& requesting_origin, | 48 const GURL& requesting_origin, |
49 const GURL& embedding_origin, | 49 const GURL& embedding_origin, |
| 50 bool user_gesture, |
50 const BrowserPermissionCallback& callback) override; | 51 const BrowserPermissionCallback& callback) override; |
51 #endif // defined(OS_CHROMEOS) | 52 #endif // defined(OS_CHROMEOS) |
52 ContentSetting GetPermissionStatus( | 53 ContentSetting GetPermissionStatus( |
53 const GURL& requesting_origin, | 54 const GURL& requesting_origin, |
54 const GURL& embedding_origin) const override; | 55 const GURL& embedding_origin) const override; |
55 void CancelPermissionRequest(content::WebContents* web_contents, | 56 void CancelPermissionRequest(content::WebContents* web_contents, |
56 const PermissionRequestID& id) override; | 57 const PermissionRequestID& id) override; |
57 | 58 |
58 private: | 59 private: |
59 void UpdateTabContext(const PermissionRequestID& id, | 60 void UpdateTabContext(const PermissionRequestID& id, |
(...skipping 27 matching lines...) Expand all Loading... |
87 | 88 |
88 // Must be the last member, to ensure that it will be | 89 // Must be the last member, to ensure that it will be |
89 // destroyed first, which will invalidate weak pointers | 90 // destroyed first, which will invalidate weak pointers |
90 base::WeakPtrFactory<ProtectedMediaIdentifierPermissionContext> weak_factory_; | 91 base::WeakPtrFactory<ProtectedMediaIdentifierPermissionContext> weak_factory_; |
91 #endif | 92 #endif |
92 | 93 |
93 DISALLOW_COPY_AND_ASSIGN(ProtectedMediaIdentifierPermissionContext); | 94 DISALLOW_COPY_AND_ASSIGN(ProtectedMediaIdentifierPermissionContext); |
94 }; | 95 }; |
95 | 96 |
96 #endif // CHROME_BROWSER_MEDIA_PROTECTED_MEDIA_IDENTIFIER_PERMISSION_CONTEXT_H_ | 97 #endif // CHROME_BROWSER_MEDIA_PROTECTED_MEDIA_IDENTIFIER_PERMISSION_CONTEXT_H_ |
OLD | NEW |