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

Side by Side Diff: content/public/browser/permission_manager.h

Issue 2697473002: Remove last usage functions from HostContentSettingsMap and clean up prefs (Closed)
Patch Set: fix up unit test Created 3 years, 10 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
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 CONTENT_PUBLIC_BROWSER_PERMISSION_MANAGER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_PERMISSION_MANAGER_H_
6 #define CONTENT_PUBLIC_BROWSER_PERMISSION_MANAGER_H_ 6 #define CONTENT_PUBLIC_BROWSER_PERMISSION_MANAGER_H_
7 7
8 #include "content/common/content_export.h" 8 #include "content/common/content_export.h"
9 #include "third_party/WebKit/public/platform/modules/permissions/permission_stat us.mojom.h" 9 #include "third_party/WebKit/public/platform/modules/permissions/permission_stat us.mojom.h"
10 10
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 PermissionType permission, 70 PermissionType permission,
71 const GURL& requesting_origin, 71 const GURL& requesting_origin,
72 const GURL& embedding_origin) = 0; 72 const GURL& embedding_origin) = 0;
73 73
74 // Sets the permission back to its default for the requesting_origin/ 74 // Sets the permission back to its default for the requesting_origin/
75 // embedding_origin tuple. 75 // embedding_origin tuple.
76 virtual void ResetPermission(PermissionType permission, 76 virtual void ResetPermission(PermissionType permission,
77 const GURL& requesting_origin, 77 const GURL& requesting_origin,
78 const GURL& embedding_origin) = 0; 78 const GURL& embedding_origin) = 0;
79 79
80 // Registers a permission usage.
81 // TODO(mlamouri): see if we can remove this from the PermissionManager.
82 virtual void RegisterPermissionUsage(PermissionType permission,
83 const GURL& requesting_origin,
84 const GURL& embedding_origin) = 0;
85
86 // Runs the given |callback| whenever the |permission| associated with the 80 // Runs the given |callback| whenever the |permission| associated with the
87 // pair { requesting_origin, embedding_origin } changes. 81 // pair { requesting_origin, embedding_origin } changes.
88 // Returns the subscription_id to be used to unsubscribe. Can be 82 // Returns the subscription_id to be used to unsubscribe. Can be
89 // kNoPendingOperation if the subscribe was not successful. 83 // kNoPendingOperation if the subscribe was not successful.
90 virtual int SubscribePermissionStatusChange( 84 virtual int SubscribePermissionStatusChange(
91 PermissionType permission, 85 PermissionType permission,
92 const GURL& requesting_origin, 86 const GURL& requesting_origin,
93 const GURL& embedding_origin, 87 const GURL& embedding_origin,
94 const base::Callback<void(blink::mojom::PermissionStatus)>& callback) = 0; 88 const base::Callback<void(blink::mojom::PermissionStatus)>& callback) = 0;
95 89
96 // Unregisters from permission status change notifications. 90 // Unregisters from permission status change notifications.
97 // The |subscription_id| must match the value returned by the 91 // The |subscription_id| must match the value returned by the
98 // SubscribePermissionStatusChange call. Unsubscribing 92 // SubscribePermissionStatusChange call. Unsubscribing
99 // an already unsubscribed |subscription_id| or providing the 93 // an already unsubscribed |subscription_id| or providing the
100 // |subscription_id| kNoPendingOperation is a no-op. 94 // |subscription_id| kNoPendingOperation is a no-op.
101 virtual void UnsubscribePermissionStatusChange(int subscription_id) = 0; 95 virtual void UnsubscribePermissionStatusChange(int subscription_id) = 0;
102 }; 96 };
103 97
104 } // namespace content 98 } // namespace content
105 99
106 #endif // CONTENT_PUBLIC_BROWSER_PERMISSION_MANAGER_H_ 100 #endif // CONTENT_PUBLIC_BROWSER_PERMISSION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698