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 CHROME_BROWSER_PERMISSIONS_PERMISSION_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_PERMISSIONS_PERMISSION_MANAGER_H_ |
6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_MANAGER_H_ | 6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_MANAGER_H_ |
7 | 7 |
8 #include <unordered_map> | 8 #include <unordered_map> |
9 | 9 |
10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
11 #include "base/id_map.h" | 11 #include "base/id_map.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "chrome/browser/permissions/permission_util.h" | 14 #include "chrome/browser/permissions/permission_util.h" |
15 #include "components/content_settings/core/browser/content_settings_observer.h" | 15 #include "components/content_settings/core/browser/content_settings_observer.h" |
16 #include "components/content_settings/core/common/content_settings.h" | 16 #include "components/content_settings/core/common/content_settings.h" |
17 #include "components/keyed_service/core/keyed_service.h" | 17 #include "components/keyed_service/core/keyed_service.h" |
18 #include "content/public/browser/permission_manager.h" | 18 #include "content/public/browser/permission_manager.h" |
19 | 19 |
20 class PermissionContextBase; | 20 class PermissionContextBase; |
21 class Profile; | 21 class Profile; |
22 | 22 |
23 namespace content { | 23 namespace content { |
24 enum class PermissionType; | 24 enum class PermissionType; |
25 class WebContents; | |
26 }; // namespace content | 25 }; // namespace content |
27 | 26 |
28 class PermissionManager : public KeyedService, | 27 class PermissionManager : public KeyedService, |
29 public content::PermissionManager, | 28 public content::PermissionManager, |
30 public content_settings::Observer { | 29 public content_settings::Observer { |
31 public: | 30 public: |
32 static PermissionManager* Get(Profile* profile); | 31 static PermissionManager* Get(Profile* profile); |
33 | 32 |
34 explicit PermissionManager(Profile* profile); | 33 explicit PermissionManager(Profile* profile); |
35 ~PermissionManager() override; | 34 ~PermissionManager() override; |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 std::unique_ptr<PermissionContextBase>, | 107 std::unique_ptr<PermissionContextBase>, |
109 PermissionTypeHash> | 108 PermissionTypeHash> |
110 permission_contexts_; | 109 permission_contexts_; |
111 | 110 |
112 base::WeakPtrFactory<PermissionManager> weak_ptr_factory_; | 111 base::WeakPtrFactory<PermissionManager> weak_ptr_factory_; |
113 | 112 |
114 DISALLOW_COPY_AND_ASSIGN(PermissionManager); | 113 DISALLOW_COPY_AND_ASSIGN(PermissionManager); |
115 }; | 114 }; |
116 | 115 |
117 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_MANAGER_H_ | 116 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_MANAGER_H_ |
OLD | NEW |