OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CONTENT_SHELL_BROWSER_SHELL_PERMISSION_MANAGER_H_ | 5 #ifndef CONTENT_SHELL_BROWSER_SHELL_PERMISSION_MANAGER_H_ |
6 #define CONTENT_SHELL_BROWSER_SHELL_PERMISSION_MANAGER_H_ | 6 #define CONTENT_SHELL_BROWSER_SHELL_PERMISSION_MANAGER_H_ |
7 | 7 |
8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "content/public/browser/permission_manager.h" | 10 #include "content/public/browser/permission_manager.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 | 13 |
14 class ShellPermissionManager : public PermissionManager { | 14 class ShellPermissionManager : public PermissionManager { |
15 public: | 15 public: |
16 ShellPermissionManager(); | 16 ShellPermissionManager(); |
17 ~ShellPermissionManager() override; | 17 ~ShellPermissionManager() override; |
18 | 18 |
19 // PermissionManager implementation. | 19 // PermissionManager implementation. |
20 int RequestPermission( | 20 int RequestPermission( |
21 PermissionType permission, | 21 PermissionType permission, |
22 RenderFrameHost* render_frame_host, | 22 RenderFrameHost* render_frame_host, |
23 const GURL& requesting_origin, | 23 const GURL& requesting_origin, |
24 bool user_gesture, | 24 bool user_gesture, |
25 const base::Callback<void(PermissionStatus)>& callback) override; | 25 const base::Callback<void(PermissionStatus)>& callback) override; |
| 26 int RequestPermissions( |
| 27 const std::vector<PermissionType>& permission, |
| 28 RenderFrameHost* render_frame_host, |
| 29 const GURL& requesting_origin, |
| 30 bool user_gesture, |
| 31 const base::Callback<void( |
| 32 const std::vector<PermissionStatus>&)>& callback) override; |
26 void CancelPermissionRequest(int request_id) override; | 33 void CancelPermissionRequest(int request_id) override; |
27 void ResetPermission(PermissionType permission, | 34 void ResetPermission(PermissionType permission, |
28 const GURL& requesting_origin, | 35 const GURL& requesting_origin, |
29 const GURL& embedding_origin) override; | 36 const GURL& embedding_origin) override; |
30 PermissionStatus GetPermissionStatus(PermissionType permission, | 37 PermissionStatus GetPermissionStatus(PermissionType permission, |
31 const GURL& requesting_origin, | 38 const GURL& requesting_origin, |
32 const GURL& embedding_origin) override; | 39 const GURL& embedding_origin) override; |
33 void RegisterPermissionUsage(PermissionType permission, | 40 void RegisterPermissionUsage(PermissionType permission, |
34 const GURL& requesting_origin, | 41 const GURL& requesting_origin, |
35 const GURL& embedding_origin) override; | 42 const GURL& embedding_origin) override; |
36 int SubscribePermissionStatusChange( | 43 int SubscribePermissionStatusChange( |
37 PermissionType permission, | 44 PermissionType permission, |
38 const GURL& requesting_origin, | 45 const GURL& requesting_origin, |
39 const GURL& embedding_origin, | 46 const GURL& embedding_origin, |
40 const base::Callback<void(PermissionStatus)>& callback) override; | 47 const base::Callback<void(PermissionStatus)>& callback) override; |
41 void UnsubscribePermissionStatusChange(int subscription_id) override; | 48 void UnsubscribePermissionStatusChange(int subscription_id) override; |
42 | 49 |
43 private: | 50 private: |
44 DISALLOW_COPY_AND_ASSIGN(ShellPermissionManager); | 51 DISALLOW_COPY_AND_ASSIGN(ShellPermissionManager); |
45 }; | 52 }; |
46 | 53 |
47 } // namespace content | 54 } // namespace content |
48 | 55 |
49 #endif // CONTENT_SHELL_BROWSER_SHELL_PERMISSION_MANAGER_H | 56 #endif // CONTENT_SHELL_BROWSER_SHELL_PERMISSION_MANAGER_H |
OLD | NEW |