Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Side by Side Diff: chrome/browser/permissions/permission_manager.h

Issue 1011953003: Refactor Permissions related method out of ContentBrowserClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission_type_enum_class
Patch Set: fix cros Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 CHROME_BROWSER_PERMISSIONS_PERMISSION_MANAGER_H_
6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_MANAGER_H_
7
8 #include "base/callback_forward.h"
9 #include "base/macros.h"
10 #include "components/keyed_service/core/keyed_service.h"
11 #include "content/public/browser/permission_manager.h"
12
13 class Profile;
14
15 namespace content {
16 enum class PermissionType;
17 }; // namespace content
18
19 class PermissionManager : public KeyedService,
20 public content::PermissionManager {
21 public:
22 explicit PermissionManager(Profile* profile);
23 ~PermissionManager() override;
24
25 // content::PermissionManager implementation.
26 void RequestPermission(
27 content::PermissionType permission,
28 content::WebContents* web_contents,
29 int request_id,
30 const GURL& requesting_origin,
31 bool user_gesture,
32 const base::Callback<void(content::PermissionStatus)>& callback) override;
33 void CancelPermissionRequest(content::PermissionType permission,
34 content::WebContents* web_contents,
35 int request_id,
36 const GURL& requesting_origin) override;
37 void ResetPermission(content::PermissionType permission,
38 const GURL& requesting_origin,
39 const GURL& embedding_origin) override;
40 content::PermissionStatus GetPermissionStatus(
41 content::PermissionType permission,
42 const GURL& requesting_origin,
43 const GURL& embedding_origin) override;
44 void RegisterPermissionUsage(content::PermissionType permission,
45 const GURL& requesting_origin,
46 const GURL& embedding_origin) override;
47
48 private:
49 Profile* profile_;
50
51 DISALLOW_COPY_AND_ASSIGN(PermissionManager);
52 };
53
54 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/permissions/permission_context.cc ('k') | chrome/browser/permissions/permission_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698