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
3 // found in the LICENSE file.
5 #ifndef CONTENT_CHILD_PERMISSIONS_PERMISSION_OBSERVERS_REGISTRY_H_
6 #define CONTENT_CHILD_PERMISSIONS_PERMISSION_OBSERVERS_REGISTRY_H_
11 class WebPermissionObserver
;
16 // PermissionObserversRegistry keeps a list of WebPermissionObserver with basic
17 // methods to add/removed/check. It is being used by PermissionDispatcher and
18 // PermissionDispatcherThreadProxy.
19 // This is not thread-safe.
20 class PermissionObserversRegistry
{
22 PermissionObserversRegistry();
23 ~PermissionObserversRegistry();
25 void RegisterObserver(blink::WebPermissionObserver
* observer
);
26 void UnregisterObserver(blink::WebPermissionObserver
* observer
);
27 bool IsObserverRegistered(blink::WebPermissionObserver
* observer
) const;
30 std::set
<blink::WebPermissionObserver
*> observers_
;
33 } // namespace content
35 #endif // CONTENT_CHILD_PERMISSIONS_PERMISSION_OBSERVERS_REGISTRY_H_