Drive: Add BatchableRequest subclass.
[chromium-blink-merge.git] / chromecast / browser / cast_permission_manager.h
blobc82f08a4be2d2e3f7ba9ec7f0e1efbb0c954c628
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 {
13 namespace shell {
15 class CastPermissionManager : public content::PermissionManager {
16 public:
17 CastPermissionManager();
18 ~CastPermissionManager() override;
20 // content::PermissionManager implementation:
21 void RequestPermission(
22 content::PermissionType permission,
23 content::WebContents* web_contents,
24 int request_id,
25 const GURL& requesting_origin,
26 bool user_gesture,
27 const base::Callback<void(content::PermissionStatus)>& callback) override;
28 void CancelPermissionRequest(content::PermissionType permission,
29 content::WebContents* web_contents,
30 int request_id,
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;
49 private:
50 DISALLOW_COPY_AND_ASSIGN(CastPermissionManager);
53 } // namespace shell
54 } // namespace chromecast
56 #endif // CHROMECAST_BROWSER_CAST_PERMISSION_MANAGER_H_