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.
5 #ifndef CHROMECAST_BROWSER_CAST_PERMISSION_MANAGER_H_
6 #define CHROMECAST_BROWSER_CAST_PERMISSION_MANAGER_H_
8 #include "base/callback_forward.h"
9 #include "base/macros.h"
10 #include "content/public/browser/permission_manager.h"
12 namespace chromecast
{
15 class CastPermissionManager
: public content::PermissionManager
{
17 CastPermissionManager();
18 ~CastPermissionManager() override
;
20 // content::PermissionManager implementation:
21 void RequestPermission(
22 content::PermissionType permission
,
23 content::RenderFrameHost
* render_frame_host
,
25 const GURL
& requesting_origin
,
27 const base::Callback
<void(content::PermissionStatus
)>& callback
) override
;
28 void CancelPermissionRequest(content::PermissionType permission
,
29 content::RenderFrameHost
* render_frame_host
,
31 const GURL
& requesting_origin
) override
;
32 void ResetPermission(content::PermissionType permission
,
33 const GURL
& requesting_origin
,
34 const GURL
& embedding_origin
) override
;
35 content::PermissionStatus
GetPermissionStatus(
36 content::PermissionType permission
,
37 const GURL
& requesting_origin
,
38 const GURL
& embedding_origin
) override
;
39 void RegisterPermissionUsage(content::PermissionType permission
,
40 const GURL
& requesting_origin
,
41 const GURL
& embedding_origin
) override
;
42 int SubscribePermissionStatusChange(
43 content::PermissionType permission
,
44 const GURL
& requesting_origin
,
45 const GURL
& embedding_origin
,
46 const base::Callback
<void(content::PermissionStatus
)>& callback
) override
;
47 void UnsubscribePermissionStatusChange(int subscription_id
) override
;
50 DISALLOW_COPY_AND_ASSIGN(CastPermissionManager
);
54 } // namespace chromecast
56 #endif // CHROMECAST_BROWSER_CAST_PERMISSION_MANAGER_H_