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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 // PendingRequest is identified by its |request_id| and the permission is | 71 // PendingRequest is identified by its |request_id| and the permission is |
72 // identified by its |permission_id|. If the PendingRequest contains more than | 72 // identified by its |permission_id|. If the PendingRequest contains more than |
73 // one permission, it will wait for the remaining permissions to be resolved. | 73 // one permission, it will wait for the remaining permissions to be resolved. |
74 // When all the permissions have been resolved, the PendingRequest's callback | 74 // When all the permissions have been resolved, the PendingRequest's callback |
75 // is run. | 75 // is run. |
76 void OnPermissionsRequestResponseStatus( | 76 void OnPermissionsRequestResponseStatus( |
77 int request_id, | 77 int request_id, |
78 int permission_id, | 78 int permission_id, |
79 content::PermissionStatus status); | 79 content::PermissionStatus status); |
80 | 80 |
81 // Not all WebContents are able to display permission requests. If the PBM | 81 // Not all WebContents are able to display permission requests. If the UI |
82 // is required but missing for |web_contents|, don't pass along the request. | 82 // manager is required but missing for |web_contents|, don't pass along the |
83 bool IsPermissionBubbleManagerMissing(content::WebContents* web_contents); | 83 // request. |
| 84 bool IsPermissionUIManagerMissing(content::WebContents* web_contents); |
84 | 85 |
85 // content_settings::Observer implementation. | 86 // content_settings::Observer implementation. |
86 void OnContentSettingChanged(const ContentSettingsPattern& primary_pattern, | 87 void OnContentSettingChanged(const ContentSettingsPattern& primary_pattern, |
87 const ContentSettingsPattern& secondary_pattern, | 88 const ContentSettingsPattern& secondary_pattern, |
88 ContentSettingsType content_type, | 89 ContentSettingsType content_type, |
89 std::string resource_identifier) override; | 90 std::string resource_identifier) override; |
90 | 91 |
91 Profile* profile_; | 92 Profile* profile_; |
92 PendingRequestsMap pending_requests_; | 93 PendingRequestsMap pending_requests_; |
93 SubscriptionsMap subscriptions_; | 94 SubscriptionsMap subscriptions_; |
94 | 95 |
95 base::WeakPtrFactory<PermissionManager> weak_ptr_factory_; | 96 base::WeakPtrFactory<PermissionManager> weak_ptr_factory_; |
96 | 97 |
97 DISALLOW_COPY_AND_ASSIGN(PermissionManager); | 98 DISALLOW_COPY_AND_ASSIGN(PermissionManager); |
98 }; | 99 }; |
99 | 100 |
100 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_MANAGER_H_ | 101 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_MANAGER_H_ |
OLD | NEW |