Chromium Code Reviews| Index: content/child/permissions/permission_observers_registry.h |
| diff --git a/content/child/permissions/permission_observers_registry.h b/content/child/permissions/permission_observers_registry.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9987dad18e2a6626a6d297738431f1999f1855ce |
| --- /dev/null |
| +++ b/content/child/permissions/permission_observers_registry.h |
| @@ -0,0 +1,31 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_CHILD_PERMISSIONS_PERMISSION_OBSERVERS_REGISTRY_H_ |
| +#define CONTENT_CHILD_PERMISSIONS_PERMISSION_OBSERVERS_REGISTRY_H_ |
| + |
| +#include <set> |
| + |
| +namespace blink { |
| +class WebPermissionObserver; |
| +} |
| + |
| +namespace content { |
| + |
| +class PermissionObserversRegistry { |
|
whywhat
2015/04/02 16:20:24
add class description
(e.g that it's not thread sa
mlamouri (slow - plz ping)
2015/04/02 17:02:43
Done.
mlamouri (slow - plz ping)
2015/04/02 17:02:43
Done.
|
| + public: |
| + PermissionObserversRegistry(); |
| + ~PermissionObserversRegistry(); |
| + |
| + void RegisterObserver(blink::WebPermissionObserver* observer); |
| + void UnregisterObserver(blink::WebPermissionObserver* observer); |
| + bool IsObserverRegistered(blink::WebPermissionObserver* observer) const; |
| + |
| + private: |
| + std::set<blink::WebPermissionObserver*> observers_; |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_CHILD_PERMISSIONS_PERMISSION_OBSERVERS_REGISTRY_H_ |