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 CHROMECAST_BROWSER_CAST_PERMISSION_MANAGER_H_ | 5 #ifndef CHROMECAST_BROWSER_CAST_PERMISSION_MANAGER_H_ |
6 #define CHROMECAST_BROWSER_CAST_PERMISSION_MANAGER_H_ | 6 #define CHROMECAST_BROWSER_CAST_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 chromecast { | 12 namespace chromecast { |
13 namespace shell { | 13 namespace shell { |
14 | 14 |
15 class CastPermissionManager : public content::PermissionManager { | 15 class CastPermissionManager : public content::PermissionManager { |
16 public: | 16 public: |
17 CastPermissionManager(); | 17 CastPermissionManager(); |
18 ~CastPermissionManager() override; | 18 ~CastPermissionManager() override; |
19 | 19 |
20 // content::PermissionManager implementation: | 20 // content::PermissionManager implementation: |
21 int RequestPermission( | 21 int RequestPermission( |
22 content::PermissionType permission, | 22 content::PermissionType permission, |
23 content::RenderFrameHost* render_frame_host, | 23 content::RenderFrameHost* render_frame_host, |
24 const GURL& requesting_origin, | 24 const GURL& requesting_origin, |
25 bool user_gesture, | 25 bool user_gesture, |
26 const base::Callback<void(content::PermissionStatus)>& callback) override; | 26 const base::Callback<void(permission::Status)>& callback) override; |
27 void CancelPermissionRequest(int request_id) override; | 27 void CancelPermissionRequest(int request_id) override; |
28 void ResetPermission(content::PermissionType permission, | 28 void ResetPermission(content::PermissionType permission, |
29 const GURL& requesting_origin, | 29 const GURL& requesting_origin, |
30 const GURL& embedding_origin) override; | 30 const GURL& embedding_origin) override; |
31 content::PermissionStatus GetPermissionStatus( | 31 permission::Status GetPermissionStatus(content::PermissionType permission, |
32 content::PermissionType permission, | 32 const GURL& requesting_origin, |
33 const GURL& requesting_origin, | 33 const GURL& embedding_origin) override; |
34 const GURL& embedding_origin) override; | |
35 void RegisterPermissionUsage(content::PermissionType permission, | 34 void RegisterPermissionUsage(content::PermissionType permission, |
36 const GURL& requesting_origin, | 35 const GURL& requesting_origin, |
37 const GURL& embedding_origin) override; | 36 const GURL& embedding_origin) override; |
38 int SubscribePermissionStatusChange( | 37 int SubscribePermissionStatusChange( |
39 content::PermissionType permission, | 38 content::PermissionType permission, |
40 const GURL& requesting_origin, | 39 const GURL& requesting_origin, |
41 const GURL& embedding_origin, | 40 const GURL& embedding_origin, |
42 const base::Callback<void(content::PermissionStatus)>& callback) override; | 41 const base::Callback<void(permission::Status)>& callback) override; |
43 void UnsubscribePermissionStatusChange(int subscription_id) override; | 42 void UnsubscribePermissionStatusChange(int subscription_id) override; |
44 | 43 |
45 private: | 44 private: |
46 DISALLOW_COPY_AND_ASSIGN(CastPermissionManager); | 45 DISALLOW_COPY_AND_ASSIGN(CastPermissionManager); |
47 }; | 46 }; |
48 | 47 |
49 } // namespace shell | 48 } // namespace shell |
50 } // namespace chromecast | 49 } // namespace chromecast |
51 | 50 |
52 #endif // CHROMECAST_BROWSER_CAST_PERMISSION_MANAGER_H_ | 51 #endif // CHROMECAST_BROWSER_CAST_PERMISSION_MANAGER_H_ |
OLD | NEW |