OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef BLIMP_ENGINE_APP_BLIMP_PERMISSION_MANAGER_H_ | |
6 #define BLIMP_ENGINE_APP_BLIMP_PERMISSION_MANAGER_H_ | |
7 | |
8 #include <vector> | |
9 | |
10 #include "base/callback_forward.h" | |
11 #include "base/macros.h" | |
12 #include "content/public/browser/permission_manager.h" | |
13 | |
14 namespace blimp { | |
15 namespace engine { | |
16 | |
17 class BlimpPermissionManager : public content::PermissionManager { | |
18 public: | |
19 BlimpPermissionManager(); | |
20 ~BlimpPermissionManager() override; | |
21 | |
22 // content::PermissionManager implementation: | |
23 int RequestPermission( | |
24 content::PermissionType permission, | |
25 content::RenderFrameHost* render_frame_host, | |
26 const GURL& requesting_origin, | |
27 bool user_gesture, | |
28 const base::Callback<void(blink::mojom::PermissionStatus)>& callback) | |
29 override; | |
30 int RequestPermissions( | |
31 const std::vector<content::PermissionType>& permission, | |
32 content::RenderFrameHost* render_frame_host, | |
33 const GURL& requesting_origin, | |
34 bool user_gesture, | |
35 const base::Callback< | |
36 void(const std::vector<blink::mojom::PermissionStatus>&)>& callback) | |
37 override; | |
38 void CancelPermissionRequest(int request_id) override; | |
39 void ResetPermission(content::PermissionType permission, | |
40 const GURL& requesting_origin, | |
41 const GURL& embedding_origin) override; | |
42 blink::mojom::PermissionStatus GetPermissionStatus( | |
43 content::PermissionType permission, | |
44 const GURL& requesting_origin, | |
45 const GURL& embedding_origin) override; | |
46 void RegisterPermissionUsage(content::PermissionType permission, | |
47 const GURL& requesting_origin, | |
48 const GURL& embedding_origin) override; | |
49 int SubscribePermissionStatusChange( | |
50 content::PermissionType permission, | |
51 const GURL& requesting_origin, | |
52 const GURL& embedding_origin, | |
53 const base::Callback<void(blink::mojom::PermissionStatus)>& callback) | |
54 override; | |
55 void UnsubscribePermissionStatusChange(int subscription_id) override; | |
56 | |
57 private: | |
58 DISALLOW_COPY_AND_ASSIGN(BlimpPermissionManager); | |
59 }; | |
60 | |
61 } // namespace engine | |
62 } // namespace blimp | |
63 | |
64 #endif // BLIMP_ENGINE_APP_BLIMP_PERMISSION_MANAGER_H_ | |
OLD | NEW |