Index: public/platform/modules/permissions/WebPermissionClient.h |
diff --git a/public/platform/modules/permissions/WebPermissionClient.h b/public/platform/modules/permissions/WebPermissionClient.h |
index 0fa1faf4c9c92aa938822fe9082bdee90ec2fd28..efc8811b81bb5f4f33b96c8a9b1edb567632bad7 100644 |
--- a/public/platform/modules/permissions/WebPermissionClient.h |
+++ b/public/platform/modules/permissions/WebPermissionClient.h |
@@ -13,6 +13,7 @@ namespace blink { |
using WebPermissionQueryCallback = WebCallbacks<WebPermissionStatus, void>; |
+class WebPermissionObserver; |
class WebURL; |
// This client is expected to do general permission handling. From simple |
@@ -20,7 +21,17 @@ class WebURL; |
class WebPermissionClient { |
public: |
// Query the permission status of a given origin for a specific permission. |
- virtual void queryPermission(WebPermissionType, const WebURL&, WebPermissionQueryCallback*) = 0; |
+ virtual void queryPermission(WebPermissionType, const WebURL&, WebPermissionQueryCallback*) { } |
+ |
+ // Listen for permission changes for a given origin and inform the observer |
+ // when they happen. The observer is not owned by the WebPermissionClient. |
+ // The client should expect stopListening() to be called when the observer |
+ // will be destroyed. |
+ virtual void startListening(WebPermissionType, const WebURL&, WebPermissionObserver*) { } |
+ |
+ // Stop listening to all the permission changes associated with the given |
+ // observer. |
+ virtual void stopListening(WebPermissionObserver*) { } |
protected: |
virtual ~WebPermissionClient() { } |