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 "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
9 #include "base/id_map.h" | 9 #include "base/id_map.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 using PendingRequestsMap = IDMap<PendingRequest, IDMapOwnPointer>; | 62 using PendingRequestsMap = IDMap<PendingRequest, IDMapOwnPointer>; |
63 | 63 |
64 struct Subscription; | 64 struct Subscription; |
65 using SubscriptionsMap = IDMap<Subscription, IDMapOwnPointer>; | 65 using SubscriptionsMap = IDMap<Subscription, IDMapOwnPointer>; |
66 | 66 |
67 void OnPermissionRequestResponse( | 67 void OnPermissionRequestResponse( |
68 int request_id, | 68 int request_id, |
69 const base::Callback<void(content::PermissionStatus)>& callback, | 69 const base::Callback<void(content::PermissionStatus)>& callback, |
70 ContentSetting content_setting); | 70 ContentSetting content_setting); |
71 | 71 |
72 // Not all WebContents are able to display permission requests. If the PBM | 72 // Not all WebContents are able to display permission requests. If the UI |
73 // is required but missing for |web_contents|, don't pass along the request. | 73 // manager is required but missing for |web_contents|, don't pass along the |
74 bool IsPermissionBubbleManagerMissing(content::WebContents* web_contents); | 74 // request. |
| 75 bool IsPermissionUIManagerMissing(content::WebContents* web_contents); |
75 | 76 |
76 // content_settings::Observer implementation. | 77 // content_settings::Observer implementation. |
77 void OnContentSettingChanged(const ContentSettingsPattern& primary_pattern, | 78 void OnContentSettingChanged(const ContentSettingsPattern& primary_pattern, |
78 const ContentSettingsPattern& secondary_pattern, | 79 const ContentSettingsPattern& secondary_pattern, |
79 ContentSettingsType content_type, | 80 ContentSettingsType content_type, |
80 std::string resource_identifier) override; | 81 std::string resource_identifier) override; |
81 | 82 |
82 Profile* profile_; | 83 Profile* profile_; |
83 PendingRequestsMap pending_requests_; | 84 PendingRequestsMap pending_requests_; |
84 SubscriptionsMap subscriptions_; | 85 SubscriptionsMap subscriptions_; |
85 | 86 |
86 base::WeakPtrFactory<PermissionManager> weak_ptr_factory_; | 87 base::WeakPtrFactory<PermissionManager> weak_ptr_factory_; |
87 | 88 |
88 DISALLOW_COPY_AND_ASSIGN(PermissionManager); | 89 DISALLOW_COPY_AND_ASSIGN(PermissionManager); |
89 }; | 90 }; |
90 | 91 |
91 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_MANAGER_H_ | 92 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_MANAGER_H_ |
OLD | NEW |