Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(983)

Unified Diff: content/child/permissions/permission_observers_registry.cc

Issue 1057453004: Permissions: glue between Mojo and Blink for permission observing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review commetns Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/child/permissions/permission_observers_registry.h ('k') | content/content_child.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « content/child/permissions/permission_observers_registry.h ('k') | content/content_child.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698