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

Unified Diff: chrome/browser/permissions/chooser_permission_manager.h

Issue 1560263002: Store Bluetooth permissions in website settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleaned up changes at bluetooth_dispatcher_host.cc Created 4 years, 11 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
Index: chrome/browser/permissions/chooser_permission_manager.h
diff --git a/chrome/browser/permissions/chooser_permission_manager.h b/chrome/browser/permissions/chooser_permission_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..985a00abf0ef5740efe4f665c32c0d037cf69684
--- /dev/null
+++ b/chrome/browser/permissions/chooser_permission_manager.h
@@ -0,0 +1,35 @@
+// Copyright 2016 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 CHROME_BROWSER_PERMISSIONS_CHOOSER_PERMISSION_MANAGER_H_
+#define CHROME_BROWSER_PERMISSIONS_CHOOSER_PERMISSION_MANAGER_H_
+
+#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
+#include "components/keyed_service/core/keyed_service.h"
+#include "content/public/browser/chooser_permission_manager.h"
+
+class Profile;
+
+class ChooserPermissionManager : public KeyedService,
+ public content::ChooserPermissionManager {
+ public:
+ explicit ChooserPermissionManager(Profile* profile);
+ ~ChooserPermissionManager() override;
+
+ // content::ChooserPermissionManager:
+ void GrantPermission(const GURL& requesting_origin,
+ const GURL& embedding_origin,
+ const std::string& id) override;
+ void RevokePermission(const GURL& requesting_origin,
+ const GURL& embedding_origin,
+ const std::string& id) override;
+
+ private:
+ Profile* profile_;
+
+ DISALLOW_COPY_AND_ASSIGN(ChooserPermissionManager);
+};
+
+#endif // CHROME_BROWSER_PERMISSIONS_CHOOSER_PERMISSION_MANAGER_H_

Powered by Google App Engine
This is Rietveld 408576698