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 CONTENT_SHELL_BROWSER_SHELL_PERMISSION_MANAGER_H_
6 #define CONTENT_SHELL_BROWSER_SHELL_PERMISSION_MANAGER_H_
8 #include "base/callback_forward.h"
9 #include "base/macros.h"
10 #include "content/public/browser/permission_manager.h"
14 class ShellPermissionManager
: public PermissionManager
{
16 ShellPermissionManager();
17 ~ShellPermissionManager() override
;
19 // PermissionManager implementation.
20 void RequestPermission(
21 PermissionType permission
,
22 WebContents
* web_contents
,
24 const GURL
& requesting_origin
,
26 const base::Callback
<void(PermissionStatus
)>& callback
) override
;
27 void CancelPermissionRequest(PermissionType permission
,
28 WebContents
* web_contents
,
30 const GURL
& requesting_origin
) override
;
31 void ResetPermission(PermissionType permission
,
32 const GURL
& requesting_origin
,
33 const GURL
& embedding_origin
) override
;
34 PermissionStatus
GetPermissionStatus(PermissionType permission
,
35 const GURL
& requesting_origin
,
36 const GURL
& embedding_origin
) override
;
37 void RegisterPermissionUsage(PermissionType permission
,
38 const GURL
& requesting_origin
,
39 const GURL
& embedding_origin
) override
;
40 int SubscribePermissionStatusChange(
41 PermissionType permission
,
42 const GURL
& requesting_origin
,
43 const GURL
& embedding_origin
,
44 const base::Callback
<void(PermissionStatus
)>& callback
) override
;
45 void UnsubscribePermissionStatusChange(int subscription_id
) override
;
48 DISALLOW_COPY_AND_ASSIGN(ShellPermissionManager
);
51 } // namespace content
53 #endif // CONTENT_SHELL_BROWSER_SHELL_PERMISSION_MANAGER_H