| Index: content/child/permissions/permission_observers_registry.cc
|
| diff --git a/content/child/permissions/permission_observers_registry.cc b/content/child/permissions/permission_observers_registry.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f8a2f1b6d6170506bfd1f248cc6bd3615807e350
|
| --- /dev/null
|
| +++ b/content/child/permissions/permission_observers_registry.cc
|
| @@ -0,0 +1,32 @@
|
| +// 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.
|
| +
|
| +#include "content/child/permissions/permission_observers_registry.h"
|
| +
|
| +#include "third_party/WebKit/public/platform/modules/permissions/WebPermissionObserver.h"
|
| +
|
| +namespace content {
|
| +
|
| +PermissionObserversRegistry::PermissionObserversRegistry() {
|
| +}
|
| +
|
| +PermissionObserversRegistry::~PermissionObserversRegistry() {
|
| +}
|
| +
|
| +void PermissionObserversRegistry::RegisterObserver(
|
| + blink::WebPermissionObserver* observer) {
|
| + observers_.insert(observer);
|
| +}
|
| +
|
| +void PermissionObserversRegistry::UnregisterObserver(
|
| + blink::WebPermissionObserver* observer) {
|
| + observers_.erase(observer);
|
| +}
|
| +
|
| +bool PermissionObserversRegistry::IsObserverRegistered(
|
| + blink::WebPermissionObserver* observer) const {
|
| + return observers_.find(observer) != observers_.end();
|
| +}
|
| +
|
| +} // namespace content
|
|
|