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 #include "content/child/permissions/permission_observers_registry.h"
7 #include "third_party/WebKit/public/platform/modules/permissions/WebPermissionObserver.h"
11 PermissionObserversRegistry::PermissionObserversRegistry() {
14 PermissionObserversRegistry::~PermissionObserversRegistry() {
17 void PermissionObserversRegistry::RegisterObserver(
18 blink::WebPermissionObserver
* observer
) {
19 observers_
.insert(observer
);
22 void PermissionObserversRegistry::UnregisterObserver(
23 blink::WebPermissionObserver
* observer
) {
24 observers_
.erase(observer
);
27 bool PermissionObserversRegistry::IsObserverRegistered(
28 blink::WebPermissionObserver
* observer
) const {
29 return observers_
.find(observer
) != observers_
.end();
32 } // namespace content